Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RVM: create a gemset that doesn't inherit from global?

I'm starting work on a project written in Rails 2. It looks like it requires an older version of Rake, which is in my global gemset for Ruby 1.8.7. I'd like to avoid uninstalling the global 1.8.7 rake just for this one app.

Is there anyway I can create a gemset that would ignore the global gemset?

Edit: the most obvious solution I want to avoid is uninstalling gems from the global gemset. In my particular situation I started some work on a legacy app. It breaks with gems like rake 0.9.3 and my debugging gems (awesome_print, hirb, wirb, etc). While my current solution (in the comment below) is a hack, it appears to be the least amount of work for what I want. I was hoping that there was some gemset exception command that I didn't know about.

like image 870
Eric Hu Avatar asked Aug 11 '11 20:08

Eric Hu


1 Answers

You should be able to run rvm gemset empty test on your newly created gemset to remove all gems (local and global), then an bundle install should only install the gemfile gems.

like image 80
Greg Olsen Avatar answered Oct 05 '22 12:10

Greg Olsen