A Rack middleware for Rails >= 3.1.0 with asset pipeline and asset digest enabled. This middleware is used to redirect any request to static asset without a digest to the version with digest in its filename by reading the assets manifest file generated after you run `rake assets:precompile`
If I do
RAILS_ENV=production bundle exec rake middleware
I see the middleware correctly injected.
RAILS_ENV=stage bundle exec rake middleware
There is no sprockets::redirect middleware injected.
When debugging, the initializer is not run at all in stage env, but runs in production env. The config files are set correctly for both with
EDIT - Never mind. There was a typo in the gemfile -
staging
->stage
. That'll teach us to copy and paste from docs.