Question

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?

Was it helpful?

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'

OTHER TIPS

I got the same issue.

my workaround is disable mini-profiler when visiting rails_admin, couple steps

  1. change mini_profiler.rb inside initialisers, add

    Rack::MiniProfiler.config.authorization_mode = :whitelist

  2. change application_controller

    before_filter :mini_profiler, unless: :rails_admin_path?

do not run mini_profiler if current request path is 'rails_admin' path

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top