Rails 3.1 resource pipeline referencing the wrong image

In my application.css.scss I reference the image as follows:

 body { background: #7d9ec4 url(asset-path('background.png', image)) no-repeat fixed bottom center; } 

It is located in app/assets/images/background.png and it works fine in dev.

I am deploying to Heroku, so I need to pre-assemble the assets. After running rake assets:precompile compiled files appear in public/assets/ , and my background.png gets this file name: background-876262e736e0b48500313d1a48005396.png (no wonder I know its fingerprint).

What confuses me is that the compiled application-7665539658a117373a79cd8568f36315.css tries to load /assets/background-61d37b9fc285589fc0016694e6f8d134.png , which is clearly the wrong fingerprint.

So, I deleted all the files from public/assets/ and compiled again, added new files to git (and deleted the old ones), committed and clicked on Heroku - but no luck: CSS still uses the wrong background-xyz.png .

Does anyone know how to solve this?

+4
source share
1 answer

I think there was a problem in the Rails Github log: https://github.com/rails/rails/issues/2569

+1
source

All Articles