Install ruby 2.x on ubuntu 14.04

By default the apt-get will install ruby 1.9.3. To install ruby 2:

  1. Install RVM
    gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \curl -sSL https://get.rvm.io | bash -s stable source ~/.rvm/scripts/rvm rvm requirements

  2. Install ruby
    rvm install ruby rvm use ruby --default