I'm working on a Rails app and trying to get rack-mini-profiler running in Production env. Things are partly working, but there's a few issues I'm having trouble sorting out.
Our config's using Passenger 4.0.53 with Apache/SSL, Ruby 2.0/Rails 3.2
Passenger's got a RackBaseURI set to "/web/", and we use config.action_controller.relative_url_root = "/web" (using RailsBaseURI makes no difference here)
Initially the request to /mini-profiler-resources/includes.js would fail with a 404 (no leading /web/ so Passenger never got it), so I added a RedirectMatch:
RedirectMatch ^/mini-profiler-resources(.*)$ /webui/mini-profiler-resources$1
This got the JS/CSS/jquery-tmpl to load, and things sort of work. I can append pp=help to get help, though the URLs are all missing the '/web/' prefix. Using ?pp=analyze-memory, etc work with a fixed path, and I see files building up in tmp/miniprofiler with interesting content
When we load the pages, the Profiler box never appears, and we get a lot of 404 errors for
I think this may an attempt to POST that's choking on the redirect (no idea, really, though)
I tried to pull the redirect and set
Rack::MiniProfiler.config.base_url_path = '/web/' but this caused 500 errors with things like:
ActionController::RoutingError (No route matches [GET] "/monitoring/web/includes.js")
Trying base_url_path = '/web/mini-profiler-resources/' also throws 500 errors with:
ActionController::RoutingError (No route matches [GET] "/mini-profiler-resources/includes.js")
the base_url_path is a bit of a mystery...
Is there a way to configure rack-mini-profiler to be aware/use the RackBaseURI prefix so I can get rid of the Apache redirect and get the resources to use the desired path?