Sass with erb won't compile
This is indeed a problem with sass-rails
, as discussed on GitHub.
So this guy wrote this patch, which completely solves the problem.
The Solution
Add to Gemfile
:
gem "sass_rails_patch", "~> 0.0.1"
then run bundle
and you're good!
You can use asset helpers if the erb is only for referencing assets:
background-image: asset-url("rails.png")
...instead of...
background-image: url("<%= image_path('rails.png') %>");