Skip to content

Install Ruby Using RVM

jguilhermeam edited this page Apr 25, 2013 · 6 revisions

How install Ruby in Ubuntu

We will use the rvm (ruby version manager) to install the last stable version of ruby. There some benefits in using rvm, Many OS'es have buggy version of ruby, rvm provides flexibility to use any version and you can get last available version without require to wait or manually install from source.

RVM Requirements:

  • Git (for package download)
    more details here.

Install RVM

  1. Download and install RVM for your current user:
    $ \curl -L https://get.rvm.io | bash -s stable



2. Reload your Shell Profile
$ source /etc/profile

Try RVM:
$ rvm -v

If not run, Try load your shell profile using:
$ source ~/.profile

3. List RVM Packages:
$ rvm list known

4. Install Ruby 1.9.3
Configure your autolibs to install necessary dependecies (require sudo when install)
$ rvm autolibs 3 # more

Install Ruby 1.9.3
$ (sudo) rvm install 1.9.3

Change to use ruby 1.9.3
$ rvm use 1.9.3
If there is some problem, try:
$ /bin/bash/ --login
$ rvm use 1.9.3

5. Make this version the Default
$ rvm --default use 1.9.3

6. Try Ruby on IRB:
$ irb
2 + 2

References

How To Install Ruby On Mac