How to Install Ruby on CentOS 8
Ruby is one of the most famous dialects today. It has an exquisite punctuation, and it is the language behind the Ruby on Rails structure.
In this article, we will investigate various approaches to introduce Ruby on CentOS 8.
We'll tell the best way to introduce Ruby from the default CentOS 8 vaults and utilizing the Rbenv and RVM contents. Pick the establishment technique that is generally suitable for your arrangement and climate.
Installing Ruby from the CentOS repositories
This is the least demanding technique for introducing Ruby on CentOS. At the hour of composing, the form in the standard CentOS archives is 2.5.5.
Run the accompanying order as root or client with sudo benefits to introduce the ruby bundle:
sudo dnf install ruby
When the establishment is finished, you can confirm that it was effective by printing the Ruby form:
The yield will look something like this:
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]
Your Ruby form may contrast from the one appeared previously.
That is it! You have effectively introduced Ruby on your CentOS framework, and you can begin utilizing it.
Install Ruby with Rbenv
Rbenv is a lightweight Ruby form the executives utility that permits you to handily switch Ruby variants.
We'll utilize the ruby-form module that expands the center usefulness of Rbenv and permit you to introduce any Ruby adaptation from source.
Start by introducing git and different conditions needed to construct Ruby from the source:
sudo dnf install git wget gcc bzip2 openssl-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel
Run the accompanying order to introduce both rbenv and ruby-form:
wget -q https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer -O- | bash
The content will clone both rbenv and ruby-form storehouses from GitHub to ~/.rbenv index.
Before beginning utilizing rbenv, you have to include $HOME/.rbenv/receptacle to your PATH .
In the event that you are utilizing Bash, type:
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(rbenv init -)"' >> ~/.bashrc source ~/.bashrc
In the event that you are utilizing Zsh type:
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc echo 'eval "$(rbenv init -)"' >> ~/.zshrc source ~/.zshrc
Run the rbenv - v order to guarantee that establishment was fruitful:
To get a rundown of all Ruby forms that can be introduced with rbenv enter:
rbenv install -l
For example, if you want to install the Ruby 2.7.0 and set it as default version you would type:
rbenv install 2.7.0rbenv global 2.7.0
Verify that Ruby was properly installed by printing the version number:
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]
Installing Ruby with RVM
RVM (Ruby Version Manager) is an order line instrument that permits you to introduce, oversee, and work with various Ruby conditions.
To begin with, introduce the conditions required for rvm to construct Ruby from source:
sudo dnf install curl gcc bzip2 openssl-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel
Run the accompanying orders to import the GPG keys and introduce RVM:
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB curl -sSL https://get.rvm.io | bash -s stable
To begin utilizing RVM you have to run the accompanying source order:
To get a rundown of all known Ruby variants type:
rvm list known
In the event that for instance, you need to introduce Ruby 2.6 and set it as the default rendition you would give the accompanying orders:
rvm install 2.6 rvm use 2.6 --default
Check the establishment:
ruby -v ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
For more data about how to deal with your Ruby establishments with RVM visit the RVM Documentation page .
We have given you three distinct approaches to introduce Ruby on your CentOS 8 worker. The strategy you pick relies upon your prerequisites and inclinations. Despite the fact that introducing the bundled adaptation from the CentOS vault is simpler, the Rbenv and RVM techniques give you greater adaptability for including and eliminating diverse Ruby variants on a for every client premise.
In the event that you have any inquiries or criticism, don't hesitate to remark beneath.
So you use the query builder from laravel to get all the orders that belong to a particular result using condition, but you want to allow the user ...
Boa constrictor is the most well known Python/R information science and AI stage. It is utilized for enormous scope information handling, prescient...
OpenCart is a free and open-source PHP online business stage consolidating amazing highlights with adaptability and easy to use interface. W...
Our tutorials are designed to make web development simple. Step-by-step instructions make our tutorial more developer-friendly. Therefore web devel...
CentOS, just as all other Linux dispersions, is a multi-client working framework. Every client can have distinctive authorization levels and explic...
As another Ubuntu client, you may think about how to sign in to your Ubuntu framework as a root client or what is the default root secret phrase. I...
This instructional exercise tells you the best way to introduce Tomcat 8.5 on CentOS 7. Tomcat is an open-source execution of Java Servlet, JavaSer...
Docker is a containerization stage that permits you to rapidly fabricate, test, and send applications as compact, independent compartments that can...
Skype is one of the most famous correspondence applications on the planet that permits you to make free online sound and video calls, and reasonabl...
PostgreSQL, regularly referred to just as Postgres, is an open-source universally useful item social information base administration framework.&nbs...
PHP is one of the most utilized worker side programming dialects. In this guide, we will examine how to introduce PHP on Debian 10, Buster. ...
Middleware provides a convenient method for entering the program to process HTTP requests. I've built three middleware, and by working I have ...
WildFly , once known as JBoss is a cross-stage open-source application runtime written in Java that encourages you manufacture astounding applicati...
Webmin is an open-source control board that permits you to deal with your Linux worker through a simple to-utilize web interface. It permits you to...
Ajax makes your application more portable, you don't need to reload or refresh the entire body for small changes, you can make changes without ...
CouchDB is a free and open-source issue lenient NoSQL information base kept up by the Apache Software Foundation. CouchDB worker stores its ...
Have you failed to remember your MySQL root secret key? Try not to stress, it happens to us all. In this article, we will tell you the best ...
Chrome Browser is the most generally utilized internet browser on the planet. It is quick, simple to utilize, and make sure about program worked fo...
Plex is a streaming media worker that lets you arrange your video, music, and photograph assortments and stream them to the entirety of your gadget...