windows installation error -- ZLib buffer error

40 views
Skip to first unread message

bio...@gmail.com

unread,
Oct 29, 2007, 2:54:13 PM10/29/07
to ShatteredRuby
Hi -- I've just tried to install shattered ruby with the command:
gem install shattered --include-dependencies

This returns a ZLib buffer error that updating to the latest version
of RubyGems hasn't fixed.
Can anyone advise on a next step to take to solve this?
I'm not massively au-fait with gems, and this is the first gem I've
tried to install that returned this error.
Sorry that's all a little vague.
Cheers,
Doug.

JeremyW...@gmail.com

unread,
Oct 29, 2007, 3:26:45 PM10/29/07
to ShatteredRuby
Find the rubygems/package.rb
file (wherever it happens to be in your Ruby installation), open it
up, and find the zipped_stream method. Then, replace it, wholesale,
with the following:

def zipped_stream(entry)
entry.read(10) # skip the gzip header
zis = Zlib::Inflate.new(-Zlib::MAX_WBITS)
is = StringIO.new(zis.inflate(entry.read))
ensure
zis.finish if zis
end

doug livesey

unread,
Oct 29, 2007, 3:42:01 PM10/29/07
to shatte...@googlegroups.com
That worked a charm, thanks, man!
   Doug.

JeremyW...@gmail.com

unread,
Oct 29, 2007, 3:46:42 PM10/29/07
to ShatteredRuby
np. Good luck with the Shattered, it's some pretty cool stuff.


~Jeremy

On Oct 29, 12:42 pm, "doug livesey" <biot...@gmail.com> wrote:
> That worked a charm, thanks, man!
> Doug.
>

Mikkel Garcia

unread,
Oct 29, 2007, 4:07:50 PM10/29/07
to shatte...@googlegroups.com
We've run across this as well with rubygems.  It seems it's always almost fixed.

Here are a couple of steps to try: (http://rubyforge.org/tracker/?func=detail&atid=1698&aid=3927&group_id=426)

Resolution :

Edit C:\Program Files\Ruby\lib\ruby\site_ruby\1.8\rubygems\package.rb:610 :

-if Zlib::ZLIB_VERSION < ' 1.2.1'
+if Zlib::ZLIB_VERSION <= '1.2.1'
There is also talk of changing that line to:

-if Zlib::ZLIB_VERSION < '1.2.1'
+if Zlib::ZLIB_VERSION <= '1.2.3'

Let me know if either of those help.  It seems to happen on only some windows configurations.

-Mikkel

Mikkel Garcia

unread,
Oct 29, 2007, 4:09:07 PM10/29/07
to shatte...@googlegroups.com
NM, seems like I was late to the game here :)

doug livesey

unread,
Oct 30, 2007, 3:45:49 AM10/30/07
to shatte...@googlegroups.com
> NM, seems like I was late to the game here :)
Any & all assistance offered is *always* appreciated, man!


> Good luck with the Shattered, it's some pretty cool stuff.
Can't wait -- it's alife & game coding that got me into programming back in the day (on my CPC464!), but I haven't really had a serious look at it (game coding) since.
I know what I'm going to be doing all Christmas!
Reply all
Reply to author
Forward
0 new messages