简体   繁体   中英

how can i install rubygems with rvm ? what is the difference between the two?

I am trying to set up Rails 3.0.3 running on my machine with Ruby 1.9.2. I have installed rvm and used it to install Ruby 1.9.2. What do do next to install the gems I want?

In particular, please give the command to install RubyGems 1.3.6 because Rails 3.0.3 is asking for it specifically. Can rvm install Rails by itself, or will I need RubyGems for that?

Yes, you can install gems with rvm. Use:

rvm use 1.9.2 # Make sure you're using the installed version
rvm gem install --version '3.0.3' rails

Updated to include specific version of the gem.

Looks like you already have rails installed, from the way you've phrased the question. To install rubygems-1.3.6 using rvm just make sure your rvm install is updated and you're using the ruby you want, and then use rvm rubygems 1.3.6 to select that version of rubygems.

rvm get head
rvm reload
rvm use 1.9.2
rvm rubygems 1.3.6

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM