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 :)

3 Answers 3

105

The following command will install latest stable version of ruby:

rvm install ruby --latest
3
  • 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
    Commented Dec 25, 2015 at 21:27
  • If you want to use the latest version of Ruby that is already installed you can use rvm use ruby --latest Commented Feb 9, 2016 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). Commented Nov 10, 2016 at 7: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.

2
  • My pleasure...it's works for you !! Commented Aug 9, 2013 at 6: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). Commented Nov 10, 2016 at 7:49
0
echo rvm_autoupdate_flag=2 >> ~/.rvmrc
rvm install ruby --latest

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .