1. curl -L https://get.rvm.io | bash -s stable –ruby
2. sudo apt-get install zlib1g-dev
3. rvm reinstall 1.9.2-p180
$ rvm reinstall 1.9.3
apt-get install libsqlite3-dev
sudo apt-get install libssl-dev
Than go to the source of ruby and go to the following path
cd ext/openssl
sudo apt-get install libssl-dev
Than go to the source of ruby and go to the following path
cd ext/openssl
Run the command one after the others.
ruby extconf.rb
make
sudo make install