# Gem install rails gives this error on Suse 9.3:

**URL:** <https://www.ruby-forum.com/t/gem-install-rails-gives-this-error-on-suse-9-3/138661>\
**Category:** Rails\
**Created:** [May 26, 2008, 1:53pm UTC](https://www.ruby-forum.com/t/gem-install-rails-gives-this-error-on-suse-9-3/138661 "2008-05-26T13:53:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![octimizer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/4da419/32.png) [@octimizer](https://www.ruby-forum.com/u/octimizer)\
**Post date:** [May 26, 2008, 1:53pm UTC](https://www.ruby-forum.com/t/gem-install-rails-gives-this-error-on-suse-9-3/138661/1 "2008-05-26T13:53:51Z")

</div>

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 !

---

<div class="post-metadata">

**Author:** ![octimizer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/4da419/32.png) [@octimizer](https://www.ruby-forum.com/u/octimizer)\
**Post date:** [May 26, 2008, 2:02pm UTC](https://www.ruby-forum.com/t/gem-install-rails-gives-this-error-on-suse-9-3/138661/2 "2008-05-26T14:02:42Z")

</div>

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
