sikachu / sprockets-redirect

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`
http://rubygems.org/gems/sprockets-redirect
MIT License
72 stars 26 forks source link

Issue when RAILS_ENV is not `production` #15

Closed jeffling closed 6 years ago

jeffling commented 6 years ago

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

config.assets.compile = false
config.assets.digest = true

EDIT - Never mind. There was a typo in the gemfile - staging -> stage. That'll teach us to copy and paste from docs.