[Rubygems-developers] [ rubygems-Bugs-26199 ] zlib buffer error during gem update in v1.3.4 on 64-bit Windows Vista

noreply at rubyforge.org noreply at rubyforge.org
Sun Jul 5 13:10:42 EDT 2009

Bugs item #26199, was opened at 2009-06-11 08:19
You can respond by visiting: 

Category: `gem` commands (other)
Group: v1.3.x
>Status: Closed
>Resolution: Rejected
Priority: 3
Submitted By: Bob Holt (bobholt)
Assigned to: Luis Lavena (luislavena)
Summary: zlib buffer error during gem update in v1.3.4 on 64-bit Windows Vista

Initial Comment:
I have had this error in both my manual installation of Ruby and Rails as well as the InstantRails implementation. 

C:\ruby\rails_apps>gem update --debug rails
Exception `NameError' at C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:161 - uninitialized constant Gem::Commands::UpdateCommand
Exception `Gem::LoadError' at C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:826 - Could not find RubyGem test-unit (>= 0)

Updating installed gems
Exception `Gem::LoadError' at C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:826 - RubyGem version error: sources(0.0.1 not > 0.0.1)

Exception `Zlib::BufError' at C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:577 - buffer error
ERROR:  While executing gem ... (Zlib::BufError)
    buffer error
        C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:577:in `read'
        C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:577:in `gunzip'
        C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:165:in `fetch_path'
        C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:212:in `load_specs'
        C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:191:in `list'
        C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:187:in `each'
        C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:187:in `list'
        C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:122:in `find_matching'
        C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:169:in `which_to_update'
        C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:161:in `each'
        C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:161:in `which_to_update'
        C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb:75:in `execute'
        C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/command.rb:257:in `invoke'
        C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:132:in `process_args'
        C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:102:in `run'
        C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:58:in `run'
C:\ruby\rails_apps>gem env
RubyGems Environment:
  - RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
  - INSTALLATION DIRECTORY: C:/ruby/ruby/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: C:/ruby/ruby/bin/ruby.exe
  - EXECUTABLE DIRECTORY: C:/ruby/ruby/bin
    - ruby
    - x86-mswin32-60
     - C:/ruby/ruby/lib/ruby/gems/1.8
     - C:/Users/bob/.gem/ruby/1.8
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - http://gems.rubyforge.org/


>Comment By: Luis Lavena (luislavena)
Date: 2009-07-05 14:10

This error is a Zlib and zlib1.dll issue with garbagecollect builds of Ruby.

Moving or migrating to MinGW based versions, as detailed here:


Solves the problem.

Closing this since neither RubyGems nor One-Click Ruby Installer teams are responsible for the faulty binary extensions.


Comment By: Bob Holt (bobholt)
Date: 2009-06-15 16:02


Sorry for the delay - I switched to dual-booting Linux so
everything works right and haven't come back to Windows for
a while.

If I install everything under 32bit, it works. I'm running
late for an appointment, but I'll try 64 bit again later to
make sure it still breaks.



Comment By: Luis Lavena (luislavena)
Date: 2009-06-11 18:37

Should not be related, but just for the sake of testing, can you open a 32bits prompt and try again on 186-26?

Run %windir%\SysWOW64\cmd.exe

Let me know how that ends.


Comment By: Bob Holt (bobholt)
Date: 2009-06-11 09:18

Hi Luis,

I am hard-wired into a 30Mbps connection, and I uninstalled
and reinstalled 1.3.4 on 186-26 probably five different
times and tried updating a few different gems each time,
including some which had nothing to update. Each time I got
that same set of debug messages.


Comment By: Luis Lavena (luislavena)
Date: 2009-06-11 09:09

Thank you Bob,

Maybe the Zlib error was triggered due a corrupt file download, since the Rails gems are not small and RubyGems uses open-uri which doesn't guarantee too much file integrity.

Have seen similar issues over slow network connections.


Comment By: Bob Holt (bobholt)
Date: 2009-06-11 08:58

Just checked - rubygems 1.3.4 is fine under One-Click
Installer 186-27 (RC2). 

I rolled back to rubygems 1.3.3 under One-Click Installer
186-26 (Stable), and everything works fine there, too.


Comment By: Luis Lavena (luislavena)
Date: 2009-06-11 08:38

Hello Bob,

Can you confirm this happens with One-Click Installer 186-27? (RC2).

Also, 64bits prompt do not play nice with 32bits processes, but I believe that is not the issue here.


You can respond by visiting: 

More information about the Rubygems-developers mailing list