bitrocker wrote:
> first of all: i'm new to the list, i'm new to ruby, i'm not to suse :)
> anyway: hi all!
>
> here's my prob (which doesnt seem to be my problem only, but i could'nt
> find any answer searching the net high and low)
>
> i installed ruby using yast (ruby 1.8.2), then i tried to install gems
> like this:
>
> 1. cd /usr/local/src
> 2. wget http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz
> 3. tar -zxvf rubygems-0.8.11.tgz
> (which extracts to rubygems-0.8.10, not rubygems-0.8.11 ???)
> 4. cd rubygems-0.8.10
> 5. ruby setup.rb
> 6. this causes the follwing (zlib?) error:
>
> 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/custom_require.rb:18:in
> `require__':
> No such file to load -- zlib (LoadError)
>         from
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18: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/custom_require.rb:18:in
> `require__'
>         from
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18: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/custom_require.rb:18:in
> `require__'
>         from
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
> `require'
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:61:in
> `manage_gems'
>          ... 7 levels...
>         from setup.rb:887:in `exec_install'
>         from setup.rb:705:in `invoke'
>         from setup.rb:674:in `invoke'
>         from setup.rb:1352
>
> .. everything i try now: ruby setup.rb setup, ruby setup.rb install,
> gem install rubygems-update ... everything causes this zlib error. i
> installed the latest zlib and zlib-devel package via yast... no change.
>
> my zlib is:
>
> zlib-1.2.1-70.12
>
> ruby is:
>
> ruby 1.8.2 (2004-12-25) i686-linux
>
> i tried searching for other ruby or zlib packages using yast but there
> aren't any other :/
>
> anyone?
>
> thanks: lars

I'm on Windows, trying to install rails with the preview version
of Ruby 1.8.3, built on August 9, 2005.  (Why?  Because I wanted
to do some performance analysis, and the ruby-prof library wants
something built after March 22, 2005).

The only way I could get the zlib bindings built and installed was
by downloading the zlib library, explicitly building ext/zlib
against that version, and installing it.  Seems to work, although
there are no tests I could find.

Here's how I did it:

1. Install zlib sources and binaries for Win32 from
www.zlib.org into C:/apps/GnuWin32

2. cd <ruby-src-distn>/ext/zlib

3. ruby extconf.rb --with-zlib-include=C:/apps/GnuWin32/include \
--with-zlib-lib=C:/apps/GnuWin32/lib

4. nmake DESTDIR=<target-dir> install

5. cp c:/apps/GnuWin32/bin/zlib1.dll c:/ruby183/bin

6. ruby -r zlib -e 1
Doesn't complain

7. cd back to rubygem download dir

8. ruby setup.rb
Works

9. gem install rails --include-depencies
Works

This only applies to working from source.  Previously I've used
Win and OSX installers, and had no problems.

HTH, Eric