【问题标题】:What causes this error in grunt-contrib-compass after update to Yosemite?更新到优胜美地后,是什么导致 grunt-contrib-compass 出现此错误?
【发布时间】:2014-12-12 23:01:43
【问题描述】:

我正在使用 Yeoman。升级到Yosemite后,任务grunt servergrunt build抛出这个错误:

/Users/rogerfuentes/Documents/Web/Kelios/test/node_modules/grunt-contrib-compass/node_modules/tmp/lib/tmp.js:261
throw err;
        ^
Error: spawn ENOENT
    at errnoException (child_process.js:1001:11)
    at Process.ChildProcess._handle.onexit (child_process.js:792:34)

是什么导致了这个错误,如何解决?

【问题讨论】:

  • 很遗憾,我没有答案,但我会将您的经验作为建议,然后等待安装。

标签: gruntjs yeoman osx-yosemite grunt-contrib-sass


【解决方案1】:

如果你在终端窗口运行 compass,你会看到如下错误:

-bash: /usr/bin/compass: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: 错误的解释器:没有这样的文件或目录

如果您转到/System/Library/Frameworks/Ruby.framework,您将看到安装已将 Ruby 版本更新到 2.0。这就是运行指南针失败的原因,因为不再有 ruby​​ 1.8。

解决方案是通过运行在 Yosemite 上重新安装指南针:

xcode-select --install
sudo gem update --system
sudo gem install compass

【讨论】:

  • 感谢您澄清原本不透明的错误消息 :)
  • 将 .RB 和 .RBW 作为 %PATHEXT%;.RB;.RBW 添加到变量值列表中,然后单击确定。
猜你喜欢
  • 2014-12-13
  • 1970-01-01
  • 1970-01-01
  • 2015-01-04
  • 1970-01-01
  • 2014-12-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多