My "solution" was a lot simplier. As all the files were there but
miniruby/ruby installer was not finding them I just copied zlib.h and
zconf.h (inserted by zlib.h) into <package-dir>/include (the ../../include
reference) and the build and gem install worked fine after that.

Thanks for the advice!

On Mon, Feb 15, 2010 at 10:49 AM, Brian Candler <b.candler / pobox.com> wrote:

> Michael Felt wrote:
> > I have downloaded ruby-1.91-1-p376, configured and built
> >
> > (./configure --with-pthreads; make;make install)
> >
> > downloaded rubygem 1.3.5, unpacked, then
> >
> > ruby setup.rb
> >
> > And when I run
> >
> > # gem install rails
> >
> > I get the following error:
> > # gem install rails
> > /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/package.rb:10:in `require':
> > no
> > such file to load -- zlib (LoadError)
>
> This means that ruby zlib library wasn't built when you were building
> ruby 1.9, but rubygems needs it.
>
> The solution depends on what system you are building under. For example,
> if you are building under Ubuntu, then you need to do
>
>    sudo apt-get install zlib1g-dev
>
> then reconfigure and rebuild ruby 1.9 from scratch, so it can detect the
> zlib header files and build the ruby zlib extension, then try and build
> rubygems again.
>
> I'd also recommend
>
>    sudo apt-get install libssl-dev
>
> before building ruby, because without this, ruby won't have openssl
> support and hence can't do HTTPS.
>
> Regards,
>
> Brian.
> --
> Posted via http://www.ruby-forum.com/.
>
>