How to Install Ruby on Rails on CentOS 8


Easily deploy your favorite applications in seconds at an unbeatable price for your next projects.

Installing Ruby on Rails on CentOS 8

Ruby on Rails (RoR) is a popular open-source web application framework built with the Ruby programming language. It follows the Model-View-Controller (MVC) architectural pattern and aims to simplify the development of web applications by providing conventions and tools for common tasks.

Step 1: Install Required Dependencies

Before installing Ruby on Rails, we need to install some dependencies. Open your terminal and run the following command:

$ sudo dnf install curl gcc-c++ patch openssl-devel zlib-devel libyaml-devel libffi-devel make bzip2 autoconf automake libtool bison sqlite-devel

Step 2: Install Ruby Version Manager (RVM)

We will use RVM to manage Ruby installations. Run the following command to install RVM:

$ curl -sSL https://get.rvm.io | bash -s stable --ruby

After the installation, you need to either logout and login again or run the command:

$ source ~/.rvm/scripts/rvm

Step 3: Install Ruby

Now, we can install Ruby using RVM. Run the following command:

$ rvm install ruby --default

This will install the latest stable version of Ruby and set it as the default version.

Step 4: Install Node.js

Ruby on Rails requires JavaScript runtime for asset compilation. We will install Node.js for this purpose. Run the following command:

$ sudo dnf module install nodejs

Step 5: Install Rails

Finally, we can install Rails using the gem package manager. Run the following command:

$ gem install rails

This will install the latest stable version of Rails for your Ruby installation.

Step 6: Verify Installation

To verify the installation, run the commands below:

$ ruby --version
$ rails --version

You should see the versions of Ruby and Rails installed.

Congratulations! You have successfully installed Ruby on Rails on your CentOS 8 system. You can now start building your web applications using the Rails framework.

Refer A Friend
Get $25

Ruby on Rails
CentOS 8

Why Customers Love Us

What our customers say about us

Ready To Get Started For Free?

Create your free account today.