Bugs: Browse | Submit New | Admin

[#22028] 1.8.6-27 RC1, "gem update" causes Zlib::BufError

Date:
2008-09-19 15:16
Priority:
3
Submitted By:
Nobody
Assigned To:
Luis Lavena (luislavena)
Category:
All other Bugs
State:
Closed
Summary:
1.8.6-27 RC1, "gem update" causes Zlib::BufError

Detailed description
On a fresh Ruby install using OCI, I get the following:

C:\Documents and Settings\user>gem update --backtrace
Updating installed gems
ERROR:  While executing gem ... (Zlib::BufError)
    buffer error
        C:/Apps/Development/Ruby/lib/ruby/site_ruby/1.8/rubygems.rb:378:in `read
'
        C:/Apps/Development/Ruby/lib/ruby/site_ruby/1.8/rubygems.rb:378:in `gunz
ip'
        C:/Apps/Development/Ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb
:208:in `load_specs'
        C:/Apps/Development/Ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb
:173:in `list'
        C:/Apps/Development/Ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb
:165:in `each'
        C:/Apps/Development/Ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb
:165:in `list'
        C:/Apps/Development/Ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb
:116:in `find_matching'
        C:/Apps/Development/Ruby/lib/ruby/site_ruby/1.8/rubygems/commands/update
_command.rb:140:in `which_to_update'
        C:/Apps/Development/Ruby/lib/ruby/site_ruby/1.8/rubygems/commands/update
_command.rb:132:in `each'
        C:/Apps/Development/Ruby/lib/ruby/site_ruby/1.8/rubygems/commands/update
_command.rb:132:in `which_to_update'
        C:/Apps/Development/Ruby/lib/ruby/site_ruby/1.8/rubygems/commands/update
_command.rb:68:in `execute'
        C:/Apps/Development/Ruby/lib/ruby/site_ruby/1.8/rubygems/command.rb:136:
in `invoke'
        C:/Apps/Development/Ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager
.rb:105:in `process_args'
        C:/Apps/Development/Ruby/lib/ruby/site_ruby/1.8/rubygems/command_manager
.rb:75:in `run'
        C:/Apps/Development/Ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:3
9:in `run'
        C:/Apps/Development/Ruby/bin/gem:24

C:\Documents and Settings\insmisem>

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-09-23 01:17
Sender: Josh Campbell

Just an FYI, everything worked fine after my second install of
OCI, even with MySQL running.  Thanks for the great work Luis
(and OCI team).  Keep it up, it's very appreciated.

I hope this comment doesn't open the bug again, that's not my
intention.  If it does, please close it per the info Luis posted
below.
Date: 2008-09-21 13:41
Sender: Luis Lavena

Hello everybody,

I just committed in revision:342 a fix to properly remove the
bundled zlib extension and use the site_ruby one.

This can be a proper fix, but you must also verify that no other
zlib1.dll is in the PATH, and if present, it should be version
1.2.3, anything older will generate conflicts.

I'll wait to prepare the second Release Candidate waiting for
RubyGems 1.3.0

I'm closing this for now. Feel free to open if you find any other
issue with Zlib.

Regards.
--
Luis Lavena
Date: 2008-09-20 01:37
Sender: Josh Campbell

OK, I've completely uninstalled OCI and ensure the entire Ruby
directory is gone.  I then searched for zlib1.dll on my system
and turned up a number of versions, only one of which is in my
%PATH% variable.  The one in my path is tied to MySQL 5 Tools
1.2.12 (zlib1.dll ver 1.2.1.1429), the other versions are not
in my path and tied to Trillian, RIM software like Blackberry
Desktop Manager, and VMware Workstation and VirtualCenter 2.5
client.

After installing OCI C:\Ruby\bin appears in my path before the
MySQL directory, so it should use that version of zlib1.dll first
(verified as 1.2.3.0) I would assume.  After installing OCI clean
I can successfully run a "gem update" without issue.
I can then do a rails install no problem.  I'm going to try rebooting,
I'll post back if there's an issue once I reboot.  I have no
idea what caused this issue before. I don't think I installed
anything after OCI/rails, unless it's something tied to opening
Aptana for the first time after the OCI install, which I'll
investigate as well.  More after the reboot...


Date: 2008-09-19 22:12
Sender: Luis Lavena

Thank you guys for the feedback!

The version of Zlib used is 1.2.3, as you can verify from the
the irb console:

irb(main):001:0> RUBY_VERSION
=> "1.8.6"
irb(main):002:0> RUBY_PATCHLEVEL
=> 287
irb(main):003:0> require 'zlib'
=> true
irb(main):004:0> Zlib::Z
Zlib::ZLIB_VERSION  Zlib::ZStream
irb(main):004:0> Zlib::Z
Zlib::ZLIB_VERSION  Zlib::ZStream
irb(main):004:0> Zlib::ZLIB_VERSION
=> "1.2.3"
irb(main):005:0> Zlib::VERSION
=> "0.6.0"

I just veirifed that no other ruby, zlib1.dll exist in the PATH
that can affect functionality.

Bundled zlib1.dll is version 1.2.3, downloaded form
http://www.zlib.net/

Installing Rails 2.1.1:

gem install rails --no-ri --no-rdoc
Successfully installed activesupport-2.1.1
Successfully installed activerecord-2.1.1
Successfully installed actionpack-2.1.1
Successfully installed actionmailer-2.1.1
Successfully installed activeresource-2.1.1
Successfully installed rails-2.1.1
6 gems installed

Install something after it:
$ gem install rails -v "1.2.6" --no-ri --no-rdoc
Successfully installed activesupport-1.4.4
Successfully installed activerecord-1.15.6
Successfully installed actionpack-1.13.6
Successfully installed actionmailer-1.3.6
Successfully installed actionwebservice-1.2.6
Successfully installed rails-1.2.6
6 gems installed

I'll try to replicate in another system and get back to you guys.
Date: 2008-09-19 20:14
Sender: Clinton Begin

I had the same problem....

My solution:  Update ZLib.

http://gnuwin32.sourceforge.net/downlinks/zlib-bin-zip.php

Unzip that, copy the zlib1.dll over top of the one in your ruby/bin
directory.  You'll note that the new one is about 30% bigger
than the old one.... I wonder how old the ruby one is?

Anyway, works like magic.
Date: 2008-09-19 18:05
Sender: Josh Campbell

Same here, worked fine once and I installed rails, now it's hosed.
My trace is the same as well.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
status_idOpen2008-09-21 13:41luislavena
resolution_idNone2008-09-21 13:41luislavena
summary1.8.6-27 RC1, "gem update" causes Zlib::BufError2008-09-21 13:41luislavena
close_date2008-09-21 13:412008-09-21 13:41luislavena
assigned_tonone2008-09-19 22:12luislavena
summary1.8.6-27 RC1, "gem update" causes Zlib::BufError2008-09-19 22:12luislavena