Simple question:
I've got a Rails 3.1 app running in staging, which is RAILS_ENV=production
. My problem is this: stylesheet_link_tag
produces a different fingerprint for my css files than the fingerprint that was produced by rake assets:precompile
.
So when I request a page, the link to the stylesheet is looking for a file like:
/assets/front-1e3a4454e0d5434eccac1a053ca4c7fd.css
but in reality the file sitting in public/assets is
front-60b624d69d97b3ac5f288c54245a5ed5.css
and the browser returns a 404 Not Found.
Here is my linlk stylesheet_link_tag :front
. Can anybody expla开发者_JS百科in to me why this happens?
I've been having the same exact issue. Best I can tell, this occurs when the precompile task runs during a capistrano deploy. I've had to remove the precompile from deployment and run the
rake assets:precompile RAILS_ENV=production from the release directory after the app has been deployed. It's a pain if you're pushing code frequently.
精彩评论