Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 922
Chani Avatar asked Jan 11 '11 20:01

Chani


People also ask

Which is better RVM or Rbenv?

RVM is easier to install than Rbenv, RVM has more features than Rbenv, RVM includes a built-in Ruby installation mechanism while Rbenv does not.

What is RubyGems How does it work?

The RubyGems software allows you to easily download, install, and use ruby software packages on your system. The software package is called a “gem” which contains a packaged Ruby application or library. Gems can be used to extend or modify functionality in Ruby applications.

What does RVM install do?

Ruby Version Manager (RVM) is a utility that allows you to add your own personal version of Ruby to a user. It allows you to add, remove, or have multiple versions of Ruby and its libraries live in your user directory.


2 Answers

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
like image 146
Tim Snowhite Avatar answered Oct 28 '22 04:10

Tim Snowhite


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.

like image 36
Phrogz Avatar answered Oct 28 '22 04:10

Phrogz