27 May 2012

Installing Ruby 1.9.3 In Ubuntu 10.04

Prerequisites for installing Ruby 1.9.3 via RVM are that GIT and Curl is installed.


Installing RVM


  1. Download and run RVM install script - sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
  2. Add all users who need to use Ruby to the RVM group
  3. Logout and login
  4. Update RVM so that the rvm command can be run - rvmsudo rvm get head
  5. Reload the terminal (shell) - source ~/.profile
  6. Test to see if RVM was installed and configured properly - type rvm | head -1
          Terminal should output the following, rvm is a function



Installing Ruby 1.9.3


  1. Install Ruby 1.9.3 – rvm install 1.9.3
  2. Set the default version of Ruby to use to 1.9.3 – rvm use 1.9.3
  3. Test to see if the Ruby interpreter runs with the correct version – ruby -v


Installing OpenSSL And Readline Packages


  1. Install libssl-dev Ubuntu package
  2. Install OpenSSL RVM package - rvm pkg install openssl
  3. Reinstall Ruby with OpenSSL support - rvm reinstall 1.9.3 --with-openssl-dir=$rvm_path/usr
  4. Install libreadline6-dev Ubuntu package
  5. Install Readline RVM package - rvm pkg install readline
  6. Reinstall Ruby with Readline support - rvm reinstall 1.9.3 --with-readline-dir=$rvm_path/usr


Notes


Before starting on the installation of RVM you may need to change a setting in Gnome Terminal if it is used. In Gnome Terminal goto Edit → Profile Preferences. Within the shown dialog select Title and Command tab. Ensure that Run command as login shell is checked.

1 comment: