加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – Rails3和Sass :: Plugin :: options

发布时间:2020-12-17 03:33:58 所属栏目:百科 来源:网络整理
导读:当我尝试将Sass :: Plugin.options [:style] =:compact添加到environment.rb时 当我尝试启动我的服务器时,我得到: uninitialized constant Sass (NameError) 我在我的Gemfile中添加了gem’haml’,’3.0.0′. 有人遇到过这个吗? 解决方法 我尝试了你所描
当我尝试将Sass :: Plugin.options [:style] =:compact添加到environment.rb时

当我尝试启动我的服务器时,我得到:

uninitialized constant Sass (NameError)

我在我的Gemfile中添加了gem’haml’,’3.0.0′.

有人遇到过这个吗?

解决方法

我尝试了你所描述的,它对我来说很好.我正在使用haml 3.0.4这是最新版本.您可能希望在系统上运行gem update haml并再试一次.从3.0.0到3.0.4的更改列表是 http://sass-lang.com/docs/yardoc/file.SASS_CHANGELOG.html

我还建议不要将它放在你的environment.rb中,而是创建一个config / initializers / sass_config.rb文件并将你的SASS配置放在那里.我看起来像这样:

Sass::Plugin.options[:property_syntax] = :old
Sass::Plugin.remove_template_location("./public/stylesheets/sass")
Sass::Plugin.add_template_location("./app/stylesheets")

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读