Last Updated: February 25, 2016
·
203
· jmalley

PSA: Rails Precompilation and CSS image references

Are only some of your assets being served successfully from S3 or elsewhere? Are the images referenced within your .scss files not getting fingerprinted correctly? It's subtle, and it caused me 3 hours of confusion today, but you have to use a specific tag in your sass files if you want, say, background images to be fingerprinted and served through the asset pipeline correctly.

Instead of

background: url('image.png')

...you have to do

background: image-url('image.png')

I'm fairly sure this is only for Sass, but if you are troubleshooting, this might be your answer!