RubyInstaller 1.8.7 RC2 - ERROR: While executing gem ... (Zlib::GzipFile::Error) not in gzip format

552 views
Skip to first unread message

skim

unread,
Feb 7, 2010, 2:14:36 PM2/7/10
to RubyInstaller
Hi all,

First and foremost, thanks Luis and team for the latest release of
RubyInstaller, now in three different flavors. I installed
RubyInstaller 1.8.7 RC2 on my fresh Windows 7 x64 box and applied dev
kit over it.

RubyInstaller 1.8.7 RC2 w/ dev kit is located C:\Ruby187\

When I try to install a gem, I'm getting a zlib error. Any ideas? I
will try installing RubyInstaller 1.9.1 to see if it has the same
problem.

skim

unread,
Feb 7, 2010, 2:18:24 PM2/7/10
to RubyInstaller
RubyInstaller 1.9.1 RC2 displays the same error when attempting to
install any gem.

Luis Lavena

unread,
Feb 7, 2010, 2:20:39 PM2/7/10
to rubyin...@googlegroups.com

Is a previous Ruby (from Ruby-Lang or One-Click installation) first in the path?

If so, please remove it, as the bundled zlib1.dll these versions
included could be interfering with the bundled zlib1.dll found by
RubyInstaller.

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Luis Lavena

unread,
Feb 7, 2010, 2:22:09 PM2/7/10
to rubyin...@googlegroups.com
On Sun, Feb 7, 2010 at 8:20 PM, Luis Lavena <luisl...@gmail.com> wrote:
>> [...]

>> RubyInstaller 1.8.7 RC2 on my fresh Windows 7 x64 box and applied dev
>> kit over it.
>>
>> RubyInstaller 1.8.7 RC2 w/ dev kit is located C:\Ruby187\
>>
>> When I try to install a gem, I'm getting a zlib error.  Any ideas?  I
>> will try installing RubyInstaller 1.9.1 to see if it has the same
>> problem.
>>
>
> Is a previous Ruby (from Ruby-Lang or One-Click installation) first in the path?
>

You can try this on a command prompt since you're using Windows 7

where zlib1.dll
where zlib.dll

If that finds some files, these could be interfering.

skim

unread,
Feb 7, 2010, 2:38:21 PM2/7/10
to RubyInstaller
Cool, I tried the where commands. This is what it comes back with:

C:\Users\skim>where zlib1.dll
C:\Ruby187\bin\zlib1.dll

C:\Users\skim>where zlib.dll
INFO: Could not find files for the given pattern(s).

Here's my Path=C:\Windows\system32;C:\Windows;C:\Windows
\System32\Wbem;C:\Windows\System32\WindowsPo
werShell\v1.0\;D:\system\ati\ATI.ACE\Core-Static;D:\multimedia
\quicktime\QTSystem\;D:\p\Gi
t\cmd;D:\p\Git\bin;C:\Ruby187\bin

Any other ideas? I tried installing RubyInstaller 1.9.1 RC1 and it
doesn't work either. So it doesn't look like it's a RC2 specific
issue. Again this is a brand new install of Windows 7 Professional.
I didn't have this kind of problem on my work machines. Is
RubyInstaller dependent on something else?


On Feb 7, 11:22 am, Luis Lavena <luislav...@gmail.com> wrote:

Luis Lavena

unread,
Feb 7, 2010, 2:41:10 PM2/7/10
to rubyin...@googlegroups.com
On Sun, Feb 7, 2010 at 8:38 PM, skim <ski...@gmail.com> wrote:
> Cool, I tried the where commands.  This is what it comes back with:
>
> C:\Users\skim>where zlib1.dll
> C:\Ruby187\bin\zlib1.dll
>
> C:\Users\skim>where zlib.dll
> INFO: Could not find files for the given pattern(s).
>
> Here's my Path=C:\Windows\system32;C:\Windows;C:\Windows
> \System32\Wbem;C:\Windows\System32\WindowsPo
> werShell\v1.0\;D:\system\ati\ATI.ACE\Core-Static;D:\multimedia
> \quicktime\QTSystem\;D:\p\Gi
> t\cmd;D:\p\Git\bin;C:\Ruby187\bin
>
> Any other ideas?  I tried installing RubyInstaller 1.9.1 RC1 and it
> doesn't work either.  So it doesn't look like it's a RC2 specific
> issue.  Again this is a brand new install of Windows 7 Professional.
> I didn't have this kind of problem on my work machines.  Is
> RubyInstaller dependent on something else?
>

Nop, and I just tried with all the mingw builds for the RC2 and all them works.

Can you paste the full gem install command with "--debug -V" option?
Also is important for me to know the gem name

Or if you're behind a HTTP proxy, which could be generating an
incorrect .gem file being downloaded.

skim

unread,
Feb 7, 2010, 3:01:04 PM2/7/10
to RubyInstaller
Here you go:

C:\Users\skim>gem install pik --debug -V
Exception `NameError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/
command_manager.rb:161
- uninitialized constant Gem::Commands::InstallCommand
Exception `Gem::LoadError' at C:/Ruby187/lib/ruby/site_ruby/1.8/
rubygems.rb:827 - Could no
t find RubyGem test-unit (>= 0)

GET 200 OK: http://gemcutter.org/gems/latest_specs.4.8.gz
Exception `Zlib::GzipFile::Error' at C:/Ruby187/lib/ruby/site_ruby/1.8/
rubygems.rb:578 - n
ot in gzip format
ERROR: While executing gem ... (Zlib::GzipFile::Error)
not in gzip format
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:578:in
`initialize'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:578:in `new'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:578:in `gunzip'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:
165:in `fetch_path'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:
227:in `load_specs'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:
192:in `list'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:
188:in `each'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:
188:in `list'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:
123:in `find_matching'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:
69:in `fetch'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/
dependency_installer.rb:99:in `find_gem
s_with_sources'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/
dependency_installer.rb:192:in `find_sp
ec_by_name_and_version'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/
dependency_installer.rb:213:in `install
'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/commands/
install_command.rb:118:in `exe
cute'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/commands/
install_command.rb:115:in `eac
h'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/commands/
install_command.rb:115:in `exe
cute'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/command.rb:257:in
`invoke'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:
132:in `process_args
'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:
102:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:58:in
`run'
C:/Ruby187/bin/gem:21

On Feb 7, 11:41 am, Luis Lavena <luislav...@gmail.com> wrote:

Luis Lavena

unread,
Feb 7, 2010, 3:15:59 PM2/7/10
to rubyin...@googlegroups.com
On Sun, Feb 7, 2010 at 9:01 PM, skim <ski...@gmail.com> wrote:
> Here you go:
>
> C:\Users\skim>gem install pik --debug -V
> Exception `NameError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/
> command_manager.rb:161
>  - uninitialized constant Gem::Commands::InstallCommand
> Exception `Gem::LoadError' at C:/Ruby187/lib/ruby/site_ruby/1.8/
> rubygems.rb:827 - Could no
> t find RubyGem test-unit (>= 0)
>
> GET 200 OK: http://gemcutter.org/gems/latest_specs.4.8.gz
> Exception `Zlib::GzipFile::Error' at C:/Ruby187/lib/ruby/site_ruby/1.8/
> rubygems.rb:578 - n
> ot in gzip format
> ERROR:  While executing gem ... (Zlib::GzipFile::Error)
>    not in gzip format
>        C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:578:in
> `initialize'
>        C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:578:in `new'
>        C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:578:in `gunzip'
>        C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:
> 165:in `fetch_path'
>        C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:


Ok, can't reproduce, just installed pik successfuly.

http://gist.github.com/297650

First: I have gems.rubyforge.org as gem source, not gemcutter.org

Second: the first thing I received from the latest_specs request is this:

GET 302 Found: http://gems.rubyforge.org/latest_specs.4.8.gz
GET 200 OK: http://production.s3.rubygems.org/latest_specs.4.8.gz

A 302 redirect, which should happen with gemcutter.org too.

What could be different in your setup? dunno.

skim

unread,
Feb 7, 2010, 3:33:47 PM2/7/10
to RubyInstaller
I switched the source to http://gems.rubyforge.org/ and now the debug
info looks like this: http://gist.github.com/297660

On Feb 7, 12:15 pm, Luis Lavena <luislav...@gmail.com> wrote:

Luis Lavena

unread,
Feb 7, 2010, 3:37:40 PM2/7/10
to rubyin...@googlegroups.com
On Sun, Feb 7, 2010 at 9:33 PM, skim <ski...@gmail.com> wrote:
> I switched the source to http://gems.rubyforge.org/ and now the debug
> info looks like this: http://gist.github.com/297660
>

Ok, please do the following:

Collect the output of "gem env" and paste it in your response.

Before doing that, also see where gems files are stored, and inside
that folder, locate "specs"

I found it in C:\Users\Luis\.gem\specs

remove that folder with "rd specs /s/q"

Now, try the gem installation again.

What could be the problem is the lack of permissions to write inside C:\ folder

Please remove The Ruby187 folder completely after uninstall of
RubyInstaller and install without Administrative privileges.

It is pretty weird that is faulting in "Errno::EEXIST" for C:\

skim

unread,
Feb 7, 2010, 4:00:24 PM2/7/10
to RubyInstaller
Ok I figured it out. In Vista x64, I did not need to escalate the
command prompt to install gems before. I had to escalate in Windows
7. In fact, I just disabled UAC to install the gem.

I'm sorry for the inconvenience and appreciate the help Luis.


Thanks,
skim

On Feb 7, 12:37 pm, Luis Lavena <luislav...@gmail.com> wrote:
> On Sun, Feb 7, 2010 at 9:33 PM, skim <skim...@gmail.com> wrote:
> > I switched the source tohttp://gems.rubyforge.org/and now the debug

Luis Lavena

unread,
Feb 7, 2010, 4:09:25 PM2/7/10
to rubyin...@googlegroups.com
On Sun, Feb 7, 2010 at 10:00 PM, skim <ski...@gmail.com> wrote:
> Ok I figured it out.  In Vista x64, I did not need to escalate the
> command prompt to install gems before.  I had to escalate in Windows
> 7.  In fact, I just disabled UAC to install the gem.
>
> I'm sorry for the inconvenience and appreciate the help Luis.
>

With newer installer you should not be required to escalate security
to install gems, unless the directory you're installing Ruby indicates
so

For example, I'm member of administrator, but installed RC2 as normal
user (not "As Administrator") and was able to install gems without
issues.

As for the separate installations of 1.8.6 and 1.8.7, I've opened a
feature request:
http://rubyforge.org/tracker/index.php?func=detail&aid=27794&group_id=167&atid=718

Regards,

skim

unread,
Feb 7, 2010, 10:00:32 PM2/7/10
to RubyInstaller
I've noticed other programs (w/o escalating the security) were unable
to access C root. I never noticed this on my new Windows 7 machines
at work because they all have UAC turned off. I'm not sure if this is
something new in Windows 7, but installing directly on C root can be
problematic it seems.

Thanks for opening up the feature request for 1.8.6 and 1.8.7.

On Feb 7, 1:09 pm, Luis Lavena <luislav...@gmail.com> wrote:


> On Sun, Feb 7, 2010 at 10:00 PM, skim <skim...@gmail.com> wrote:
> > Ok I figured it out.  In Vista x64, I did not need to escalate the
> > command prompt to install gems before.  I had to escalate in Windows
> > 7.  In fact, I just disabled UAC to install the gem.
>
> > I'm sorry for the inconvenience and appreciate the help Luis.
>
> With newer installer you should not be required to escalate security
> to install gems, unless the directory you're installing Ruby indicates
> so
>
> For example, I'm member of administrator, but installed RC2 as normal
> user (not "As Administrator") and was able to install gems without
> issues.
>
> As for the separate installations of 1.8.6 and 1.8.7, I've opened a

> feature request:http://rubyforge.org/tracker/index.php?func=detail&aid=27794&group_id...

Luis Lavena

unread,
Feb 8, 2010, 3:28:51 AM2/8/10
to rubyin...@googlegroups.com
On Mon, Feb 8, 2010 at 4:00 AM, skim <ski...@gmail.com> wrote:
> I've noticed other programs (w/o escalating the security) were unable
> to access C root.  I never noticed this on my new Windows 7 machines
> at work because they all have UAC turned off.  I'm not sure if this is
> something new in Windows 7, but installing directly on C root can be
> problematic it seems.
>
> Thanks for opening up the feature request for 1.8.6 and 1.8.7.
>

I formatted and let Windows 7 x64 partition my laptop drive.

My user (Luis) is member of Administrators group. I've setup UAC to
the maximum (so it prompts to ever file operation required in Program
Files, Program Files (x86) or inside Windows folder

I've managed to create, inside a normal prompt, files, folders and
everything at the root of the drive without requiring any type of
privilege elevation.

I'm aware that on previous Windows NT, 2000 and XP, this was not
possible, but seems Windows 7 permissions are different.

The following is my icacls for C:\

C:\Users\Luis>icacls C:\
C:\ BUILTIN\Administrators:(F)
BUILTIN\Administrators:(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(F)
NT AUTHORITY\SYSTEM:(OI)(CI)(IO)(F)
BUILTIN\Users:(OI)(CI)(RX)
NT AUTHORITY\Authenticated Users:(OI)(CI)(IO)(M)
NT AUTHORITY\Authenticated Users:(AD)
Mandatory Label\High Mandatory Level:(OI)(NP)(IO)(NW)

Successfully processed 1 files; Failed processing 0 files

Users can OI, CI and RX:

Object Inherit, Container Inherit and Read and Execute, now the
generated folder for Ruby187:
(installed without elevation or as admin, but user is still member of
administrator group)

C:\Users\Luis>icacls C:\Ruby187
C:\Ruby187 BUILTIN\Administrators:(I)(F)
BUILTIN\Administrators:(I)(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(I)(F)
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(IO)(F)
BUILTIN\Users:(I)(OI)(CI)(RX)
NT AUTHORITY\Authenticated Users:(I)(M)
NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(IO)(M)

Successfully processed 1 files; Failed processing 0 files

===

Now, removed and installed as simple user, no member of administrators at all:

C:\Users\Testing>icacls C:\
C:\ BUILTIN\Administrators:(F)
BUILTIN\Administrators:(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(F)
NT AUTHORITY\SYSTEM:(OI)(CI)(IO)(F)
BUILTIN\Users:(OI)(CI)(RX)
NT AUTHORITY\Authenticated Users:(OI)(CI)(IO)(M)
NT AUTHORITY\Authenticated Users:(AD)
Mandatory Label\High Mandatory Level:(OI)(NP)(IO)(NW)

Successfully processed 1 files; Failed processing 0 files

=========

C:\Users\Testing>icacls C:\Ruby
C:\Ruby BUILTIN\Administrators:(I)(F)
BUILTIN\Administrators:(I)(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(I)(F)
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(IO)(F)
BUILTIN\Users:(I)(OI)(CI)(RX)
NT AUTHORITY\Authenticated Users:(I)(M)
NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(IO)(M)

Successfully processed 1 files; Failed processing 0 files

===========

I would recommend checking these permissions since you upgraded from
Vista to Windows 7, some issues could exist on the security bits of
your NTFS partition.

skim

unread,
Feb 8, 2010, 10:18:38 PM2/8/10
to RubyInstaller
Thanks Luis for the thorough investigation. I actually installed a
fresh copy of Windows 7 (formatting Vista prior to installation). I
will see if my permissions are funky and if it's some other third
party software causing the problem.


Cheers!
skim

On Feb 8, 12:28 am, Luis Lavena <luislav...@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages