开发者

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

开发者 https://www.devze.com 2023-03-27 06:01 出处:网络
I\'m starting work on a project written in Rails 2.It looks like it requires an older开发者_Python百科 version of Rake, which is in my global gemset for Ruby 1.8.7.I\'d like to avoid uninstalling the

I'm starting work on a project written in Rails 2. It looks like it requires an older开发者_Python百科 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.


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.


Yes you can. You need to run rvm gemset create {gemset_name}. That will create an empty gemset, and you'll have to install all the gems with their versions in there (just gem install ..., without sudo).

0

精彩评论

暂无评论...
验证码 换一张
取 消