Error installing rubygems 0.8.1 with ruby 1.8.2

I have compiled and installed ruby 1.8.2preview3 on a new laptop.

On trying to install rubygems 0.8.1 (ruby install.rb) I get an error
finding the file zlib at the end of the installation. I tried both
commenting and uncommenting the #zlib line in the ext/Setup file
during the compilation of ruby 1.8.2. From the console:

···

---
As of RubyGems 0.8.0, library stubs are no longer needed.
Searching $LOAD_PATH for stubs to optionally delete (may take a while)...
...done.
No library stubs found.

/usr/local/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`require__': No such file to load -- zlib (LoadError)
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/package.rb:9
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`require__'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/builder.rb:1
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`require__'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/loadpath_manager.rb:5:in
`require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:58:in `manage_gems'
        from install.rb:142:in `install_rb'
        from install.rb:148
---

Any ideas? I'm going to Sun's Java Tech Days in NYC Tue and Wed, would
be nice to show Ruby to people, if only I could get gems installed ...

Cheers,
Rob

I have compiled and installed ruby 1.8.2preview3 on a new laptop.

What does the following do for you from IRB?

require 'zlib'

RubyGems requires that zlib is installed.

-austin

···

On Tue, 9 Nov 2004 14:02:12 +0900, Rob . <rob.02004@gmail.com> wrote:
--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca

RubyGems requires that zlib is installed.

Austin, your hunch was right, zlib was not installed on my machine.

What do I need to do to get zlib installed when compiling and
installing ruby 1.8.2preview3 on GNU/Linux?

When executing 'make install' for ruby <snippet>:
  installing zlib
  make[1]: Entering directory `/home/a/apps/versions/ruby/1.8.2p3/ext/zlib'
  make[1]: Nothing to be done for `install'.
  make[1]: Leaving directory `/home/a/apps/versions/ruby/1.8.2p3/ext/zlib'

I have tried changing the ext/Setup file in several ways, including
commenting and uncommenting 'option nodynamic' and the 'zlib' line.
I'm using:
  gcc version 3.3.4 (Debian 1:3.3.4-9ubuntu5)
  GNU Make 3.80

Cheers,
Rob

you have to install the *system* zlib library first, then rebuild ruby.
Search your package manager for (z)ziplib.

-klaus