undefined方法“ []”,用于“图像”:Sass :: Script :: Value :: Strings in rails 5.0.7

时间:2018-07-12 11:39:55

标签: ruby-on-rails ruby-on-rails-5

  While upgrading from rails 3 to rails 5 facing issue?

  'undefined method `[]' for "image":Sass::Script::Value::String'
   Used gem 'sass-rails'

Rails 5中图像URL的语法不兼容

也尝试过

asset-url("rails.png", image) 

 asset-url("rails.png")

 asset_url

 image_url

 image-url

 asset-url

 image: asset_url("back.png");

 { background-image: url("back.png"); }

 background-image: image_url('metal_texture.jpg')

 asset-url("fontawesome-webfont.eot", font);

 image-url("fontawesome-webfont.eot", font);

甚至没有解决问题

0 个答案:

没有答案