New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asset compilation doesn't appear to add fingerprints #10551
Comments
This may be related to rails/sass-rails#152 |
|
Ah, yes, running assets:precompile in RAILS_ENV=production works. This still seems like a bug, as it should be consistent whichever environment you are in. |
Nope, you're supposed to only compile in production now. |
In which case it should fail with a useful error message, rather than silently producing the wrong thing. I seriously doubt I'll be the last person caught by this. |
I've done a PR on sprockets-rails with a warning message. Maybe this will help someone. |
I'm the maintainer of the jquery-ui-rails gem, and I just spent 30 minutes tracking this down because somebody had reported an issue on jquery-ui-rails -- only to discover that it's a weird problem with how Rails requires you to explicitly set the environment. Because of that, I'd like to second the request that Rails at least handle this more gracefully. It seems it would cause less work for all of us. |
On Rails 4.0.0-rc1, asset precompilation doesn't seem to add the fingerprints to asset paths in the compiled CSS.
rake assets:precompile
/assets/checker.png
without the fingerprint. See https://github.com/Floppy/asset_test/blob/master/public/assets/application-e3222182f0b42247418ecea85ef5bd66.cssI'd expect it to reference the fingerprinted version at
assets/checker-b7e280146cd5db817134e79696b7ca07.png
, which has been generated by the precompilation step. The precompilation doesn't generate a non-fingerprinted version of the image file in thepublic/assets
directory, which would be required for the CSS to work.Am I misunderstanding, or doing something stupid, or is this a bug? This was the default out-of-the-box behaviour, with as little code changed as possible.
The text was updated successfully, but these errors were encountered: