Donnerstag, Jänner 05, 2006

Ruby Gems on Ubuntu Linux

I've just installed the latest and greatest version of Ruby on my Linux box. So far so good. However, installing Rubygems was not straightforward: The setup aborted with a
No such file to load -- zlib (LoadError)
What gives? Well, some digging revealed the problem: the packages zlib1g and zlib1g-dev were missing on my system. So, I got them with apt-get. Unfortunately, that was not the whole story. The ruby bindings for zlib were missing too. Fortunately, a Japenese rubyist came to rescue and made my day. In short:

sudo apt-get install zlib1g
sudo apt-get install zlib1g-dev
cd ruby-1.8.4/ext/zlib
ruby extconf.rb --with-zlib-include=/usr/include --with-zlib-lib=/usr/lib
make
sudo make install
and you are ready to run
cd ../../../rubygems-0.8.11
ruby setup.rb

2 Comments:

Anonymous Anonym said...

you don't know me...but i sincerely love you! You have NO IDEA how long i've been trying to get this to work and you've literally given me EXACATLY what i needed to get my install up and running.

THANK YOU!

You just got a new fan for your site!

-a

8:05 AM  
Blogger Daniel Mitterdorfer said...

I'm delighted to hear that my blog saves somebody else a bit of time (and nerves, I guess) ;)

Regards,

Daniel

8:22 AM  

Kommentar veröffentlichen

<< Home