Search code examples
ruby-on-railsrails-adminrack-mini-profiler

Rails Admin & Mini Profiler


I am using rack mini profiler in my Rails application. In addition, I am using Rails Admin as my admin tool.

I am receiving the following message when looking at the dashboard:

Model 'Mini-profiler-resources' could not be found

Any clue on how to fix this?


Solution

  • I run into the same problem. My solution was tested with rails_admin (0.6.1) and cancan (1.6.10).

    mini-profiler config contains field called skip_paths. The solution is to set this field in the initializer.

    1. Edit (create if not exists) config/initializers/mini_profiler.rb.
    2. Add path you want to ignore. For rails_admin, /admin should be ignored: Rack::MiniProfiler.config.skip_paths ||= [] Rack::MiniProfiler.config.skip_paths << '/admin'