works on centos, but not on windows #14

Closed
spyhunter99 opened this Issue Jul 14, 2012 · 7 comments

2 participants

@spyhunter99

C:\Ruby193\bin>gem mirror
Fetching: http://rubygems.org/specs.4.8.gz
ERROR: While executing gem ... (Zlib::GzipFile::Error)
unexpected end of file

C:\Ruby193\bin>gem list

*** LOCAL GEMS ***

bigdecimal (1.1.0)
builder (3.0.0)
certified (0.1.0)
gzip (1.0)
http (0.2.0)
io-console (0.3)
json (1.5.4)
minitest (3.2.0, 2.5.1)
net-http-persistent (2.7)
persistent (0.1.0)
rake (0.9.2.2)
rdoc (3.12, 3.9.4)
rubygems-mirror (1.0.1)
Zliby (0.0.5)

@luislavena
RubyGems member

Please run the command with debug information on: gem mirror --debug -V and provide the entire backtrace along the output of gem env so help us diagnose.

@spyhunter99

EDIT: Please use backticks to put code blocks/output so GitHub UI doesn't break and things are still readable. Thank you.

C:\Ruby193>gem mirror --debug -V
Exception `LoadError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - cannot load such file -- net/http/pipeline
Exception `LoadError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:63 - cannot load such file -- net/http/pipeline
Fetching: http://rubygems.org/specs.4.8.gz
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EEXIST' at c:/Ruby193/lib/ruby/1.9.1/fileutils.rb:247 - File exists - c:/ruby193/mirror
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `EOFError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:543 - end of file reached
Exception `Zlib::GzipFile::Error' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:543 - unexpected end of file
ERROR:  While executing gem ... (Zlib::GzipFile::Error)
    unexpected end of file
        c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:543:in `read'
        c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:543:in `gunzip'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/rubygems-mirror-1.0.1/lib/rubygems/mirror.rb:35:in `block in update_specs'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/rubygems-mirror-1.0.1/lib/rubygems/mirror.rb:35:in `open'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/rubygems-mirror-1.0.1/lib/rubygems/mirror.rb:35:in `update_specs'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/rubygems-mirror-1.0.1/lib/rubygems/mirror/command.rb:48:in `block in execute'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/rubygems-mirror-1.0.1/lib/rubygems/mirror/command.rb:35:in `each'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/rubygems-mirror-1.0.1/lib/rubygems/mirror/command.rb:35:in `execute'
        c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:278:in `invoke'
        c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:147:in `process_args'
        c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:117:in `run'
        c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:65:in `run'
        c:/Ruby193/bin/gem:30:in `<main>'

C:\Ruby193>



C:\Ruby193>gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.23
  - RUBY VERSION: 1.9.3 (2012-04-20 patchlevel 194) [i386-mingw32]
  - INSTALLATION DIRECTORY: c:/Ruby193/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: c:/Ruby193/bin/ruby.exe
  - EXECUTABLE DIRECTORY: c:/Ruby193/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mingw32
  - GEM PATHS:
     - c:/Ruby193/lib/ruby/gems/1.9.1
     - C:/Users/Alex/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/
@spyhunter99

I installed net-http-pipeline and reran, different output

C:\Ruby193>gem install net-http-pipeline
Fetching: net-http-pipeline-1.0.1.gem (100%)
Successfully installed net-http-pipeline-1.0.1
1 gem installed
Installing ri documentation for net-http-pipeline-1.0.1...
Installing RDoc documentation for net-http-pipeline-1.0.1...

C:\Ruby193>gem mirror
Fetching: http://rubygems.org/specs.4.8.gz
ERROR:  While executing gem ... (Zlib::GzipFile::Error)
    unexpected end of file

C:\Ruby193>gem mirror --debug -V
Exception `LoadError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - cannot load such file -- net/http/pipeline
Fetching: http://rubygems.org/specs.4.8.gz
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `Errno::EWOULDBLOCK' at c:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:141 - A non-blocking socket operation could not be completed immediately. - read wou
ld block
Exception `EOFError' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:543 - end of file reached
Exception `Zlib::GzipFile::Error' at c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:543 - unexpected end of file
ERROR:  While executing gem ... (Zlib::GzipFile::Error)
    unexpected end of file
        c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:543:in `read'
        c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:543:in `gunzip'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/rubygems-mirror-1.0.1/lib/rubygems/mirror.rb:35:in `block in update_specs'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/rubygems-mirror-1.0.1/lib/rubygems/mirror.rb:35:in `open'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/rubygems-mirror-1.0.1/lib/rubygems/mirror.rb:35:in `update_specs'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/rubygems-mirror-1.0.1/lib/rubygems/mirror/command.rb:48:in `block in execute'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/rubygems-mirror-1.0.1/lib/rubygems/mirror/command.rb:35:in `each'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/rubygems-mirror-1.0.1/lib/rubygems/mirror/command.rb:35:in `execute'
        c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:278:in `invoke'
        c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:147:in `process_args'
        c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:117:in `run'
        c:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:65:in `run'
        c:/Ruby193/bin/gem:30:in `<main>'
@luislavena luislavena added a commit that closed this issue Jul 14, 2012
@luislavena luislavena Read files in binary mode. Fixes #14
RubyGems specs files (Marshal and compressed one) were read with default
mode, causing issues since default mode is 'text' on Windows.

Change code to use convenience method Gem.read_binary for that purpose.
5235fbc
@luislavena
RubyGems member

@spyhunter99 thanks for the report, the correction for this landed in 5235fbc

Will be part of next gem (or you could build it locally)

Cheers.

@spyhunter99

thanks for the fast response. is there any how to for updating the gem from source?

@luislavena
RubyGems member

@spyhunter99 as mentioned above, you can clone the repository, build the gem and then install locally.

@spyhunter99

I can confirm that it now works on windows. Thanks!

Here's the steps had to run in order to build it from source. The unit tests can't be ran on windows because it requires /dev/null

download the source tree from here
gem install hoe
echo building..
c:/Ruby193/bin/ruby.exe -w -Ilib;bin;test;. -e 'require "rubygems"; require "minitest/autorun";
gem install pkg/rubygems-mirror-1.0.1.gem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment