Reputation: 31
In my land.css.scss I've got:
header { background: image-url( "logo.png" ) no-repeat scroll 0 0; }
When in dev mode that gets properly transformed to:
header { background: url(/assets/logo.png) no-repeat scroll 0 0; }
But when in production mode after rake assets:precompile logo.png gets copied to:
public/assets/logo-46ff46dc41a0f734725d64d2764ebbeb.png
But the application.css generated still has
header { background: url(/assets/logo.png) no-repeat scroll 0 0; }
and does not add the hash at the end of the img path.
Any idea is greatly appreciated!
Note: Assets defined in the html.erb files are properly managed. image_tag "slide.png" is properly compiled into .png"/> :P
Upvotes: 3
Views: 254
Reputation: 391
Compile assets with following command:
$ bundle exec rake assets:precompile RAILS_ENV=production RAILS_GROUPS=assets
See http://railsblog.kieser.net/2013/08/rails4-phusion-passenger-asset-pipeline.html
Upvotes: 1