Gruntjs 更新到约塞米蒂后,是什么导致grunt contrib compass出现此错误?

Gruntjs 更新到约塞米蒂后,是什么导致grunt contrib compass出现此错误?,gruntjs,yeoman,osx-yosemite,grunt-contrib-sass,Gruntjs,Yeoman,Osx Yosemite,Grunt Contrib Sass,我用的是约曼。升级到Yosemite后,任务grunt server和grunt 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:10

我用的是约曼。升级到Yosemite后,任务
grunt server
grunt 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)

导致此错误的原因是什么?如何修复此错误?

如果在终端窗口上运行compass,您将看到以下错误:

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

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

解决方案是通过运行以下命令在约塞米蒂重新安装compass:

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

很遗憾,我没有答案,但我将使用您的经验作为建议,我将等待安装。感谢您澄清一条不透明的错误消息:)将.RB和.RBW添加到变量值列表中,作为%PATHEXT%;。RB;。单击RBW并单击OK。