February 2nd, 2012
rvm gemset issues after rails 3 upgrade
I was revisiting a Rails 3 upgrade last night, rolled things back this morning, and realized Rails was requiring all the wrong gems. Turned out the problem was I was using the global RVM gemset for all the Rails 3 gems, which, as the name would suggest, is for gems that are used by all gemsets. Silly me. Solution:
rvm env # revealed the multiple gem paths rvm use ruby-1.8.7@global # http://geekystuff.net/2009/01/14/remove-all-ruby-gems/ gem list | cut -d" " -f1 | xargs gem uninstall -aIx rvm gemset create rails3 rvm use ruby-1.8.7@rails3 git checkout rails3 # branch for the upgrade w/ Gemfile etc bundle git checkout master rvm use ruby-1.8.7@rails2 # everything back to normal |