Ruby on Rails® simply known as Rails, is an open-source web application framework written in Ruby that helps you create highly powerful web sites and applications.

This post will help you to install Ruby on Rails on Ubuntu 20.04 using two methods:

  1. rbenv (Recommended)

  2. RVM

Prerequisites

Install Dependencies

Install the curl and other required packages for Ruby on Rails installation.

COPY

sudo apt update

sudo apt install -y curl gnupg2 dirmngr 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

Install Node.js

Rails need a Javascript runtime for application development in Linux. So, for that, we will install the LTS version of Node.js (v12.x).

If you want to use Node.js’s latest feature, install Node.js v14.x.

COPY

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

sudo apt install -y nodejs

#ubuntu #rails #ruby #rubyonrails #ubuntu 20.04

How To Install Ruby On Rails On Ubuntu 20.04
6.55 GEEK