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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With