“How to Install Ruby on Ubuntu 20.04”

“How to Install Ruby on Ubuntu 20.04”
May 29, 2020 by Editorial Staff
We hope this post helped you to find out “How to Install Ruby on Ubuntu 20.04”
Reading full article here https://www.mstvlife.com/how-to-install-ruby-on-ubuntu-20-04/
Ruby is without doubt one of the hottest programming languages in the present day. It has a chic syntax and focuses on simplicity and productiveness. Ruby is the language behind the highly effective Ruby on Rails framework.
On this tutorial we’ll present you three other ways to put in Ruby on Ubuntu 20.04:
- From the usual Ubuntu repositories. That is the best solution to set up Ruby on Ubuntu and needs to be enough for many use instances. The model included within the Ubuntu repositories is
2.7.0
. - Utilizing Rbenv. A script that lets you have a number of Ruby variations put in on the identical machine.
- Utilizing RVM (ruby enVironment supervisor). A heavier and extra feature-packed script that lets you set up, handle, and work with a number of ruby variations.
Select the set up methodology that’s applicable on your atmosphere. If you’re creating Ruby purposes and work a number of Ruby environments, then the popular approach is to put in Ruby utilizing Rbenv or RVM.
If you’re undecided which Ruby model to put in, seek the advice of the documentation of the appliance you’re going to deploy.
Contents [hide]
- 1 Installing in Ruby from Ubuntu Repositories #
- 2 Installing in Ruby utilizing Rbenv #
- 3 Putting in Ruby utilizing RVM #
- 4 Conclusion #
Installing in Ruby from Ubuntu Repositories #
The best solution to set up Ruby on Ubuntu is by utilizing the apt
bundle supervisor. On the time of writing, the model within the Ubuntu repositories is 2.7.0
, which can not all the time be the most recent secure launch.
The set up is fairly easy. Run the next instructions as root or person with sudo privileges to replace the bundle index and set up Ruby:
sudo apt update
sudo apt install ruby-full
Once completed, verify the installation by printing the Ruby version:
ruby --version
The output will look something like this:
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
Your Ruby model might differ from the one proven above.
That’s it! You’ve got efficiently put in Ruby in your Ubuntu machine, and you can begin utilizing it.
Reading full article here https://www.mstvlife.com/how-to-install-ruby-on-ubuntu-20-04/
Installing in Ruby utilizing Rbenv #
Rbenv is a light-weight command-line device that lets you simply swap Ruby variations.
By default, rbenv doesn’t deal with putting in Ruby. We’ll use ruby-build
to put in Ruby. It’s out there as a standalone program and as a plugin for rbenv.
The ruby-build
script installs Ruby from the supply. To have the ability to construct Ruby, set up the required libraries and compilers:
sudo apt updatesudo apt install git curl autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev
The only solution to set up the rbenv device is to make use of the set up shell script. Run the next curl
or to obtain and execute the script:
Conclusion #
Reading full article here https://www.mstvlife.com/how-to-install-ruby-on-ubuntu-20-04/
We have now proven you three other ways to put in Ruby on Ubuntu 20.04. The strategy you select is determined by your necessities and preferences. Although putting in the packaged model from the Ubuntu repository is simpler, the Rbenv and RVM scripts provide you with extra flexibility to make use of totally different Ruby variations on a per person foundation.
We hope the “How to Install Ruby on Ubuntu 20.04” help you. If you have any query regarding “How to Install Ruby on Ubuntu 20.04” drop a comment below and we will get back to you at the earliest.
We hope this post helped you to find out “How to Install Ruby on Ubuntu 20.04” . You may also want to see — How to Install PostgreSQL on Ubuntu 20.04