The output you receive will show you which version of ruby you have installed just like in the image below.
Install ruby 2 5 ubuntu.
Ruby install allows you to compile and install different versions of ruby into arbitrary.
We will be setting up a ruby on rails development environment on ubuntu 20 04 focal fossa.
It is available for macos linux and other unix like operating systems.
Rbenv is a ruby version management tool that allows you to switch ruby versions easily.
Install ruby with rbenv.
As the same user you can install the most recent version of rails with the gem install command.
This article will help you to install ruby on rails on ubuntu and linuxmint linux systems using rvm.
Sudo apt install ruby full.
In this tutorial you ll set up a ruby programming environment on your local linux machine via the command line.
The reason we re going to be using ubuntu is because the majority of code you write will run on a linux server.
Ruby language was created by yukihiro matz matsumoto and first published in 1995.
Ruby build is a plugin for rbenv that allows you to compile and install different versions of ruby.
Update the package index list by typing.
Step 1 install rvm.
Ruby build can also be used as a standalone program without rbenv.
Rails are the framework to run ruby language.
Ubuntu is one of the easiest linux distributions to use with lots of documentation so it s a great one to start with.
Follow the below instruction as root or sudo user to install ruby with rbenv.
Home sammy rbenv versions 2 5 0 lib ruby gems 2 5 0.
At the time of this writing the current stable releases of ruby are 2 6 3 and 2 5 5.
First update the packages index.
However if we install with snap we ll get the latest stable release 2 6 3.
As you can see we have installed ruby version 2 5 1.
Rvm is the ruby version manager helps for installing and managing ruby language on systems.
At the time of writing the version in the ubuntu repositories is 2 5 1 which is the latest stable version of ruby.
To check whether the installation was successful type in the command.
However you ll notice later in this guide that when we install ruby from apt the version is going to be a bit older 2 5 1p57.
Once we have gems set up we can move on to install rails.
To install ruby from the default ubuntu repositories follow these steps.
It downloads the latest version of ruby and installs all of the prerequisite libraries.
Press y and hit enter to verify the installation.
By default rbenv doesn t handle installing ruby versions so we also need to install ruby build that will help you to install specific version of ruby.
It will work perfectly fine in this case.
Install ruby by.