« Back to blog

Using Compass with RVM

After installing RVM, Ruby 1.9.1 and setting up a rails 3 Project, I wanted to setup compass.  

Following some advice from http://blog.firsthand.ca/2010/03/getting-rails-30-running-with-stack-on.html I went ahead and added gem "compass", "0.10.0.pre9" to my Gemfile, ran bundle install, did the usual compass --rails . and encountered an unexpected error:

/Library/Ruby/Site/1.8/rubygems.rb:827:in `report_activate_error': Could not find RubyGem chriseppstein-compass (>= 0) (Gem::LoadError)

It seems RVM was somehow relying on my old compass gem I previously used with my system ruby. After trying a few things, I was able to get it working by opening a new terminal, rvm use system, and sudo gem uninstall chriseppstein-compass.  Switching back to my rails project, compass then ran as expected.