Closed tiborp closed 10 years ago
I'm experiencing the same problem on Windows 7. I've also checked my gem list and "--force" does the same as described by @tiborp
$ grunt
Running "clean:build" (clean) task
Cleaning build...OK
Running "sass:build" (sass) task
ERROR: Cannot load compass.ERROR: Cannot load compass.
Warning: Exited with error code 1 Use --force to continue.
Aborted due to warnings.
Can you try which compass
and gem list
?
Thx for chiming in Cooper!
which compass
returns: /usr/bin/compass
gem list
returns:
*** LOCAL GEMS ***
CFPropertyList (2.2.0)
chunky_png (1.3.0)
compass (0.12.4)
fssm (0.2.10)
libxml-ruby (2.6.0)
nokogiri (1.5.6)
sass (3.3.4, 3.2.18)
sqlite3 (1.3.7)
$ which compass
/c/Ruby200-x64/bin/compass
$ gem list
*** LOCAL GEMS ***
bigdecimal (1.2.0)
chunky_png (1.3.0)
compass (0.12.3)
fssm (0.2.10)
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-update (2.2.2)
sass (3.3.3, 3.2.14)
test-unit (2.0.0.0)
It looks like you both have Compass correctly installed as a Gem. Next thing to try: I'd removed Compass's config.rb
file, as Grunt didn't seem to require it in my testing, but let's try adding it back.
Can you try adding this file (basic Compass config file) to the same directory as Gruntfile.js
?
Tried it, but still getting the same error.
I also tried to uninstall one of the sass versions (I thought that maybe re-installing it would be an idea) with gem uninstall sass
, but then get the following FilePermissionError:
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
The same goes when trying gem uninstall compass
:
You don't have write permissions for the /usr/bin directory
Could this be related to the problem?
Adding config.rb
doesn't work for me either.
I was running Sass 3.2.x. When I run gem update sass
, I start seeing this problem.
I looks like the issue has been reported in grunt-contrib-sass here. I think the most "stable" solution seems to uninstall Compass and Sass, then run gem install compass
to get a compatible version of Sass.
If you want to live on the edge, you can install Compass 1.0 with gem install compass --pre
, see here: https://github.com/nex3/sass/issues/1165. I tried this solution, and the error goes away for me.
Ah! I started with gem uninstall sass
(had to sudo it btw) and then uninstalled version 3.3.4, which left me with 3.2.18; that also did the trick. I just ran grunt
succesfully and the watch task is now silently waiting for me :-)
Thanks a lot for the tips & looking forward to playing with it!
gem install compass --pre
did the job for me, thank you! :tada:
Woo! Closing this one out. Thanks for bringing it to my attention.
Thanks gem install compass --pre
:dancer:
I'm pretty new to Grunt (and this workflow all together), so bare with me if this is a stupid newbie question...
I installed everything as by the instructions, but when trying the 'grunt' command (or after changing a file with "grunt watch' active) I keep getting the following error:
Running "sass:build" (sass) task ERROR: Cannot load compass. Warning: Exited with error code 1
Proceding with --force does not work either (same error).
It does make the build directory, but leaves just an empty style.css file in it.
When I look at 'gem list' I can see both compass & sass are installed: compass (0.12.4) sass (3.3.4, 3.2.18)
This is on MacOSX 10.9.2 (Maverick).
Hope someone can help me on my way. Thanks in advance!