Issue #1157 has been updated by wei gui.


The error is due to zlib1g-dev is not installed by default. In ubuntu, to solve it:
1. sudo apt-get install zlib1g-dev # to install the dependent zlib
2. cd <ruby-src>/ext/zlib # go to ext/zlib in ruby source directory
2. ruby extconf.rb 
3. make # to generate zlib.so
4. make install



----------------------------------------
Bug #1157: missing zlib.rb?
http://redmine.ruby-lang.org/issues/1157

Author: Fred Obermann
Status: Rejected
Priority: Immediate
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux] 


=begin
 I just installed 1.9.1 onto Mandriva 2009 (Linux version 2.6.27.10-desktop-1mnb (qateam / titan.mandriva.com) (gcc version 4.3.2 (GCC) ))
 Ran ./configure
 Ran make 
 Ran: gem install rails
 
 And this is what I got:
 
 [root@tango ruby-1.9.1-p0]# gem install rails
 /usr/local/lib/ruby/1.9.1/rubygems/package.rb:10:in `require': no such file to load -- zlib (LoadError)
 	from /usr/local/lib/ruby/1.9.1/rubygems/package.rb:10:in `<top (required)>'
 	from /usr/local/lib/ruby/1.9.1/rubygems/format.rb:9:in `require'
 	from /usr/local/lib/ruby/1.9.1/rubygems/format.rb:9:in `<top (required)>'
 	from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:11:in `require'
 	from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:11:in `<top (required)>'
 	from /usr/local/lib/ruby/1.9.1/rubygems/dependency_installer.rb:3:in `require'
 	from /usr/local/lib/ruby/1.9.1/rubygems/dependency_installer.rb:3:in `<top (required)>'
 	from /usr/local/lib/ruby/1.9.1/rubygems/commands/install_command.rb:4:in `require'
 	from /usr/local/lib/ruby/1.9.1/rubygems/commands/install_command.rb:4:in `<top (required)>'
 	from /usr/local/lib/ruby/1.9.1/rubygems/command_manager.rb:140:in `require'
 	from /usr/local/lib/ruby/1.9.1/rubygems/command_manager.rb:140:in `rescue in load_and_instantiate'
 	from /usr/local/lib/ruby/1.9.1/rubygems/command_manager.rb:132:in `load_and_instantiate'
 	from /usr/local/lib/ruby/1.9.1/rubygems/command_manager.rb:65:in `[]'
 	from /usr/local/lib/ruby/1.9.1/rubygems/command_manager.rb:118:in `find_command'
 	from /usr/local/lib/ruby/1.9.1/rubygems/command_manager.rb:104:in `process_args'
 	from /usr/local/lib/ruby/1.9.1/rubygems/command_manager.rb:75:in `run'
 	from /usr/local/lib/ruby/1.9.1/rubygems/gem_runner.rb:39:in `run'
 	from /usr/local/bin/gem:24:in `<main>'
=end



-- 
http://redmine.ruby-lang.org