If you're trying to install rack-mini-profiler and it's missing in production, the likely cause is the order of your middleware.
Run this command
RAILS_ENV=production rake middleware
And then double check that that the Rack::MinProfiler is after any "deflating" middlewares.
This worked for me:
# CRITICAL TO DO THIS REQUIRE
# CRITICAL that we load MiniProfiler after the Deflators
# See https://github.com/MiniProfiler/rack-mini-profiler/issues/134#issuecomment-126648241
if Rails.env.production? or Rails.env.staging?
Here are a few related issues. This is a yak shave for many:
The tool is good enough and popular enough that I deem this effort a worthwhile, albeit a painful, endeavor!