I'm loading the background image bg.jpg image in a SCSS file, style.css.scss
background: url(/assets/bg.jpg) no-repeat center center;
After precompilation, Sprockets places a copy of the image in the /public/assets directory with a fingerprinted name bg-28779d74f8a6fc51d1b46376428bed54.jpg . And I also can access the image itself from the browser at the /assets/bg-28779d74f8a6fc51d1b46376428bed54.jpg link.
But when I reaload the page in the browser, the background image is not displayed and when I check the CSS in Dev Tools for that particular element I see:
background: url(/assets/bg.jpg) no-repeat center center;
Shouldn't that be
background: url(/assets/bg-28779d74f8a6fc51d1b46376428bed54.jpg ) no-repeat center center;
LE: I also precompile the assets with rake assets:precompile having the RAILS_ENV set to production. I thought it would be a good idea to mention this since I noticed many other people had problems because of this. sass-rails helpers "image-url", "asset-url" are not working in rails 3.2.1