更新至Yosemite后,grunt-contrib-compass中导致此错误的原因是什么? [英] What causes this error in grunt-contrib-compass after update to Yosemite?
问题描述
grunt server
和 grunt build
会抛出此错误: /Users/rogerfuentes/Documents/Web/Kelios/test/node_modules/grunt-contrib-compass/node_modules/tmp/lib/tmp.js:261
抛出错误;
^
错误:在errnoException(child_process.js:1001:11)产生ENOENT
Process.ChildProcess._handle.onexit(child_process.js:792:34)
造成这个错误的原因是什么?如何解决?
<如果您在终端窗口上运行指南针,您将看到以下错误:
$ b $ b-bash:/ usr / bin / compass:/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby:糟糕的解释器:没有这样的文件或目录
如果您转到 /System/Library/Frameworks/Ruby.framework
,您会看到安装已经将Ruby版本更新为2.0。这就是为什么运行指南针失败的原因,因为没有红宝石1.8了。
解决方案是通过运行以下命令重新安装优胜美地指南针:
xcode-select --install
sudo gem update --system
sudo gem install compass
I am using Yeoman. After upgrading to Yosemite, the tasks grunt server
and grunt build
throw this error:
/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)
What is causing this error, and how can it be fixed?
If you run compass on the terminal window, you will see the following error:
-bash: /usr/bin/compass: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
If you go to the /System/Library/Frameworks/Ruby.framework
, you will see the installation has updated Ruby version to 2.0. That's why running the compass fails, because there is no ruby 1.8 anymore.
The solution is to re-install compass on Yosemite by running:
xcode-select --install
sudo gem update --system
sudo gem install compass
这篇关于更新至Yosemite后,grunt-contrib-compass中导致此错误的原因是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!