I dont know how to install the latest Ruby on Ubuntu.
First I installed the default Ruby 1.9.3, using
sudo apt-get install ruby
Then I tried to install the 2.0 version using
sudo apt-get install ruby2.0
My version of Ruby is still "ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux])"
What should I do?
There is a PPA with up-to-date versions of Ruby 2.x for Ubuntu 12.04+:
First of all, install the prerequisite libraries:
Then install rbenv, which is used to install Ruby:
Then (optional) tell Rubygems to not install local documentation:
Credits: https://gorails.com/setup/ubuntu/14.10
Warning!!! There are issues with
Gnome-Shell
. See comment below.update ubuntu:
Install rvm, which manages the ruby versions:
to install rvm use the following command.
Check ruby versions installed and in use:
Use RVM (Ruby Version Manager) to install and manage any versions of Ruby. You can have multiple versions of Ruby installed on the machine and you can easily select the one you want.
To install RVM type into terminal:
And let it work. After that you will have RVM along with Ruby installed.
Source: RVM Site
Best is to install it using rvm(ruby version manager).
Run following commands in a terminal:
Then check ruby versions installed and in use:
Also you can directly add ruby bin path to PATH variable. Ruby is installed in