Nathan
Nathan

Reputation: 1984

MiniProfiler not showing up on the page

I’m having problems getting MiniProfiler to show me the reports. I’m just in the Dev environment, which should show it all the time. Adding ?pp=help does bring up the help page. In tmp/miniprofile, there are a ton of mp_timers_ files. Apparently something is happening back there.

At first I thought it was a weird CSS issue, like my navigation bar is covering it. I tried loading the page without CSS and the MiniProfile box still doesn’t show up.

In case it matters, I do not have a before_filter set up. When I use the simple one from their docs, though, it doesn't help anything.

Upvotes: 11

Views: 4735

Answers (4)

notapatch
notapatch

Reputation: 7163

MiniProfiler can also be set hidden by default

# config/initializers/mini_profiler.rb   
Rack::MiniProfiler.config.start_hidden = true

Upvotes: 0

rassom
rassom

Reputation: 2966

I didn't have it show up either due to having an old version of the gem without the currently needed initializer.

To fix it, I just ran the generator which added an initializer to set up rack-mini-profiler in development:

bundle exec rails g rack_profiler:install

Upvotes: 1

marcamillion
marcamillion

Reputation: 33745

I know this is very late, but another potential issue that may cause this problem is JS errors.

If there are any unresolved JS errors, the badge likely won't show up.

So make sure to squash those before pulling your hair out.

Upvotes: 5

User128848244
User128848244

Reputation: 3470

My first thought is that it is disabled by default. If that is the case you will not be able to see the help page. From what you described it seams to be working. So my solutions is to type this into the browser and see what happens.

http://localhost:3000/?pp=enable

after that you should be able to get to help page.

http://localhost:3000/?pp=help

Upvotes: 9

Related Questions