You need to install zlib
before compiling/installing Ruby. If you didn t do this, make sure to remove everything related to Ruby 1.9.1 from your ~/.rvm
folder (so that it will be build from scratch).
Install zlib
using your favorite package manager:
sudo apt-get install zlib1g-dev
You might also want to install the following packages as they are required by tools like OpenSSL,
Nokogiri, IRB or SQLite:
libssl-dev libreadline6-dev libxml2-dev libsqlite3-dev
Then install Ruby 1.9.1 again (nowadays I would suggest to use a newer version):
rvm install 1.9.1
Watch for "compiling ...". This should take a while. If it doesn t, then Ruby 1.9.1 might still be cached
in your ~/.rvm
folder.