RVM, where is Ruby 3.0.0?
Asked Answered
P

6

43

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?

Protoactinium answered 28/12, 2020 at 12:27 Comment(3)
Yes. RVM auto upgraded before running npm install 3.0.0.Protoactinium
npm is for Node. RVM is for Ruby.Buxton
Yes that was a typo. rvm install 3.0.0Protoactinium
G
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
Gilley answered 28/12, 2020 at 13:58 Comment(3)
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.Dispense
@Dispense updated accordingly thank you.Gilley
rvm install 3.0.0 fails for me after upgrading RVM, but running rvm install ruby-3.0.0 workedProtoactinium
D
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.

Diminish answered 28/12, 2020 at 12:32 Comment(0)
L
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.

Lacking answered 30/12, 2020 at 21:13 Comment(0)
S
1

I had the same problem with ruby-3.2.3 in one of my servers. All I had to do was to upgrade the RVM version from 1.19.0 to 1.19.2. The error that i get was:

curl: (22) The requested URL returned error: 404 
The requested url does not exist(22): 'https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.3.tar.bz2'
Checking fallback: https://ftp.ruby-lang.org/pub/ruby/3.2/ruby-3.2.3.tar.bz2
No fallback URL could be found...

My rvm is installed as a single user, so i did:

# this download and install the latest stable version of RVM
 \curl -sSL https://get.rvm.io | bash -s stable
# use it without close and open your terminal
rvm reload
# and finally install ruby using the correct url
rvm install ruby-3.2.3
Sprag answered 29/3 at 8:19 Comment(0)
D
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
    
Dobla answered 6/1, 2021 at 16:1 Comment(0)
E
0

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

rvm get master && rvm install 3.0.0
Erivan answered 20/7, 2021 at 8:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.