Installing Rails - Problem with zlib

This is installed on CentOS 5.2.

I have installed Ruby 1.8.7

I downloaded and expanded Gem Manager 1.3.1 and Rails 2.1.2

I tried to install Rails using this:

gem install rails --include-dependencies

The result is this:

I understood that zlib was built into Ruby 1.8.7. Apparently not. So, I
read about it and it was suggested that I manually build zlib. So, I
downloaded ruby-zlib-0.6.0. Per the instructions, I ran this command:

ruby extconf.rb && make && make install

This is the result:

/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require’: no such file to load – zlib (LoadError)

Instlling ruby-zlib

checking for deflateReset() in -lz… no
checking for deflateReset() in -llibz… no
checking for deflateReset() in -lzlib… no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Can anyone provide some insight as to what I need to do to get Rails
installed?

Thank you.

Christopher Adams wrote:

The result is this:

I understood that zlib was built into Ruby 1.8.7. Apparently not. So, I
It is in that it is in the core ruby repository. It isn’t in that the
packages distributions like centos or debian create often carve ruby
up into ruby itself and separate out bits of ruby that depend on other
libraries (like zlib, openssl, readline etc…)

Instlling ruby-zlib

checking for deflateReset() in -lz… no
checking for deflateReset() in -llibz… no
checking for deflateReset() in -lzlib… no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

The ruby-zlib library didn’t get installed as you might have guessed.
While you almost certainly have the zlib libraries on your system, you
may not have the associated headers etc… a lot of distros have a
separate zlib-dev package or something along those lines. Get that,
install ruby-zlib and you should be on your way (you might have to
repeat the process with readline and/or openssl.

Fred

Frederick C. wrote:

Christopher Adams wrote:

The result is this:

I understood that zlib was built into Ruby 1.8.7. Apparently not. So, I
It is in that it is in the core ruby repository. It isn’t in that the
packages distributions like centos or debian create often carve ruby
up into ruby itself and separate out bits of ruby that depend on other
libraries (like zlib, openssl, readline etc…)

Instlling ruby-zlib

checking for deflateReset() in -lz… no
checking for deflateReset() in -llibz… no
checking for deflateReset() in -lzlib… no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

The ruby-zlib library didn’t get installed as you might have guessed.
While you almost certainly have the zlib libraries on your system, you
may not have the associated headers etc… a lot of distros have a
separate zlib-dev package or something along those lines. Get that,
install ruby-zlib and you should be on your way (you might have to
repeat the process with readline and/or openssl.

Fred

Fred,

Thank you for your reply. That is just what the doctor ordered. I am
moving foreard again.