Saturday, October 12, 2013

How to install ruby 1.9.3 in ubuntu

If you want to upgrade Packages then

sudo apt-get update

Follow this steps for installation for Ruby

Step 1 : Install recommended Packages 

           sudo apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev libncurses5-dev automake libtool bison subversion


Step 2 : Install Git

           sudo apt-get install curl git-core


Step 3 : Install Ruby Version Manager(RVM)

bash < <(curl -sk https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
Step 4: Setup RVM
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc

Step 5:

 source ~/.bashrc
Step 6 : Check for RVM installation
 type rvm | head -1

Step 7 : Install Ruby with version 1.9.3

rvm install 1.9.3
Step 8: Setup Default Ruby Version

           You can check all installed Ruby versions with command:

                     rvm list
             Set Default Ruby Version

                  rvm use 1.9.3 --default


Step 9 : For check ruby installation is done or not with command…
              ruby -v

1 comment: