Tue 31 Jan 2012
Using named gemsets with rvm
Posted by kosmas under Ruby, ruby on rails
No Comments
Problem
You want to be able to use different gems/rails version for your application after installing the latest rails version, without having to use bundle exec.
Solution
You can use the named gemsets with rvm.
More instructions are here: http://beginrescueend.com/gemsets/basics/
so you can install two gemsets for example ruby-1.9.3-p0@rails3_0_11 and another with ruby-1.9.3-p0@rails3_2_1
you could then do :
rvm gemset create rails3_0_11 rails3_2_1 rvm 1.9.3-p0@rails3_0_11 gem install rails -v 3.0.11 rvm 1.9.3-p0@rails3_2_1 gem install rails -v 3.2.1 rvm gemset use rails3_0_11 bundle install