ruby-on-railsruby-on-rails-4rack-mini-profiler

how to get mini-profiler to start in rails


I've installed mini-profiler gem in a Rails 4 (rc1) application but when I load the application it's not showing the little window with load time statistics in the browser.

According to the Railscast I'm watching, it should start working after adding it to the gemfile, running bundle and restarting the application.

Can you suggest what I might do to get it working?

Gemfile

gem 'rails', '4.0.0.rc1'

gem 'devise', '3.0.0.rc'
gem "rolify"
gem  'cancan'
gem 'simple_form', '3.0.0.rc'
gem 'backbone-on-rails'
gem 'geocoder'
gem 'pg_search'
gem 'sidekiq'

gem 'gmaps4rails'

# Use postgresql as the database for Active Record
gem 'pg'
gem 'will_paginate'
gem "figaro", ">= 0.6.3"
gem 'stripe'
gem "stripe_event"
gem 'jquery-turbolinks'
gem 'dalli'


# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0.rc1'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'



# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.0.1'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end
gem 'rack-mini-profiler'

Solution

  • I ran into the same problem and got it to work by adding this to config.ru:

    require 'rack-mini-profiler'
    use Rack::MiniProfiler