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

后端 未结 9 2118
一整个雨季
一整个雨季 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:23

    We just had the same problem and fixed it by explicitly requiring sprockets in the Gemfile (even though it's a dependency of ActionPack):

    group :assets do
      gem 'sprockets'
      gem 'sass-rails', '~> 3.2.3'
      # ...
    end
    

    I don't know why, but it works now. ;-)

提交回复
热议问题