I must to enable rack-mini-profiler for dev and production. In ApplicationController I have:
before_filter :miniprofiler
def miniprofiler
Rack::MiniProfiler.authorize_request #if current_user.admin?
end
In config/initializers/rack_profiler.rb
if Rails.env == 'development'
require 'rack-mini-profiler'
Rack::MiniProfilerRails.initialize!(Rails.application)
end
In dev environment all works fine, but when i push to staging on Heroku, server falls with the
NameError (uninitialized constant Rack::MiniProfiler)
in this line
Rack::MiniProfiler.authorize_request #if current_user.admin?
I tried add
reqire 'rack-mini-profiler' to ApplicationController
but then I cann't even push it to staging with
Push rejected, failed to compile Multipack app
What i am missing?