11

关于这个错误的任何想法 - sass 编译失败 - 已尝试 gem update --system 和 gem update 并删除并重新安装 sass gem

sudo sass --update --trace styles.scss overwrite styles.css
Password:
/Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/plugin/staleness_checker.rb:27: uninitialized constant Sass::Plugin::StalenessChecker::Mutex (NameError)
    from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `gem_original_require'
    from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/plugin/compiler.rb:7
    from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `gem_original_require'
    from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/plugin.rb:4
    from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `gem_original_require'
    from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `require'
    from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/exec.rb:381:in `watch_or_update'
    from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/exec.rb:326:in `process_result'
    from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/exec.rb:41:in `parse'
    from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/exec.rb:21:in `parse!'
    from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/sass:9
    from /usr/bin/sass:23:in `load'
    from /usr/bin/sass:23
4

3 回答 3

37

今天我开始出现同样的问题。我想 sass-3.2.11 或某些我不知道的配置有问题。

为了暂时解决这个问题,我卸载了新版本并安装了旧版本,如下所示:

卸载 sass

gem uninstall sass

安装版本 3.2.10

gem install sass --version 3.2.10

重新安装指南针

gem install compass
于 2013-09-29T01:03:54.533 回答
1

这已在 sass 3.2.12 中修复。

Sass 问题队列

所以你需要做的就是更新你的 sass gem

gem install sass

应该拉最新版本 3.2.12 或更高版本

于 2013-10-10T18:07:23.710 回答
0

我之前已经更新了默认的 OSX 版本:

gem update --system

这就产生了问题——在“开箱即用”的 OSX 版本上做这件事不是一个好主意。

于 2013-09-29T03:06:37.497 回答