Kaushik Vijayakumar
Kaushik Vijayakumar

Reputation: 835

How to upgrade ruby version to 2.6.3 in amazon linux

I booted up a amazon linux machine in which the default ruby version was ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux]. I want to update it to 2.6.3.

I found this article How to upgrade ruby version in Amazon Linux system?. But when I ran sudo yum install -y ruby26 it says ruby26 not found. There was no other article.

Upvotes: 3

Views: 3133

Answers (1)

sjagr
sjagr

Reputation: 16502

Both RVM and rbenv will allow you to install the correct version of Ruby you need for your application. They are both distro agnostic so you can run installation commands as simple as this:

gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
\curl -sSL https://get.rvm.io | bash -s stable
source /etc/profile
rvm install "ruby-2.6.3"
rvm use 2.6.3 --default

The full list of Ruby managers are here, along with several other tools and Installers that explain how to manually install a later version of Ruby.

When all else fails, build from source.

Upvotes: 3

Related Questions