Installing ruby in ubuntu with RVM
11 Oct 2010
gem, ubuntu, rvm
I needed to use different ruby versions in one box so I looked for a good way to manage ruby versions. One google search and I've found what I'm looking for, RVM. So the first stop is Railscasts. Episode 200 shows how to install Rails 3 using RVM.
After some experimentation with the help of the screencast and the rvm documentation, I was able to make everything working after encountering errors with zlib and readlines. So as a general rule of thumb, install all available package that comes with rvm. Use the following command
rvm package install ree_dependencies
to install zlib, ncurses, readline, openssl and iconv. Then you can install any ruby version with the following command
rvm install <ruby version> -C --with-readline-dir=$rvm_path/usr,--with-iconv-dir=$rvm_path/usr,--with-zlib-dir=$rvm_path/usr,--with-openssl-dir=$rvm_path/usr
By the way, I'm using Ubuntu 10.10.