Rails 3.1 asset pipeline referencing the wrong image
In my application.css.scss
I reference an image like this:
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 perfectly fine in dev.
I'm deploying to Heroku, so I need to precompile the assets. After I run rake assets:precompile
the comiled files show up in public/assets/
and my background.png gets this filename: background-876262e736e0b48500313d1a48005396.png
(no surprise, I know it's the fingerprint).
What baffles me is that the compiled application-7665539658a117373a79cd8568f36315.css
tries to load /assets/background-61d37b9fc285589fc0016694e6f8d134.png开发者_如何学编程
, which clearly is the wrong fingerprint.
So I deleted all files from public/assets/
and compiled again, added the new files to git (and removed the old ones), committed and pushed to Heroku - but no luck: the CSS still uses the wrong background-xyz.png
.
Does anybody know how to resolve this?
i think there was an issue in the Rails Github issue tracker about this: https://github.com/rails/rails/issues/2569
精彩评论