我在3.2.1上,用sass-rails-3.2.4和sass-3.1.15 ...sass-rails帮手“image-url”,“asset-url”在rails中不起作用3.2.1
的资产管道的文件说:
asset-url("rails.png", image) becomes url(/assets/rails.png)
image-url("rails.png") becomes url(/assets/rails.png)
...
所以我做了以下文件:
# app/assets/stylesheets/public/omg.css.sass
body
background: asset-url('snake.gif', image)
#lol
background: image-url('snake.gif')
,当我访问本地主机:3000/AS套/公/ omg.css我得到:
body {
background: asset-url("snake.gif", image); }
#lol {
background: image-url("snake.gif"); }
...我也试图改变文件omg.css.scss,并改变了语法:
# app/assets/stylesheets/public/omg.css.scss
body {
background: asset-url('snake.gif', image);
}
#lol {
background: image-url('snake.gif');
}
但得到相同的结果...有没有人有任何想法为什么这些助手不工作?
您是否曾经为此找到过解决方案? – 2012-03-02 23:58:52
我的项目有2个样式表(一个用于网页,另一个用于应用程序)。我遇到了这个问题,但不是另一个? – Forrest 2012-04-11 23:46:25