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