How to install Ruby in your AWS Machine?

How to install Ruby in your AWS Machine?

January 7, 2021 / Nirav Shah

Ruby is a dynamic, interpreted, reflective, object-oriented, general-purpose programming language. Ruby is most used for building web applications. However, it is a general-purpose language similar to Python, so it has many other applications like data analysis, prototyping, and making proof of concept.

Step 1: Updating System Packages

sudo yum update -y

Step 2: Installing Ruby from the YUM package manager

sudo yum install ruby

how-to-install-ruby-in-your-aws-machine

Step 3: Check the version

ruby --version

Installing Ruby using Rbenv

It is a lightweight Ruby version management utility which allows you to switch Ruby versions easily.

sudo yum install git wget gcc bzip2 openssl-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel

install rbenv and ruby-build

wget -q https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer -O- | bash

add $HOME/.rbenv/bin to our PATH by below command

echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
rbenv -v

To see Ruby versions,

rbenv install -l

And for verification of ruby version follow below commands

ruby --version

Now you should have a fairly good idea of installing Ruby on your AWS machine. With just a few generic tweaks, you can install Ruby on any Linux distribution.

Talk to AWS Certified Consultant

    Spread Love By Sharing:

    Let’s Talk About Your Needed AWS Infrastructure Management Services

    Have queries about your project idea or concept? Please drop in your project details to discuss with our AWS Global Cloud Infrastructure service specialists and consultants.

    • Swift Hiring and Onboarding
    • Experienced and Trained AWS Team
    • Quality Consulting and Programming
    Let’s Connect and Discuss Your Project