Forum: Ruby gem_original_require zlib problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
33016269f72c5f03f95404e49fdc9d3d?d=identicon&s=25 Steve Dame (sdameba)
on 2008-10-08 22:21
I'm trying to just to a first time install of gems (and net/ssh ) in
particular... and I can't even do a

> gem update --system

I get the following dump (any idea how to fix this?)

/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require': no such file to load -- zlib (LoadError)
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:1
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:5
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:140:in
`load_and_instantiate'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:65:in `[]'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:118:in
`find_command'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:104:in
`process_args'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:75:in
`run'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:39:in `run'
        from /usr/local/bin/gem:24
289cf19aa581c445915c072bf45c5e25?d=identicon&s=25 Todd Benson (Guest)
on 2008-10-08 23:05
(Received via mailing list)
On Wed, Oct 8, 2008 at 3:18 PM, Steve Dame <stephen.g.dame@boeing.com>
wrote:
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:5
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:65:in `[]'
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:39:in `run'
>        from /usr/local/bin/gem:24

I had a similar error in Ubuntu, but I think I fixed it by making sure
I had the development libraries for compression.  That was a while
ago, so I can't recall exactly how I fixed it.

Todd
753dcb78b3a3651127665da4bed3c782?d=identicon&s=25 Brian Candler (candlerb)
on 2008-10-09 10:11
Steve Dame wrote:
> I get the following dump (any idea how to fix this?)
>
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `gem_original_require': no such file to load -- zlib (LoadError)
>         from

If you built ruby itself from source, this means that the zlib extension
wasn't built at that time. This in turn probably means that you didn't
have the zlib development headers installed at the time.

Check you have a package called something like 'zlib-devel' and rebuild
ruby.
1f7e8dca6f763e10aa6f42aacefd2b5f?d=identicon&s=25 Hondo Burney (illrigger)
on 2008-10-09 16:23
Brian Candler wrote:
> Steve Dame wrote:
>> I get the following dump (any idea how to fix this?)
>>
>> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
>> `gem_original_require': no such file to load -- zlib (LoadError)
>>         from
>
> If you built ruby itself from source, this means that the zlib extension
> wasn't built at that time. This in turn probably means that you didn't
> have the zlib development headers installed at the time.
>
> Check you have a package called something like 'zlib-devel' and rebuild
> ruby.

I have been wrestling with this issue as well. How do I check for a
package, and if I don't have it, then what do i do?
753dcb78b3a3651127665da4bed3c782?d=identicon&s=25 Brian Candler (candlerb)
on 2008-10-09 18:49
>> Check you have a package called something like 'zlib-devel' and rebuild
>> ruby.
>
> I have been wrestling with this issue as well. How do I check for a
> package, and if I don't have it, then what do i do?

Depends on what platform you're using. For example:

On CentOS:
rpm -qa | grep zlib
yum install zlib-devel

On Ubuntu:
dpkg-query -l | grep zlib
apt-get install zlib1g-dev
# or something like that - I don't have an Ubuntu box handy right now
33016269f72c5f03f95404e49fdc9d3d?d=identicon&s=25 Steve Dame (sdameba)
on 2008-10-09 20:19
Hondo Burney wrote:
> Brian Candler wrote:
>> Steve Dame wrote:
>>> I get the following dump (any idea how to fix this?)
>>>
>>> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
>>> `gem_original_require': no such file to load -- zlib (LoadError)
>>>         from
>>
>> If you built ruby itself from source, this means that the zlib extension
>> wasn't built at that time. This in turn probably means that you didn't
>> have the zlib development headers installed at the time.
>>
>> Check you have a package called something like 'zlib-devel' and rebuild
>> ruby.
>
> I have been wrestling with this issue as well. How do I check for a
> package, and if I don't have it, then what do i do?

It appears that we were able to finally get Ruby to bind to the openssl
through rebuilding a couple of different configurations on SUSE Linux
10.

Thanks for all the pointers.
This topic is locked and can not be replied to.