Compass installation under rbenv - ruby

I thought I had Compass installed OK using rbenv on my Mac, but I got an error when trying to switch Codekit to use it instead of its internal compiler.
Running compass -v in the terminal gives me:
/.rbenv/versions/1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `require': cannot load such file -- sass/script/node (LoadError)
from /.rbenv/versions/1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
from /.rbenv/versions/1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:35:in `require'
from /.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches/browser_support.rb:1:in `<top (required)>'
from /.rbenv/versions/1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:58:in `require'
from /.rbenv/versions/1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:58:in `require'
from /.rbenv/versions/1.9.3-p392/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 /.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `each'
from /.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `<top (required)>'
from /.rbenv/versions/1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:58:in `require'
from /.rbenv/versions/1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:58:in `require'
from /.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9:in `<top (required)>'
from /.rbenv/versions/1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:58:in `require'
from /.rbenv/versions/1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:58:in `require'
from /.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass.rb:5:in `block in <top (required)>'
from /.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass.rb:4:in `each'
from /.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/compass-0.12.2/lib/compass.rb:4:in `<top (required)>'
from /.rbenv/versions/1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:58:in `require'
from /.rbenv/versions/1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:58:in `require'
from /.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/compass-0.12.2/bin/compass:20:in `block in <top (required)>'
from /.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/compass-0.12.2/bin/compass:8:in `fallback_load_path'
from /.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/compass-0.12.2/bin/compass:19:in `<top (required)>'
from /.rbenv/versions/1.9.3-p392/bin/compass:23:in `load'
from /.rbenv/versions/1.9.3-p392/bin/compass:23:in `<main>'
So, it would seem there's a problem there, although running gem install compass tells me that compass-0.12.2 was successfully installed.
How do I go about working out what the problem is and fixing it?

Try this version,
http://rubygems.org/gems/sass/versions/3.3.0.alpha.149
gem install sass -v 3.3.0.alpha.149 --pre
Bear in mind that the command above installs the gem, it doesn't activate the version!
You can run the following:
gem uninstall sass
You'll be prompted with a list of installed versions; merely uninstall the ones that are 3.3.0.alpha.X where X is higher then 149.
You can test it works via:
sass --version
compass --version
You should see normal pages (instead of the errors in your question).
ps.
You may need this too:
gem install compass-sourcemaps -v 0.12.2.sourcemaps.57a186c --pre

In my case, it was an incompatibility between compass and sass. It was "sass-3.3.0.rc.2" installed automatically via compass dependencies.
So I had to remove sass version gem uninstall sass and install another version gem install sass -v 3.2.12
After that, the errors disappeared.

There's an issue with some imports in one script within compass. An easy fix, but for now you can add this to your Gemfile (works for me right now):
gem "compass", github: 'ovaskevich/compass'

Related

trying to run command rails server (ruby on rails)

im trying to get started with rails. I have made a rails project and now im trying to start the server but get this.
C:\Users\Home\Documents\Sites\simple_cms>rails server
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2/mysql2.rb:2:in `require': cannot load such file -- mysql2/2.2/mysql2 (LoadError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2/mysql2.rb:2:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2.rb:31:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/mysql2-0.3.18-x64-mingw32/lib/mysql2.rb:31:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:76:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:72:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:72:in `block in require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:61:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler/runtime.rb:61:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.2/lib/bundler.rb:134:in `require'
from C:/Users/Home/Documents/Sites/simple_cms/config/application.rb:7:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `require'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:75:in `server'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
my gemfile has gem 'mysql2', '~> 0.3.18'
windows 7
ruby version 2.2.1
rails 4.2.1
mySql server version 5.6.24
Edit:
Couldn't find a solution that worked for me so i installed a different version of rails and it worked out.
Make sure you have installed mysql2 gem using bundle install and that bundle install has returned successful installation.
#James, This issue has been already raised so follow these links and hope this may help you.
1) Error "...cannot load such file -- mysql2/2.0/mysql2 (LoadError)". On Windows XP with Ruby 2.0.0
2) Ruby on Rails - cannot load such file -- mysql2/2.2/mysql2 (LoadError)
3) https://github.com/bundler/bundler/issues/3456
Try to change
gem 'mysql2', '~> 0.3.18'
to
gem 'mysql2', '~> 0.3.11'
I think that maximum compatible version with Windows is 0.3.11. Then run again bundle install

problems installing rubyracer / execjs gem for jekyll

Trying to install gem rubyracer and gem execjs for reasons I can't remember.
Probably because I'm trying to deploy a jekyll site which is having major issues displaying on server.
So, tried running jekyll --server
Get this error:
/usr/local/rvm/gems/ruby-2.1.2/gems/execjs-2.2.1/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
from /usr/local/rvm/gems/ruby-2.1.2/gems/execjs-2.2.1/lib/execjs.rb:5:in `<module:ExecJS>'
from /usr/local/rvm/gems/ruby-2.1.2/gems/execjs-2.2.1/lib/execjs.rb:4:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/gems/ruby-2.1.2/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/gems/ruby-2.1.2/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/gems/ruby-2.1.2/gems/jekyll-coffeescript-1.0.0/lib/jekyll-coffeescript.rb:2:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/gems/ruby-2.1.2/gems/jekyll-2.1.0/lib/jekyll.rb:75:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/gems/ruby-2.1.2/gems/jekyll-2.1.0/bin/jekyll:6:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.1.2/bin/jekyll:23:in `load'
from /usr/local/rvm/gems/ruby-2.1.2/bin/jekyll:23:in `<main>'
from /usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
from /usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
So, hence the installation attempt of rubyracer and execjs
This is what I get when I try to install them (message is identical for both):
/usr/local/rvm/rubies/ruby-2.1.2/bin/gem:8:in `require': no such file to load -- rubygems (LoadError)
from /usr/local/rvm/rubies/ruby-2.1.2/bin/gem:8
Environment is linux server. Not my laptop.
additional information
which jekyll gets this: /usr/local/rvm/gems/ruby-2.1.2/bin/jekyll
echo $PATH gets this:
/usr/local/rvm/gems/ruby-2.1.2/bin:/usr/local/rvm/gems/ruby-2.1.2#global/bin:/usr/local/rvm/rubies/ruby-2.1.2/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/rvm/bin:/home/coffee/bin
ruby -v gets this: ruby 2.1.2p95 (2014-05-08 revision 45877) [i686-linux]
which ruby gets this: usr/local/rvm/rubies/ruby-2.1.2/bin/ruby
jekyll --server is deprecated, you can use jekyll serve.
I guess that it something wrong with your RVM. Try to remove it with rvm implode and install it again.

Broken upgrade to susy 2.1.2 cannot load such file -- sass/script/node

I have just updated to susy 2.1.2 from version 1.0.9 so I expected errors.
However, I have no idea what this means.
I do still have both versions installed:
Select gem to uninstall:
1. susy-1.0.9
2. susy-2.1.2
3. All versions
When running my compass:dev I get the following, although the task still finished. How can I remove the erorrs?
Running "compass:dev" (compass) task
C:/RUBY200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `require': cannot load such file -- sass/script/node (LoadError)
from C:/RUBY200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from C:/RUBY200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from C:/RUBY200/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches/browser_support.rb:1:in `<top (required)>'
from C:/RUBY200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/RUBY200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/RUBY200/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:2:in `block in <top (required)>'
from C:/RUBY200/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `each'
from C:/RUBY200/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `<top (required)>'
from C:/RUBY200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/RUBY200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/RUBY200/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9:in `<top (required)>'
from C:/RUBY200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/RUBY200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/RUBY200/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass.rb:5:in `block in <top (required)>'
from C:/RUBY200/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass.rb:4:in `each'
from C:/RUBY200/lib/ruby/gems/2.0.0/gems/compass-0.12.2/lib/compass.rb:4:in `<top (required)>'
from C:/RUBY200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/RUBY200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/RUBY200/lib/ruby/gems/2.0.0/gems/compass-0.12.2/bin/compass:20:in `block in <top (required)>'
from C:/RUBY200/lib/ruby/gems/2.0.0/gems/compass-0.12.2/bin/compass:8:in `fallback_load_path'
from C:/RUBY200/lib/ruby/gems/2.0.0/gems/compass-0.12.2/bin/compass:19:in `<top (required)>'
from C:/Ruby200/bin/compass:23:in `load'
from C:/Ruby200/bin/compass:23:in `<main>'
Running "watch" task
Waiting...
Your Gemfile need only have these:
gem "susy", "~>2.1.0"
gem "sass", "~>3.3.0"
gem "breakpoint", "~>2.4.0"
Bundler will sort out the other dependencies (which are many), as well as updating the gems to the latest versions.
This is the message I got when trying to update Susy with bundler.
susy (~> 2.1.2) ruby depends on
sass (~> 3.3.0) ruby
compass (~> 0.12.6) ruby depends on
sass (3.2.19)
This means you will need at least Sass 3.3.0. The latest alpha pre release of Compass will work with this and you can install it with the following command:
gem install compass --pre
Alternatively if you are using a Gemfile you could install it like this:
gem "compass", "~> 1.0.0.alpha.19"

Symbol not found when using ruby gem berkshelf

I have been having general issues with berkshelf, namely the dependancy solver problem that you can read more about here
Now that issue has been solved I've just tried to do a bundle install/update and a berks install to try out the new dependancy solver but I'm getting a strange error when i do a berks install:
➜ deployment git:(master) ✗ berks install
/usr/local/rvm/gems/ruby-1.9.3-p484#global/gems/ffi-1.9.3/lib/ffi/library.rb:133:in `block in ffi_lib': Could not open library '/usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_gecode.bundle': dlopen(/usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_gecode.bundle, 5): Symbol not found: __ZN6Gecode16ValBranchOptions3defE (LoadError)
Referenced from: /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_gecode.bundle
Expected in: flat namespace
in /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_gecode.bundle
from /usr/local/rvm/gems/ruby-1.9.3-p484#global/gems/ffi-1.9.3/lib/ffi/library.rb:100:in `map'
from /usr/local/rvm/gems/ruby-1.9.3-p484#global/gems/ffi-1.9.3/lib/ffi/library.rb:100:in `ffi_lib'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector/dep_gecode.rb:33:in `<module:Dep_gecode>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector/dep_gecode.rb:21:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector/gecode_wrapper.rb:21:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector/gecode_wrapper.rb:21:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector/dependency_graph.rb:21:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector/dependency_graph.rb:21:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector/selector.rb:21:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector/selector.rb:21:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector.rb:22:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/dep_selector-1.0.0.alpha.2/lib/dep_selector.rb:22:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/solve-1.0.0.rc1/lib/solve/solver.rb:1:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/solve-1.0.0.rc1/lib/solve/solver.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/solve-1.0.0.rc1/lib/solve.rb:10:in `require_relative'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/solve-1.0.0.rc1/lib/solve.rb:10:in `<module:Solve>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/solve-1.0.0.rc1/lib/solve.rb:3:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/berkshelf-7060813e4887/lib/berkshelf.rb:8:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/berkshelf-7060813e4887/lib/berkshelf.rb:8:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/berkshelf-7060813e4887/lib/berkshelf/cli.rb:1:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/berkshelf-7060813e4887/lib/berkshelf/cli.rb:1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/berkshelf-7060813e4887/bin/berks:3:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bundler/gems/berkshelf-7060813e4887/bin/berks:3:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bin/berks:23:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bin/berks:23:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `<main>'
Now I don't know very much about Ruby but I have some experience with C++ and I will never forget these sorts of library linking issues. Only problem is I literally have no idea what I'm supposed to do with this!?
I'm on a mac so I've installed the Gecode dependancy using homebrew. I've tried uninstalling it and re-installing it a few times, I even tried following this article but it didn't seem to change anything.
Any advice would be much appreciated, thanks!
I was seeing the same symptoms, and did a little bit of research onto it. Got it to work by switching gecode versions:
brew switch gecode 3.7.3
Then uninstalled the offending gems:
gem uninstall berkshelf
gem uninstall solve
gem uninstall dep_selector
And finally reinstalling bershelf:
gem install berkshelf

Can't use compass after installing it

I don't seem to be able to get compass working on Vagrant using this Vagrantfile. See the rest of the bash script's used right here(removed repo) (see Vaprobash if you want to provision your Vagrant Ubuntu Box!).
So I was fallowing a gruntjs course, when I had to use grunt server. The only problem is that it needs a newer ruby version (1.9+ I believe instead of the 1.8) and it needs compass. So I have solved the ruby part by installing RVM and installing the latest stable version. Compass should be easy to get gem install compass and it does seem to be installed. But when I type in compass -v I get the fallowing error:
/home/vagrant/.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 /home/vagrant/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/vagrant/.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 /home/vagrant/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/vagrant/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/vagrant/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:2:in `block in <top (required)>'
from /home/vagrant/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `each'
from /home/vagrant/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `<top (required)>'
from /home/vagrant/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/vagrant/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/vagrant/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9:in `<top (required)>'
from /home/vagrant/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/vagrant/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/vagrant/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/lib/compass.rb:5:in `block in <top (required)>'
from /home/vagrant/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/lib/compass.rb:4:in `each'
from /home/vagrant/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/lib/compass.rb:4:in `<top (required)>'
from /home/vagrant/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/vagrant/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/vagrant/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/bin/compass:20:in `block in <top (required)>'
from /home/vagrant/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/bin/compass:8:in `fallback_load_path'
from /home/vagrant/.rvm/gems/ruby-2.1.0/gems/compass-0.12.2/bin/compass:19:in `<top (required)>'
from /home/vagrant/.rvm/gems/ruby-2.1.0/bin/compass:23:in `load'
from /home/vagrant/.rvm/gems/ruby-2.1.0/bin/compass:23:in `<main>'
from /home/vagrant/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
from /home/vagrant/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'
So I am not sure what is going wrong except for the error telling me it's missing files. Anyone got some hints to what could be the problem?
.bash_profile contains the path info:
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
rvm -v and ruby -v work just fine and after installing gem install compass sass -v seem to work as well.
You can replicate everything using Vagrant and VirtualBox. Just download the Vagrantfile from my github mentioned above and vagrant up.
I asked for help on the official compass Github issue's page and got the answer for this problem.
The GitHub issue is right here.
How to fix this:
When installing compass (v0.12.2), it will download the latest sass v3.3.0.rc3 (cause it's a dependency), but compass won't work with the latest sass. You either upgrade compass to the latest alpha version (0.13.*) or downgrade sass to 3.2.*. I choose the last one:
gem uninstall sass --version 3.3.0.rc.3
gem install sass --version 3.2.18
compass -v # Working :)
Make sure you use the version you got installed. Find out by typing this:
sass --version
have a look at this answer https://stackoverflow.com/a/21082978/497756 - it was for other problem but should solve yours too.

Resources