gem install rails gives this error on Suse 9.3:

hi there, i'm new to RoR, installed ruby and rubygems alright, this is what happens when I try to install rails:

~ # gem install rails /root/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- zlib (LoadError)   from /root/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'   from /root/lib/ruby/site_ruby/1.8/rubygems/package.rb:10   from /root/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'   from /root/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'   from /root/lib/ruby/site_ruby/1.8/rubygems/format.rb:9   from /root/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'   from /root/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'   from /root/lib/ruby/site_ruby/1.8/rubygems/installer.rb:11    ... 11 levels...   from /root/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:103:in `process_args'   from /root/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:74:in `run'   from /root/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:39:in `run'   from /root/bin/gem:24 ~ #

this is after I compiled ruby myself from source (configure, make, make install) and installed rubygems (ruby setup.rb) also, it seems like I have zero gems installed :

~ # gem query --local

*** LOCAL GEMS ***

~ #

little it of help, please ? many thanks !

octimizer wrote:

hi there, i'm new to RoR, installed ruby and rubygems alright, this is what happens when I try to install rails:

~ # gem install rails /root/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- zlib (LoadError)

zlib is a ruby extension that is part of the ruby standard library (and as you might expect it's a set of ruby bindings for compression related stuff). Ruby will build without them though if it couldn't find the right headers etc.. You can find these extensions in the ruby source folder, under /ext. cd into relevant folder, run ruby extconf.rb and then make, make install. You'll get the usual sort of things if relevant libraries can't be found, which usually means that you need to tell it where to find various headers or libraries, with stuff like         --with-zlib-dir=/path/to/libz         --with-zlib-lib=/path/to/libz/lib         --with-zlib-include=/path/to/libz/include

while you're there, make sure the openssl and readline extensions have been built, you'll need them for rails.

Fred