views:

1871

answers:

4

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

So 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, So I'm kinda stumped on this one at the moment.

Any suggestions?

+7  A: 

did you install zlib before installing 1.9.1 through rvm? if not, make sure to remove everything 1.9.1 from your ~/.rvm folder (so that it will be build from scratch).

install important packages:

sudo apt-get install zlib1g-dev libssl-dev libreadline5-dev libxml2-dev libsqlite3-dev

then install 1.9.1 again:

rvm install 1.9.1

watch for "compiling ...". this should take some time. if it doesn't, then 1.9.1 might still be cached in your ~/.rvm folder.

rubiii
This worked fine for me, and I rather have stuff installed through the system's package manager than through the "rvm package" thing.
Hugo Peixoto
+10  A: 

Use rvm to install zlib

http://rvm.beginrescueend.com/packages/zlib/

rvm package install zlib
rvm remove 1.9.1
rvm install 1.9.1 -C --with-zlib-dir=$rvm_path/usr
JasonOng
This worked perfectly for me - thanks for the tip.
pakeha
great solution!
rubiii
A: 

When I try that, it prints:

Usage: 'rvm package {install,uninstall} {openssl,zlib,readline,iconv,ncurses}'

lsiden
A: 

Since you are using Fedora try running:

yum install zlib-devel.i686

And then try installing ruby 1.9.1 using RVM

rvm install 1.9.1
lmmendes