The first step is to install some dependencies for Ruby.
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-devNow, we are going to be installing Ruby using one of three methods. Each have their own benefits, most people prefer using rbenv these days.
Installing with rbenv is a simple two step process. First you install rbenv, and then ruby-build.