Ubuntu being a mainstream os offers a lot of pre built binaries that are ready for installation.
Install ruby ubuntu terminal.
With package managers or third party tools you have plenty of options to install and manage ruby.
This should output some information on the installed ruby version.
One way open the terminal window sometimes called a shell or bash shell is to select applications accessories terminal.
Install ruby by typing.
You can check inside a terminal emulator by typing.
All the code here will be run using the ubuntu cli terminal.
The installation steps listed in this article will work for both versions of ubuntu 18 04 lts and 19 04.
Ruby is a dynamic open source programming language with a focus.
Run the command which ruby.
Sudo apt get install software properties common.
This is one of the most popular application development stacks in use.
Choose your installation method.
By following one of the three methods above you will successfully install ruby on ubuntu 18 04.
Here are the commands to install with apt.
Sudo apt get install rubygems.
First we need to install a pre requisite.
We ll be using the ruby full package to get our installation up and running.
This package lets us install any version of ruby on our ubuntu machine and allows us to switch between versions.
Today we ll be looking at how to install ruby and rubygems on ubuntu 18 04 lts and ubuntu 19 04.
Steps to install ruby on ubuntu.
Sudo snap install ruby classic.
There are several ways to install ruby.
At the time of writing the version in the ubuntu repositories is 2 5 1 which is the latest stable version of ruby.
If you don t see any response or get an error message ruby is not installed.
Installing rubygems using apt get on ubuntu.
Open a terminal window.
Here is the command to install with snap.
Rails is a development framework for the ruby programming language that simplifies and speeds up app development.
If you are planning on doing any development in ruby this is a must have.
To install ruby from the default ubuntu repositories follow these steps.
Open up your ubuntu terminal and type the command.
You may already have ruby installed on your computer.
This article will show you various ways to install it depending on what linux distribution you are using.
Type sudo apt update and press enter.
Tldr run these commands from the terminal application.
First update the packages index.
Install ruby on ubuntu with snap.
If you see a path such as usr bin ruby ruby is installed.
Install ruby on ubuntu with apt.
Rubygems is for ruby as apt get and yum are to linux operating systems.
Next you may want to install a full ruby on rails stack.
The easiest way to install ruby on your ubuntu system is through the apt package manager.
Now let s get right into the steps for installing the language on ubuntu.