1

I'm deploying my application and I'm having trouble with the images in my application.css.sass file. When I visit my page, the css links to something like icon-login.png but thanks to the fingerprint from precompile the actual filename is icon-login-f0a51964c9ccbe966746b66d7f2ad310.png.

When I check images that are placed in the erb code (so not from a stylesheet) they refer to the right images with the fingerprint.

What's the best way to fix this problem?

Peter Boomsma
  • 8,851
  • 16
  • 93
  • 185
  • possible duplicate of [Rails 3.1 Asset Pipeline - Why should I use the Asset Helpers in a SCSS file?](http://stackoverflow.com/questions/7947967/rails-3-1-asset-pipeline-why-should-i-use-the-asset-helpers-in-a-scss-file) – cimmanon Feb 03 '15 at 15:22
  • Well, found the answer. Ofcourse after posting. It's changing `background: url('icon-#{$icon}.png') $blue no-repeat 7px 7px` to `background: image-url('icon-#{$icon}.png') $blue no-repeat 7px 7px` adding the image to the url worked. – Peter Boomsma Feb 03 '15 at 15:26

1 Answers1

0

Apparently you can't use

background url(filename.jpg)

You need,

background image-url('filename.jpg')

also notice the extra dashes around the filename.jpg

Peter Boomsma
  • 8,851
  • 16
  • 93
  • 185