Ruby – RVM Ruby 1.9.1 install can’t locate zlib but its runtime and dev library are there

rubyrubygemsrvmzlib

Trying to get Ruby 1.9.1 up and running with RVM on a fresh install (fedora).

After doing rvm install 1.9.1, the rubygems error logs show that zlib can't be located

no such file to load — zlib (LoadError)

However both the zlib runtime and development libraries are installed and up-to-date.

I'm kinda stumped on this one at the moment.

Best Solution

Use rvm to install zlib

https://rvm.io/packages/zlib/

rvm package install zlib
rvm remove 1.9.1
rvm install 1.9.1 -C --with-zlib-dir=$rvm_path/usr

Edit: The rvm package command was renamed to rvm pkg in v1.6.25.

Related Question