rack-mini-profiler: Not showing in Rails 4
When I include the gem in my rails app the profiler is not shown. However, the javascript is included and the div is created for the widget, but the final content is empty.
I tried adding Rack::MiniProfiler.authorize_request in a before_filter in my application controller: no dice.
I tried creating an initializer and add require: false in the gem file as described in the README: no profiler.
I am using puma, rails 4.0.1, and ruby ruby 2.0.0p247
Any tips?
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Reactions: 2
- Comments: 34 (5 by maintainers)
Disabling Rack::Deflater in development fixed things for me.
Commenting that out and restarting
rails smade the profiler work in development on rails 4.2.6 ruby 2.3.1 with the Gemfile-only default setup.We were missing the badge, and it turned out it was because we were using
heroku_rails_deflate. Usingheroku-deflaterseems to not break the badge.The problems seem to occur around https://github.com/MiniProfiler/rack-mini-profiler/blob/f580d609677c0792b9685d555ffa7c1378c15787/lib/mini_profiler/profiler.rb#L378 when body turns out not to be a String.
This still happens for me unless I remove
oj_mimic_json, which I’d like to use.I didn’t have the
oj_mimic_jsongem, but removingheroku-deflatorworked for me.For me, removing Deflater from
config/application.rband moving it to production fixed the issue. As suggested here: http://stackoverflow.com/questions/17025563/how-to-get-mini-profiler-to-start-in-railsI think I’ve tracked my issue down to a log permissions error. I haven’t bothered to fix it yet though.