What causes this error in grunt-contrib-compass after update to Yosemite?

那年仲夏 提交于 2019-11-29 18:55:41

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/26423705/what-causes-this-error-in-grunt-contrib-compass-after-update-to-yosemite

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!