41

I want to download the latest Ruby release(version 3.0.0), using RVM but I am faced with the following error when running rvm install 3.0.0:

Unknown ruby interpreter version (do not know how to handle): 3.0.0

I have also tried 3 & 3.0, but gives the same error.

According to this page, it should be available through RVM. I'm already using RVM to manage my ruby versions, so I don't want to use rbenv ... nor do I want to install from source.

How can I get Ruby version 3.0.0 installed using RVM?

grizzthedj
  • 7,131
  • 16
  • 42
  • 62

5 Answers5

84

If you have not updated rvm do that first RVM Upgrading

rvm get stable 
# or 
rvm get master # for even newer versions not in stable 3.0.0 in this case

To see all available rubies run

rvm list remote all 
# or
rvm list known # as pointed out in the comments

you should see ruby-3.0.0 in the list of available rubies

Then run

rvm install ruby-3.0.0
engineersmnky
  • 25,495
  • 2
  • 36
  • 52
  • 1
    In my case, I had to use `rvm get master` because 3.0 hasn't made it into stable as of today. Also `rvm list remote all` didn't find anything, so instead use `rvm list known` to find available rubies. – platforms Dec 28 '20 at 23:00
  • @platforms updated accordingly thank you. – engineersmnky Dec 28 '20 at 23:10
  • 1
    `rvm install 3.0.0` fails for me after upgrading RVM, but running `rvm install ruby-3.0.0` worked – grizzthedj Jan 03 '21 at 20:32
4

In many parts of the world, the current time is holiday time. RVM is maintained by unpaid volunteers in their spare time, who might choose to spend time with their families.

Therefore, it might take a while for a new release of RVM to come out.

Also, there are a couple of bugs related to YARV 3.0.0 not working on the RVM bug tracker, obviously those will need to be fixed before a new release of RVM that supports YARV 3.0.0 can be released.

Jörg W Mittag
  • 363,080
  • 75
  • 446
  • 653
1

According to the RVM offline installation docs, the required extension to install any Ruby version is .tar.bz2.

Taking a look at the Ruby's 3 FTP folder, the .tar.bz2 is available only for the preview1 release. Neither the rc1 nor the official has that extension available yet.

I think we gotta wait for some maintainer to update the FTP folder with that extension.

1

First you need to upgrade the RVM. Then try to install the needed version again ->

rvm get master && rvm install 3.0.0

spirito_libero
  • 1,206
  • 2
  • 13
  • 21
0

You can just rename the .tar.gz file to be a .tar.bz2 and everything will work. Here's the steps:

  1. As stated in previous answers, update rvm to the latest stable version with:

    rvm get stable
    
  2. Download the release 3.0.0 gz file from: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0.tar.gz

  3. Move the downloaded file into your .rvm/archives folder and rename it to a .bz2 in the process:

    mv ~/Downloads/ruby-3.0.0.tar.gz ~/.rvm/archives/ruby-3.0.0.tar.bz2
    
  4. Make sure you've got at least gcc v8 installed, or newer. This is required due to the multi-threaded concurrency features of Ruby 3. I used gcc-10, which on my Mac I had installed with Homebrew. If you do use a newer version of gcc then you'll need to set the CC environment variable:

    export CC=gcc-10
    
  5. With everything now in place, install as usual, which will automatically find the appropriate .bz2 file in your archives folder:

    rvm install ruby-3.0.0
    
Lorin Thwaits
  • 301
  • 1
  • 3