install ruby on ubuntu code example

Example 1: how to install ruby on ubuntu

sudo apt update && sudo apt install -y ruby-full && ruby --version

Example 2: install ruby ubuntu 20.04

sudo apt update
sudo apt install ruby-full

Example 3: install ruby on ubuntu

sudo snap install ruby --classic

Example 4: installing ruby on rails ubuntu 20.04

sudo apt install curl
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

sudo apt-get update
sudo apt-get install git-core zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn

Tags:

Misc Example