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.
Pip is a bundle the board framework that rearranges establishment and the executives of programming bundles written in Python, for example, those f...
Apache CouchDB is a free and open-source NoSQL information base created by the Apache Software Foundation. CouchDB worker stores its informa...
MySQL is the most famous open-source social information base administration framework. It is quick, simple to utilize, versatile, and an indispensa...
In this guide, we will cover the Laravel 5 module authentication system. Laravel 5 offers a very solid core authentication system that enables simp...
Transient is an open-source order line apparatus for building and overseeing virtual machine conditions. As a matter of course, Vagrant can arrange...
VirtualBox is an open-source cross-stage virtualization programming which permits you to run various visitor working frameworks (virtual machines) ...
OpenCV (Open Source Computer Vision Library) is an open-source PC vision library and has ties for C++, Python, and Java. It is utilized for a huge ...
Java is one of the most mainstream programming dialects used to construct various types of uses and frameworks. There are two unique executi...
At the point when you sign in to a Ubuntu framework unexpectedly, prior to accomplishing any work, it is consistently a smart thought to check what...
Peak Browser courses your web traffic through the Tor organization, making it private and mysterious. At the point when you utilize the Tor Browser...
When composing Bash contents you will regularly need to contrast two strings with check in the event that they are equivalent or not. Two strings a...
Have you ever needed to list all clients in your Linux framework or to include the quantity of clients in the framework? There are orders to make a...
MySQL is the most famous open-source social information base administration framework. This instructional exercise depicts how to erase (or ...
Show is one of the most famous cross-stage internet browsers on the planet. It is quick, simple to utilize and make sure about program worked for t...
Java is perhaps the most well known programming dialects on the planet, used to fabricate various types of uses and frameworks. This instruc...
In this guide we'll disclose how to change a client secret key in Linux. We will likewise tell you the best way to drive clients to change thei...
The sudo order is intended to permit clients to run programs with the security advantages of another client, naturally the root client. In t...
The ip order is an incredible asset for designing organization interfaces that any Linux framework overseer should know. It is accustomed to cut in...
Apache Tomcat is an open-source execution of Java Servlet, JavaServer Pages, Java Expression Language, and Java WebSocket innovations. It is quite ...