ruby 1.9.1 error after installing compass gems - ruby

I installed compass on ubuntu 12.04 like so:
sudo gem install compass
sudo gem install sass
But after running this command:
compass version
I get this error:
/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:135:in require': cannot load such file -- sass/script/node (LoadError)
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:135:inrescue in require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:144:in require'
from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches/browser_support.rb:1:in'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:2:in block in <top (required)>'
from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:ineach'
from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in <top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in require'
from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9:in'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in require'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass.rb:5:in block in <top (required)>'
from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass.rb:4:ineach'
from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass.rb:4:in <top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in require'
from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/bin/compass:20:inblock in '
from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/bin/compass:8:in fallback_load_path'
from /usr/lib/ruby/gems/1.9.1/gems/compass-0.12.2/bin/compass:19:in'
from /usr/bin/compass:23:in load'
from /usr/bin/compass:23:in'
when i run this:
ruby -v
I get:
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
What need to be fixed here.
Solution:
As mentioned below:
gem uninstall compass
gem uninstall sass
gem install compass
gem uninstall sass
gem install sass
and that what fixed it for me.

Uninstall sass and reinstall it with the following:
gem uninstall sass
gem install sass
For some reason
gem install compass
brings along some bleeding edge version of sass which is pony.

Related

Ruby Gem Scrypt 2.1.1 won't install on Windows

I'm asked to look at some Ruby code. The developers run OSX, I'm on Windows. All is working fine on OSX, but I get an error with Scrypt 2.1.1.
I'm asked by Ruby to run: gem install scrypt -v '2.1.1' which results in an error.
When I do gem install scrypt -v '2.1.1' --platform=ruby it's quite the opposite and all the gem is installed.
Now when I recreate the GemFile or update it, I still get an error and it's again suggested to run gem install scrypt -v '2.1.1'.
The output I'm getting is:
Installing scrypt 2.1.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: <MyProject>/vendor/bundle/ruby/2.3.0/gems/scrypt-2.1.1/ext/scrypt
C:/Ruby23-x64/bin/ruby.exe -rubygems <MyProject>/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/exe/rake RUBYARCHDIR=<MyProject>/vendor/bundle/ruby/2.3.0/extensions/x64-mingw32/2.3.0/scrypt-2.1.1 RUBYLIBDIR=<MyProject>/vendor/bundle/ruby/2.3.0/extensions/x64-mingw32/2.3.0/scrypt-2.1.1
rake aborted!
LoadError: cannot load such file -- ffi_c
<MyProject>/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.10-x64-mingw32/lib/ffi.rb:6:in `rescue in <top (required)>'
<MyProject>/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.10-x64-mingw32/lib/ffi.rb:3:in `<top (required)>'
<MyProject>/vendor/bundle/ruby/2.3.0/gems/ffi-compiler-0.1.3/lib/ffi-compiler/compile_task.rb:4:in `<top (required)>'
<MyProject>/vendor/bundle/ruby/2.3.0/gems/scrypt-2.1.1/ext/scrypt/Rakefile:1:in `<top (required)>'
<MyProject>/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<main>'
LoadError: cannot load such file -- 2.3/ffi_c
<MyProject>/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.10-x64-mingw32/lib/ffi.rb:4:in `<top (required)>'
<MyProject>/vendor/bundle/ruby/2.3.0/gems/ffi-compiler-0.1.3/lib/ffi-compiler/compile_task.rb:4:in `<top (required)>'
<MyProject>/vendor/bundle/ruby/2.3.0/gems/scrypt-2.1.1/ext/scrypt/Rakefile:1:in `<top (required)>'
<MyProject>/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<main>'
LoadError: cannot load such file -- ffi-compiler/compile_task
<MyProject>/vendor/bundle/ruby/2.3.0/gems/scrypt-2.1.1/ext/scrypt/Rakefile:1:in `<top (required)>'
<MyProject>/vendor/bundle/ruby/2.3.0/gems/rake-11.2.2/exe/rake:27:in `<main>'
(See full trace by running task with --trace)
rake failed, exit code 1
Gem files will remain installed in <MyProject>/vendor/bundle/ruby/2.3.0/gems/scrypt-2.1.1 for inspection.
I've looked and searched on Google and Bing, but nothing resulted in a solution.
Hope somebody in the community here can help me find the resolution.
Thanks,
Iwan
gem install ffi --platform=ruby
gem install scrypt -v 2.2.1
Works for me.

'grunt compass' throwing error that it's not in the system PATH

I'm pretty new to using grunt, compass, and sass and am having trouble getting it to work. I have a Redhat installation with Drupal 7 and when I try to run 'grunt compass' from within the site's theme directory I get the following error:
Running "compass:dist" (compass) task
Warning: You need to have Ruby and Compass installed and in your system PATH for this task to work. More info: https://github.com/gruntjs/grunt-contrib-compass Use --force to continue.
Aborted due to warnings.
I've installed Grunt, Bower, and used 'bundle install' to install the needed gems. When I run 'gem list' I get the following:
bigdecimal (1.2.4)
breakpoint (2.0.7)
bundler (1.6.2)
bundler-unload (1.0.2)
chunky_png (1.3.1)
compass (0.12.6)
compass-normalize (1.4.3)
executable-hooks (1.3.1)
fssm (0.2.10)
gem-wrappers (1.2.4)
io-console (0.4.2)
json (1.8.1)
kss (0.5.0)
minitest (4.7.5)
psych (2.0.3)
rake (10.1.0)
rdoc (4.1.0)
ruby (0.1.0)
rubygems-bundler (1.4.3)
rubygems-update (2.2.2)
rvm (1.11.3.9)
sass (3.2.19)
test-unit (2.1.1.0)
zurb-foundation (4.3.2)
So it seems that I have all of the needed gems. I then looked at my PATH settings via 'echo $PATH' and got the following:
/home/ec2-user/.rvm/gems/ruby-2.1.1/bin:/home/ec2-user/.rvm/gems/ruby-2.1.1#global/bin:/home/ec2-user/.rvm/rubies/ruby-2.1.1/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/bin:/home/ec2-user/.rvm/bin
I looked into the paths and see that in /usr/bin I have ruby2.0 and in /home/ec2-user/bin I have compass so the installations seem to be in the system PATH.
When I run 'ruby2.0' from the command line I get the following:
/usr/local/share/ruby/site_ruby/2.0/rubygems/ext/builder.rb:12:in `<class:Builder>': uninitialized constant Gem::UserInteraction (NameError)
from /usr/local/share/ruby/site_ruby/2.0/rubygems/ext/builder.rb:10:in `<top (required)>'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/ext.rb:13:in `<top (required)>'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:1431:in `build_extensions'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/stub_specification.rb:60:in `build_extensions'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:925:in `block in find_inactive_by_path'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:924:in `each'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:924:in `find'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:924:in `find_inactive_by_path'
from /usr/local/share/ruby/site_ruby/2.0/rubygems.rb:185:in `try_activate'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/user_interaction.rb:8:in `<top (required)>'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/config_file.rb:7:in `<top (required)>'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:1430:in `build_extensions'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/stub_specification.rb:60:in `build_extensions'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:925:in `block in find_inactive_by_path'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:924:in `each'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:924:in `find'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/specification.rb:924:in `find_inactive_by_path'
from /usr/local/share/ruby/site_ruby/2.0/rubygems.rb:185:in `try_activate'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
from /usr/local/share/ruby/site_ruby/2.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from <internal:abrt_prelude>:2:in `<compiled>'
When I run simply 'ruby' nothing ever happens. Is 'grunt compass' looking to find 'ruby' and instead I have 'ruby2.0'? Do I need to create a symlink with ruby -> ruby2.0?
When I run 'compass' from the command line I get:
Usage: compass help [command]
Description:
The Compass Stylesheet Authoring Framework helps you
build and maintain your stylesheets and makes it easy
for you to use stylesheet libraries provided by others.
Etc.
Any thoughts would be appreciated
I've done some researching on this and the following worked for me...
If you have a windows build with Ruby and Compass installed via CLI then try;
Control Panel > System > Advanced system settings
Advanced > Environment Variables
Under System variables search for the 'path' variable which should have a value
Finally click edit and add ;C:\Ruby193\bin at the very end of the Variable value.
This should do the trick.
Note that ;C:\Ruby193\bin refers to the installation of Ruby > Compass on your machine.
If you have a Mac build then perhaps a similar version of fix could work for Mac but I couldn't map that for you, a bit of Googling might help...
grunt compass looks for a ruby gem. In your case 'compass -v' gives no error so the compass part works fine. outside this, it doesn't depend on any other component of ruby.
Now that compass is ready, grunt compass also looks for a npm module grunt-contrib-compass which you would find reference of in a package.json file. If you do a npm install this npm package gets installed and I believe it should make grunt compass work.
grunt-contrib-compass has a bundleExec option that makes the magic. With bundle it will load the gems installed using bundle install. Just set bundleExec: true
https://github.com/gruntjs/grunt-contrib-compass#bundleexec

compass installation does not work anymore

Using Mac Mountain Lion
My compass installation does not work any more
I used brew, rvm, gem sometimes together with sudo (yes meanwhile I know this was not a good idea) - I have to admit that I do not have a clear picture which parts of rvm could conflict with the native ruby installation or with installations from brew…
compass install compass
gives me:
$ compass install compass
/Users/marc/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- sass/script/node (LoadError)
from /Users/marc/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /Users/marc/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches/browser_support.rb:1:in <top (required)>'
from /Users/marc/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /Users/marc/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require'
from /Users/marc/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:2:inblock in '
from /Users/marc/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in each'
from /Users/marc/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in'
from /Users/marc/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require'
from /Users/marc/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /Users/marc/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9:in <top (required)>'
from /Users/marc/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /Users/marc/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require'
from /Users/marc/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/lib/compass.rb:5:inblock in '
from /Users/marc/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/lib/compass.rb:4:in each'
from /Users/marc/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/lib/compass.rb:4:in'
from /Users/marc/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require'
from /Users/marc/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from /Users/marc/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/bin/compass:20:in block in <top (required)>'
from /Users/marc/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/bin/compass:8:infallback_load_path'
from /Users/marc/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/bin/compass:19:in <top (required)>'
from /Users/marc/.rvm/gems/ruby-2.1.0/bin/compass:23:inload'
from /Users/marc/.rvm/gems/ruby-2.1.0/bin/compass:23:in <main>'
from /Users/marc/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:ineval'
from /Users/marc/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `'
then
which -a gem
results in:
/Users/marc/.rvm/rubies/ruby-2.1.0/bin/gem
/usr/local/bin/gem
/usr/bin/gem
/usr/local/bin/gem
/usr/bin/gem
After I learned today that I should not use sudo when installing sass and compass I deinstalled sass and compass using sudo. Following that I did a gem install compass without sudo.
Unfortunately same error as above.
So this does not have an impact.
Any ideas?
Thanks,
Marc
Has been solved by this entry.
Have gone back to an earlier Sass version and everything is fine.

Trouble running compass on OSX - LoadError on line ["51"]

I read a lot of the issues here before, unfortunately non of the described solutions worked for me. I'm on OSX and using ruby-1.9.3-p448 via rvm. Everything freshly set up.
Then I did sudo gem install compass for getting compass and sass.
No error messages.
stnwbr$ ruby -v
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.4.0]
stnwbr$ compass -v
Compass 0.12.2 (Alnilam)
stnwbr$ sass -v
Sass 3.2.10 (Media Mark)
but as soon as I do something like compass create or compass watch I get:
stnwbr$ compass create
LoadError on line ["51"] of /Users/stnwbr/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb: cannot load such file -- breakpoint
Run with --trace to see the full backtrace
Including --trace the result is the following:
stnwbr$ compass create --trace
LoadError on line ["51"] of /Users/stnwbr/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb: cannot load such file -- breakpoint
/Users/stnwbr/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/data.rb:161:in `require'
/Users/stnwbr/Dropbox/Projects/2013/11 OUA outdooradventures/OUA-sync/config.rb:1:in `get_binding'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:24:in `eval'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:24:in `parse_string'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:15:in `block in _parse'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:14:in `open'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:14:in `_parse'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/file_data.rb:7:in `block in new_from_file'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/inheritance.rb:204:in `with_defaults'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/file_data.rb:6:in `new_from_file'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/helpers.rb:42:in `configuration_for'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/helpers.rb:97:in `add_project_configuration'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/commands/project_base.rb:31:in `add_project_configuration'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/commands/installer_command.rb:9:in `configure!'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/commands/project_base.rb:15:in `initialize'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/commands/stamp_pattern.rb:69:in `initialize'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:42:in `new'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:42:in `perform!'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/bin/compass:30:in `block in <top (required)>'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/bin/compass:44:in `call'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/bin/compass:44:in `<top (required)>'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/bin/compass:23:in `load'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/bin/compass:23:in `<main>'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/bin/ruby_noexec_wrapper:14:in `eval'
/Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/bin/ruby_noexec_wrapper:14:in `<main>'
Unfortunately that's where my understanding stops. All ideas appreciated! Thank you.
Uninstall sass and reinstall it with the following:
gem uninstall sass
gem install sass
For some reason
gem install compass
brings along some bleeding edge version of sass which is causing this error.
Then I did sudo gem install compass
NEVER
ever
use SUDO
with rvm
Follow the instructions here link

Why does "compass watch" say it cannot load sass/script/node (LoadError)?

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?
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.
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
This combination is finally working for me to bring Compass and SASS Sourcemaps together:
Gemfile
gem 'sass', '3.3.0.alpha.149'
gem 'compass', '0.12.2'
gem 'compass-sourcemaps', "~> 0.12.2.sourcemaps.57a186c"
Compass config.rb
sass_options = {:sourcemap => true}
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).
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.
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.
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.
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.
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.
The following combinations worked for me:
gem install compass --pre
gem install sass -v 3.3.3
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"

Resources