78

I finally got RVM working and now I would like RVM to install the latest stable ruby version.

In the tutorial I am using they installed ruby 1.9.3 with command :

rvm install 1.9.3

Now I want to know if there is a command to download the latest stable version, or do I have to check latest stable version and download it like that, or else, can I download any old version and run an upgrade?

Normally I would try out everything, but I am working on a new server and I am trying to set it up as clean as I can :)

Private
  • 3,934
  • 10
  • 34
  • 48

3 Answers3

103

The following command will install latest stable version of ruby:

rvm install ruby --latest
Eliah Kagan
  • 117,780
user311140
  • 1,031
  • 2
    This does not always install latest. I was on 2.1.5 and using --latest I got 2.2.1 and then using rvm install 2.2.4 I got 2.2.4 which is newest than what I got using --latest – SET Dec 25 '15 at 21:27
  • If you want to use the latest version of Ruby that is already installed you can use rvm use ruby --latest – Elliot Chance Feb 09 '16 at 23:44
  • 1
    Does this command look at the known rubies locally, or does it go out to an rvm server somewhere? If locally, then you should make sure that your rvm is current (see previous answer for that). – Keith Bennett Nov 10 '16 at 07:53
79

you can install latest rvm and ruby by :

$ \curl -L https://get.rvm.io | bash -s stable --ruby

and check all the ruby version with stability

$ rvm list known

can also check details here : http://www.ruby-lang.org/en/downloads/

$ rvm install ruby 2.0.0-p247 

Use when you want to download specific version or know this is stable.

  • My pleasure...it's works for you !! – Gaurav Sharma Aug 09 '13 at 06:19
  • You can eliminate the rvm installation (the curl | bash command) if you know that you already have the most recent version. You can do that by running rvm -v and seeing if the result contains "(latest)" in it, as in: rvm 1.27.0 (latest). – Keith Bennett Nov 10 '16 at 07:49
0
echo rvm_autoupdate_flag=2 >> ~/.rvmrc
rvm install ruby --latest
Bruno
  • 163