Reputation: 815
I'm having a problem with my compass watch command - it worked fine up until a few days ago. I have made no changes to my config files.
I reinstalled Compass, used rvm to update Ruby. I checked my custom_require.rb file but I really don't know what to look for. It seems to be trying to load the file "sass/script/node" somewhere and from http://sass-lang.com/docs/yardoc/Sass/Script/Node.html
I gather the filepath - but I have nothing there.
/Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require': cannot load such file -- sass/script/node (LoadError)
from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches/browser_support.rb:1:in `<top (required)>'
from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:2:in `block in <top (required)>'
from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `each'
from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `<top (required)>'
from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9:in `<top (required)>'
from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass.rb:5:in `block in <top (required)>'
from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass.rb:4:in `each'
from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/lib/compass.rb:4:in `<top (required)>'
from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/sampurcell/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:20:in `block in <top (required)>'
from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:8:in `fallback_load_path'
from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/gems/compass-0.12.2/bin/compass:19:in `<top (required)>'
from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/bin/compass:19:in `load'
from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/bin/compass:19:in `<main>'
from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/sampurcell/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
Anyone have any ideas?
Upvotes: 71
Views: 45319
Reputation: 1617
I had the same problem and then I realised that I had two compass versions, so by doing:
compass watch
or compass compile
The compiler didn't know which compass version it should use to compile. So, what you can do is explicitly indicate the compass version to work with:
compass _1.0.3_ watch
There's another interesting thread.
Upvotes: 1
Reputation: 1782
I was able to fix it by doing this
gem uninstall sass
gem install sass -v 3.2.12
This is definitely due to a version dependency issue, you are better off fixing your grunt task to make it forward compatible with the newer versions of saas, compass and so on.
Upvotes: 2
Reputation: 2911
I had to setup a gemfile with the correct versions (this error is caused by mismatched SASS and Compass versions, for me). I used thew following with bundle install
to fix the problem:
source "https://rubygems.org"
gem 'bootstrap-sass', "~> 3.2.0"
gem 'sass', [ "< 3.5" , ">= 3.3.13" ]
gem 'compass', "~> 1.0.1"
gem 'compass-core', "~> 1.0.1"
gem 'compass-import-once', "~> 1.0.5"
gem 'chunky_png', "~> 1.2"
gem 'rb-fsevent', ">= 0.9.3"
gem 'rb-inotify', ">= 0.9"
Upvotes: 0
Reputation: 35914
I believe this is due to versioning conflicts with sass.
https://rubygems.org/gems/compass gem is currently at v0.12.16
currently - add this to Gemfile
gem 'sass', '3.2.19'
gem 'compass', '0.12.6'
You may be required to uninstall all versions of both gems first.
Upvotes: 3
Reputation: 3075
In my case, Sass version was not compatible with Compass.
FIX :
uninstall Sass AND Compass
gem uninstall compass
gem uninstall sass
install Compass who will install a compatible Sass engine automaticaly
gem install compass
Upvotes: 24
Reputation: 1204
The following combinations worked for me:
gem install compass --pre
gem install sass -v 3.3.3
Upvotes: 0
Reputation: 10112
A variation on the above answers: for me (using Bootstrap for Sass), it turned out to be
gem install bootstrap-sass
that was needed in order to fix this problem. For me, the LoadError problem with Compass started after I updated the version of Ruby I was using.
Upvotes: 3
Reputation: 6871
In case you are using Ubuntu it may be a problem with apt-get and rvm colliding.
Try removing rvm with rvm implode
and then run
sudo apt-get install ruby-compass
compass watch
worked for me after that.
Upvotes: 4
Reputation: 16924
Uninstall sass and reinstall it with the following:
gem uninstall sass
gem install sass
There was an issue with my installation of sass and doing this fixed the issue.
Upvotes: 113
Reputation: 1818
This combination is finally working for me to bring Compass and SASS Sourcemaps together:
gem 'sass', '3.3.0.alpha.149'
gem 'compass', '0.12.2'
gem 'compass-sourcemaps', "~> 0.12.2.sourcemaps.57a186c"
sass_options = {:sourcemap => true}
Upvotes: 13
Reputation: 15007
This specific version works well on both:
gem 'sass', '3.3.0.alpha.149'
gem 'compass', '0.12.2'
They might not be compatible with each other that's why you're getting those errors (considering you're using a bleeding edge version).
Upvotes: 10