Forum: Ruby zlib.so (LoadError)

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.
1046d40347b8cfbdb75d852fbc3e9bec?d=identicon&s=25 Michael Madrid (kagemusha)
on 2008-12-17 23:59
I'm getting the error below when trying to install ruby gems on Windows
Vista.
My Ruby version is 1.8.7 and gems 1.3.1.  I installed Ruby from the zip
file ruby-1.8.7-i386-mswin32.zip and gems by running ruby setup.rb.

The zlib.so file is in the directory so I don't know why it can't find
it.  Help appreciated.

programs/ruby/lib/ruby/1.8/i386-mswin32/zlib.so: 126: The specified
module could not be found.   -
c:/programs/ruby/lib/ruby/1.8/i386-mswin32/zlib.so (LoadError)
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
  from c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:10
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
  from c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/format.rb:9
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
  from c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:11
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:3
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:4
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:140:in
`load_and_instantiate'
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:65:in
`[]'
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:118:in
`find_command'
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:104:in
`process_args'
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:75:in
`run'
  from
c:/programs/ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:39:in
`run'
  from c:/programs/ruby/bin/gem:24
3da512875f3295be2d577fa70b3493b4?d=identicon&s=25 Sebastian W. (globulus)
on 2008-12-18 00:59
Are you compiling from source? I've never tried to get Ruby running
under Vista besides the One-Click Installer, but on Linux, the zlib
errors usually come up when I don't have the development libraries
installed.
E1e2dd8c03c8e9e0680cfd802df0a04b?d=identicon&s=25 Alex 2k8 (alex_2k8)
on 2008-12-18 01:15
Hello,

You need the zlib.dll.

1. http://www.zlib.net/ and download compiled DLL, version 1.2.3
2. Copy downloaded zlib1.dll into
C:\ruby-1.8.7-i386-mswin32\bin\zlib.dll
 Notice that the name changes from zlib1.dll to zlib.dll

- Alex
1046d40347b8cfbdb75d852fbc3e9bec?d=identicon&s=25 Michael Madrid (kagemusha)
on 2008-12-18 03:10
Tks Alex.

I just copied the zlib1.dll to zlib.dll and it seems this works too.

Michael

Alex 2k8 wrote:
> Hello,
>
> You need the zlib.dll.
>
> 1. http://www.zlib.net/ and download compiled DLL, version 1.2.3
> 2. Copy downloaded zlib1.dll into
> C:\ruby-1.8.7-i386-mswin32\bin\zlib.dll
>  Notice that the name changes from zlib1.dll to zlib.dll
>
> - Alex
This topic is locked and can not be replied to.