# Strange Gem Problems

**URL:** <https://www.ruby-forum.com/t/strange-gem-problems/166932>\
**Category:** Ruby\
**Created:** [May 1, 2009, 2:51am UTC](https://www.ruby-forum.com/t/strange-gem-problems/166932 "2009-05-01T02:51:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![requisition](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c0e974/32.png) [@requisition](https://www.ruby-forum.com/u/requisition)\
**Post date:** [May 1, 2009, 2:51am UTC](https://www.ruby-forum.com/t/strange-gem-problems/166932/1 "2009-05-01T02:51:28Z")

</div>

Hey all,

I’m trying to add to install the program Bangkok as a gem, but every  
time I try I get this error.

sudo gem install bangkok  
/usr/local/lib/ruby/site\_ruby/1.9.1/rubygems/package.rb:10:in `require': no such file to load -- zlib (LoadError) from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/package.rb:10:in`\<top (required)\>’  
from /usr/local/lib/ruby/site\_ruby/1.9.1/rubygems/format.rb:9:in  
`require' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/format.rb:9:in`\<top  
(required)\>’  
from /usr/local/lib/ruby/site\_ruby/1.9.1/rubygems/installer.rb:11:in  
`require' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:11:in`\<top (required)\>’  
from  
/usr/local/lib/ruby/site\_ruby/1.9.1/rubygems/dependency\_installer.rb:3:in  
`require' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/dependency_installer.rb:3:in`\<top (required)\>’  
from  
/usr/local/lib/ruby/site\_ruby/1.9.1/rubygems/commands/install\_command.rb:4:in  
`require' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:4:in`\<top (required)\>’  
from  
/usr/local/lib/ruby/site\_ruby/1.9.1/rubygems/command\_manager.rb:167:in  
`require' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:167:in`rescue in load\_and\_instantiate’  
from  
/usr/local/lib/ruby/site\_ruby/1.9.1/rubygems/command\_manager.rb:159:in  
`load_and_instantiate' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:88:in`[]’  
from  
/usr/local/lib/ruby/site\_ruby/1.9.1/rubygems/command\_manager.rb:144:in  
`find_command' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:131:in`process\_args’  
from  
/usr/local/lib/ruby/site\_ruby/1.9.1/rubygems/command\_manager.rb:102:in  
`run' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:58:in`run’  
from /usr/local/bin/gem:21:in `’

I’ve tried reinstalling the latest version of Gems, but it didn’t seem  
to help. Any ideas? Thanks!

---

<div class="post-metadata">

**Author:** ![requisition](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c0e974/32.png) [@requisition](https://www.ruby-forum.com/u/requisition)\
**Post date:** [May 1, 2009, 9:33am UTC](https://www.ruby-forum.com/t/strange-gem-problems/166932/2 "2009-05-01T09:33:18Z")

</div>

On Apr 30, 2009, at 17:54 , Timothy Mr. wrote:

> Hey all,
> 
> I’m trying to add to install the program Bangkok as a gem, but every  
> time I try I get this error.
> 
> sudo gem install bangkok  
> /usr/local/lib/ruby/site\_ruby/1.9.1/rubygems/package.rb:10:in  
> `require’:  
> no such file to load – zlib (LoadError)

nothing is wrong with your rubygems. you don’t have zlib in your ruby  
install.

---

<div class="post-metadata">

**Author:** ![requisition](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c0e974/32.png) [@requisition](https://www.ruby-forum.com/u/requisition)\
**Post date:** [May 1, 2009, 3:43pm UTC](https://www.ruby-forum.com/t/strange-gem-problems/166932/3 "2009-05-01T15:43:09Z")

</div>

Dang, how can I fix this?

---

<div class="post-metadata">

**Author:** ![requisition](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c0e974/32.png) [@requisition](https://www.ruby-forum.com/u/requisition)\
**Post date:** [May 1, 2009, 8:24pm UTC](https://www.ruby-forum.com/t/strange-gem-problems/166932/4 "2009-05-01T20:24:35Z")

</div>

On 5/1/09, Timothy S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Dang, how can I fix this?

It depends on your OS/distribution. On Ubuntu/Debian install the  
package zlib1g-dev, (which contains the header files ruby’s zlib  
extension needs to build properly) then re-configure, make and make  
install your ruby-1.9 which it looks like you installed yourself from  
source. Then reinstall rubygems. Other systems will name the package  
with zlib header files differently, but otherwise instructions are the  
same.
