Grunt task Compass fails - Could not find RubyGem compass (>= 0)

我的未来我决定 提交于 2019-12-07 06:15:41

问题


I recently transfered machines from an iMac to a new Mac Book Pro with Mavericks. All was well but I noticed that Grunt was crashing when I saved a file (the auto update wasn't working). I tried to update my system but when I run my grunt tasks via the terminal I get the following error:

Running "compass:dev" (compass) task
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem compass (>= 0) (Gem::LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in `activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
    from /usr/bin/compass:18

Would anyone have any advice on how to fix this? I have removed compass from my project and done an npm install, nothing has changed.

When I run $ gem list I get the following:

*** LOCAL GEMS ***

bigdecimal (1.2.0)
bundler (1.5.1)
bundler-unload (1.0.2)
executable-hooks (1.2.6)
gem-wrappers (1.2.4, 1.2.1)
io-console (0.4.2)
json (1.7.7)
minitest (4.3.2)
psych (2.0.0)
rake (0.9.6)
rdoc (4.0.0)
rubygems-bundler (1.4.2)
rvm (1.11.3.8)
test-unit (2.0.0.0)

I then tried running $ sudo gem update --system but I got hte following response: Latest version currently installed. Aborting.

Any ideas, anyone?


回答1:


Looks like SASS and Compass gems are missing, try installing SASS & Compass

sudo gem install sass

sudo gem install compass

For windows use following commands

gem install sass

gem install compass

Hope this works :)




回答2:


this is what I had to do. I uninstalled and reinstalled sass and compass then run: bundle update i18n

Everything seemed to work after that!



来源:https://stackoverflow.com/questions/21015705/grunt-task-compass-fails-could-not-find-rubygem-compass-0

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