Sass - 手表抛出错误“NameError:uninitialized constant Listen :: Listener”

时间:2014-02-10 18:49:17

标签: ruby compiler-errors sass

我正在跑步;

sass --watch --style compressed --sourcemap css/sass:css

我正在接受;

NameError: uninitialized constant Listen::Listener

使用--trace运行它会给我;

>>> Sass is watching for changes. Press Ctrl-C to stop.

/usr/lib64/ruby/gems/1.8/gems/sass-3.3.0.rc.3/bin/../lib/sass/plugin/compiler.rb:308:in `create_listener': uninitialized constant Listen::Listener (NameError)
from /usr/lib64/ruby/gems/1.8/gems/sass-3.3.0.rc.3/bin/../lib/sass/plugin/compiler.rb:233:in `watch'
from /usr/lib64/ruby/gems/1.8/gems/sass-3.3.0.rc.3/bin/../lib/sass/plugin.rb:108:in `send'
from /usr/lib64/ruby/gems/1.8/gems/sass-3.3.0.rc.3/bin/../lib/sass/plugin.rb:108:in `method_missing'
from /usr/lib64/ruby/gems/1.8/gems/sass-3.3.0.rc.3/bin/../lib/sass/exec.rb:509:in `watch_or_update'
from /usr/lib64/ruby/gems/1.8/gems/sass-3.3.0.rc.3/bin/../lib/sass/exec.rb:346:in `process_result'
from /usr/lib64/ruby/gems/1.8/gems/sass-3.3.0.rc.3/bin/../lib/sass/exec.rb:43:in `parse'
from /usr/lib64/ruby/gems/1.8/gems/sass-3.3.0.rc.3/bin/../lib/sass/exec.rb:22:in `parse!'
from /usr/lib64/ruby/gems/1.8/gems/sass-3.3.0.rc.3/bin/sass:13
from /usr/bin/sass:19:in `load'
from /usr/bin/sass:19

我很难解决如何解决这个问题;它看起来是我的SCSS文件中的错误以及我如何组合它们,或者我的sass gem /安装有问题?

编辑:版本细节

Sass 3.3.0.rc.3 (Maptastic Maple)
ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]

1 个答案:

答案 0 :(得分:1)

这个问题似乎是一个已知的problem with RC3 of Sass 3.3,我正试图用它来支持Sourcemaps。我在另一个盒子上使用了一个早期的RC,它工作正常,所以尝试在这里安装RC2,它解决了这个问题。

sudo gem uninstall sass
...
sudo gem install sass -v 3.3.0.rc.2