Saturday, October 12, 2013

How to install Ruby 1.9.3 on Ubuntu 13.04

Step 1: Login as root user
        
avinash@avinash-Z500:$ sudo su

Step 2: Issue the following command to install RVM(Ruby Version Manager) using curl

avinash#  bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

Step 3: run the following command to add a line to the bashrc file

# echo '[[ -s "/home/avinash/.rvm/scripts/rvm" ]] && source "/home/avinash/.rvm/scripts/rvm"' >> ~/.bashrc

In the above command change the name avinash into your pc username

Step 4 : run the command to check whether the above line was added to bashrc file or not

# nano ~/.bashrc

Step 5: run this command 

# source ~/.bashrc

Step 6: If the output of the below command shows rvm is a function,then we have a working rvm installed. 

# type rvm | head -1

Step 7: run this command to install ruby 1.9.3

# rvm install 1.9.3

Step 8: run this command to make ruby 1.9.3 as default

# rvm use --default 1.9.3

1 comment :

  1. Or you could simply use the Ubuntu Software center and then just upgrade the ruby version.

    ReplyDelete