sass-rails helpers “image-url”, “asset-url” are not working in rails 3.2.1

后端 未结 9 2121
一整个雨季
一整个雨季 2020-12-12 20:36

I am on 3.2.1, with sass-rails-3.2.4 and sass-3.1.15...

The documentation for the asset pipeline says:

asset-url(\"rails.png\", image) becomes url(/a         


        
9条回答
  •  盖世英雄少女心
    2020-12-12 21:09

    Have you enabled the asset pipeline in application.rb?

    config.assets.enabled = true
    

    You did right by setting the extension on your Sass stylesheets to .css.scss. That lets Rails know to parse the file with Sass first before it emits the content as CSS.

提交回复
热议问题