cannot load such file -- zlib
For some reason, I need to use Ubuntu to develop Ruby on Rails. After installing ruby through rvm, I use command 'gem sources -a http://ruby.taobao.org/' to add source, but I got an error 'cannot load such file -- zlib....'. The reason is that I haven't install required packages, so, the solution is
$ sudo apt-get install zlib1g-dev
and then reinstall ruby
$ rvm reinstall 1.9.3
Actually, all of below packages should be installed(command 'rvm requirements' will show you)
$ sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config