Ubuntu 20.04 LTS RBENV no ruby 3

I want to install Ruby 3 using rbenv on my Ubuntu desktop, I’ve checked I have the latest version but when I list available versions ruby 3 is not in the list. However I have installed Ruby 3 using rbenv on my Mac so I’m a little confused !

Is it just that Ruby 3 is not available on Ubuntu but is for Mac ?

Thanks,

Lee.

You can just use rvm to install ruby 3.0:

$ \curl -sSL https://get.rvm.io | bash -s stable
$ export PATH="$PATH:$HOME/.rvm/
$ rvm install ruby-3.0.0

And you can run ruby-3.0.0 like this:

$ source ~/.rvm/scripts/rvm
$ rvm use ruby-3.0.0

Launch irb with irb, install gem with gem, and run ruby with ruby as you normally do.

I don’t think you can use rvm with rbenv

Yes, that’s true. But I think you can also use rvm alone instead of rbenv. I am suggesting it because I personally use RVM, and I have Ruby 1.9 to Ruby 3.0 installed with RVM. You can get ruby with rvm and use just like rbenv…
Maybe others with rbenv knowledge can help…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs