I’m trying to add a background-image in a ‘css.scss’ file. I keep getting this error:
Invalid CSS after “…und-image: url(“: expected “)”, was “<%= asset_path(…”
(in /Users/caseyrees/Projects/citycreek/app/assets/stylesheets/custom.css.scss)
This is how I am writing it:
background-image: url( <%= asset_path 'home/facebook.png' %>);
If I change the file extension to ‘css.erb’ it seems to work. I need this to work with the .scss file extension.
You dont want to write
assert_path, try this, (from one of my working css.scss files)and my
footer_bg.jpgimage is inapp/asset/imagesHTH