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