A collection of computer systems and programming tips that you may find useful.
Brought to you by Craic Computing LLC, a bioinformatics consulting company.

Thursday, May 24, 2007

Installing Rubygems on Linux Fedora

If you are using Ruby then you definitely need to have rubygems (the gem command) installed.

I ran into a problem doing this on a Fedora Core 4 system on Amazon Web Services EC2. I had installed Ruby 1.8.6, downloaded rubygems-0.9.4 and ran 'ruby setup.rb'. I got an error like this:
  LoadError: No such file to load -- zlib

The problem is that there is no zlib (compression) library installed in the underlying Linux

To fix the problem:

1: As root,
# yum install zlib-devel
2: Recompile ruby
# cd ruby-1.8.6
# ./configure
# make
# make install

3: Install rubygems
# cd ../rubygems-0.9.4
# ruby setup.rb


Unknown said...

Thank you for posting this fix! I have been pulling my hair out, first figuring out that zlib was missing, then trying to find a set of instructions that worked!

Blogger said...

There's a chance you are eligible to receive a $1,000 Amazon Gift Card.

Blogger said...

BlueHost is ultimately the best website hosting provider for any hosting plans you require.

Archive of Tips