Use multiple versions of rubygems with rvm?

旧时模样 提交于 2019-12-02 20:40:41

The correct way is to created different named (-n) installs of the ruby you want installed and name them according to the rubygem version you want such as

rvm --install use 1.9.2-nrg186 && rvm rubygems 1.8.6 && gem --list
rvm --install use 1.9.2-nrg1810 && rvm rubygems 1.8.10 && gem --list

The reason for this is that you can only have 1 version of rubygems active an any given time. This is also due to the fact that each ruby defines a dependency on a specific rubygems version that version is known or expected to work with (regardless of if it can work with another or not).

This is the expected way to handle the multiple rubygems requirement and to eliminate potential problems. See https://gist.github.com/1273035 for specifics detailing this.

Tilo

RVM has a new feature for this:

use "rvm rubygems 1.6.2" to select that version of rubygems.

 rvm rubygems 1.6.2

https://rvm.io/rubies/rubygems/ (see: "RubyGems CLI API" towards the bottom of the page)

http://groups.google.com/group/rubyversionmanager/browse_thread/thread/e39fc7827d2d22e8

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!