DEV Community

JoshuaWoods
JoshuaWoods

Posted on

Updating RUBY in Ubuntu

Well, it seems the apt command is downloading a old ver of RUBY... Just how do I install Ruby2.7? The highest in the apt get is 2.5. I can download the snap ver but it does not reg with the system!! I tech really wish texh was not so convoluted at times and was straight forward/// ;(

So atm the moment I can't do anything with Middleman, Rails, or Gems becuase everything to totaly out of date. please someone help I';m using Zorin OS atm

Top comments (2)

Collapse
 
harigopal profile image
Hari Gopal

Hi Joshua! We Ruby devs usually use a version manager to install our Ruby interpreters. This is because we often work with multiple projects that use different versions of Ruby.

This is similar to NVM, if you're used to working with Javascript.

You have two options here:

  1. Rbenv: github.com/rbenv/rbenv
  2. RVM: rvm.io/

Both work well, but I usually use Rbenv these days.

Install either first, and then use the version manager to install the exact version (and variant) of Ruby you want.

Note: If you choose Rbenv, remember that you'll need to install it and its ruby-build plugin - it's all mentioned in the well-written instructions.

Collapse
 
joshuawoodsdev profile image
JoshuaWoods

THANKS!!! when Restarted it seemed to install the correct ver I built for source. in the tar.gz folder. I'm a newbie and I'm learing alot thanks so much.