We're here to assist with any of your needs, don't hestitate to reach out.
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.
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
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
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.
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
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.
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.
What our customers say about us
Create your free account today.