Skip to content

Commit

Permalink
Merge branch 'prepend-patch-for-pg' of github.com:okarsono/rack-mini-…
Browse files Browse the repository at this point in the history
…profiler into okarsono-prepend-patch-for-pg
  • Loading branch information
nateberkopec committed Dec 11, 2024
2 parents d5b895f + b1359dc commit d2228ae
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@ gem 'rack-mini-profiler', require: ['prepend_mysql2_patch', 'rack-mini-profiler'

This should not be necessary with Rails < 5 because peek-mysql2 hooks into mysql2 gem in different ways depending on your Rails version.

#### `pg` stack level too deep errors

If you encounter `SystemStackError (stack level too deep)` from PG, you'll need to use this gem spec in your Gemfile:

```ruby
gem 'rack-mini-profiler', require: ['prepend_pg_patch', 'rack-mini-profiler']
```

Or if you initially have `require: false`, then use

```ruby
gem 'rack-mini-profiler', require: ['prepend_pg_patch']
```

#### Rails and manual initialization

In case you need to make sure rack_mini_profiler is initialized after all other gems, or you want to execute some code before rack_mini_profiler required:
Expand Down

0 comments on commit d2228ae

Please sign in to comment.