Open "Terminal" and type following:
sudo apt-get install ruby1.9.1-dev
You will be asked to given the password for root user, please input and press Enter.
Then you will see following message in "Terminal", just type y and Enter.
Then you should see following screen after install successfully.
You can type
ruby -v to see the ruby version you have installed.