[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

My rubygems is completely broken (EOFErrors

Doug McBride

6/1/2009 11:41:00 PM

Here's my environment followed by what I'm seeing. I dug into the
code and found out that the "bad URI" it's complaining about is nil,
which is indeed pretty bad for a URI. I've searched for an answer in
vain. I've reinstalled rubygems by running setup.rb from the latest
rubygems release.

Does anyone have any ideas?


[dougmcbride@shiny /d/rubygems-1.3.4] sudo gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.4
- RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [universal-
darwin9.0]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-9
- GEM PATHS:
- /Library/Ruby/Gems/1.8
- /Users/dougmcbride/.gem/ruby/1.8
- /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.rubyforge....]
- REMOTE SOURCES:
- http://gems.ruby...


[dougmcbride@shiny /d/rubygems-1.3.4] sudo gem --debug install ruby-
debug
Exception `NameError' at /Library/Ruby/Site/1.8/rubygems/
command_manager.rb:161 - uninitialized constant
Gem::Commands::InstallCommand
Exception `Gem::LoadError' at /Library/Ruby/Site/1.8/rubygems.rb:826 -
Could not find RubyGem test-unit (>= 0)

Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:133 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:133 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:120 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:133 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:133 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:120 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:133 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:133 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:120 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:133 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:133 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:120 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:133 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:133 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:120 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:133 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:133 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:120 - end of file
reached
Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:133 - end of file
reached
nil
Exception `URI::InvalidURIError' at /System/Library/Frameworks/
Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/uri/common.rb:437 - bad
URI(is not URI?):
ERROR: While executing gem ... (URI::InvalidURIError)
bad URI(is not URI?):
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/uri/common.rb:437:in `split'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/uri/common.rb:486:in `parse'
/Library/Ruby/Site/1.8/rubygems/remote_fetcher.rb:258:in
`open_uri_or_path'
/Library/Ruby/Site/1.8/rubygems/remote_fetcher.rb:288:in
`open_uri_or_path'
/Library/Ruby/Site/1.8/rubygems/remote_fetcher.rb:164:in `fetch_path'
/Library/Ruby/Site/1.8/rubygems/remote_fetcher.rb:108:in `download'
/Library/Ruby/Site/1.8/rubygems/dependency_installer.rb:232:in
`install'
/Library/Ruby/Site/1.8/rubygems/dependency_installer.rb:222:in `each'
/Library/Ruby/Site/1.8/rubygems/dependency_installer.rb:222:in
`install'
/Library/Ruby/Site/1.8/rubygems/commands/install_command.rb:118:in
`execute'
/Library/Ruby/Site/1.8/rubygems/commands/install_command.rb:115:in
`each'
/Library/Ruby/Site/1.8/rubygems/commands/install_command.rb:115:in
`execute'
/Library/Ruby/Site/1.8/rubygems/command.rb:257:in `invoke'
/Library/Ruby/Site/1.8/rubygems/command_manager.rb:132:in
`process_args'
/Library/Ruby/Site/1.8/rubygems/command_manager.rb:102:in `run'
/Library/Ruby/Site/1.8/rubygems/gem_runner.rb:58:in `run'
/usr/bin/gem:21
6 Answers

7stud --

6/2/2009 12:20:00 AM

0

I don't know if this will help, but for comparison here is my setup:

$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.1
- RUBY VERSION: 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.11.1]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-darwin-8
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.8
- /Users/me/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.ruby...

I updated ruby to version 1.8.6, so I am not using the pre-installed
ruby. Also, at some point when I forgot to use sudo to install a gem,
rubygems created the local directory:

/Users/me/.gem/ruby/1.8

and installed the gem there. Now when I forget to use sudo to install a
gem, I do:

$ rm -rf /Users/me/.gem

to delete the whole directory, and then install the gem again using
sudo. Unfortunately, rubygems still reports the non-existent directory
under GEM PATHS, but that doesn't have any effect on anything.


--
Posted via http://www.ruby-....

matt

6/2/2009 12:24:00 AM

0

Doug McBride <doug.mcbride@gmail.com> wrote:

> Here's my environment followed by what I'm seeing. I dug into the
> code and found out that the "bad URI" it's complaining about is nil,
> which is indeed pretty bad for a URI. I've searched for an answer in
> vain. I've reinstalled rubygems by running setup.rb from the latest
> rubygems release.
>
> Does anyone have any ideas?
>
>
> [dougmcbride@shiny /d/rubygems-1.3.4] sudo gem env

You do not need sudo for this.

> RubyGems Environment:
> - RUBYGEMS VERSION: 1.3.4
> - RUBY VERSION: 1.8.6 (2008-03-03 patchlevel 114) [universal-
> darwin9.0]
> - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
> - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/
> Versions/1.8/usr/bin/ruby
> - EXECUTABLE DIRECTORY: /usr/bin
> - RUBYGEMS PLATFORMS:
> - ruby
> - universal-darwin-9
> - GEM PATHS:
> - /Library/Ruby/Gems/1.8
> - /Users/dougmcbride/.gem/ruby/1.8
> - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
> ruby/gems/1.8
> - GEM CONFIGURATION:
> - :update_sources => true
> - :verbose => true
> - :benchmark => false
> - :backtrace => false
> - :bulk_threshold => 1000
> - :sources => ["http://gems.rubyforge....]
> - REMOTE SOURCES:
> - http://gems.ruby...

Looks pretty good. You might get a slightly more recent ruby by updating
Leopard, but that shouldn't matter very much. Saying "sudo gem update
--system" *should* have been sufficient to update rubygems.

> [dougmcbride@shiny /d/rubygems-1.3.4] sudo gem --debug install ruby-
> debug
....
> Exception `EOFError' at /System/Library/Frameworks/Ruby.framework/
> Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:133 - end of file
> reached

Just checking - (1) Have you installed Xcode? (2) Are you connected to
the Internet? Sorry nothing else comes to mind right off the bat; I
couldn't reproduce the problem (installing ruby-debug worked find for
me). m.

--
matt neuburg, phd = matt@tidbits.com, http://www.tidbits...
Leopard - http://www.takecontrolbooks.com/leopard-custom...
AppleScript - http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart. http://www.t...

7stud --

6/2/2009 12:33:00 AM

0

Doug McBride wrote:
>
> - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/
> Versions/1.8/usr/bin/ruby
> - EXECUTABLE DIRECTORY: /usr/bin

Something seems out of whack there. If the ruby executable is located
here:

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

then it seems to be that the executable directory should be listed as:

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/



--
Posted via http://www.ruby-....

Eric Hodel

6/2/2009 9:54:00 PM

0

On Jun 1, 2009, at 17:33, 7stud -- wrote:

> Doug McBride wrote:
>>
>> - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/
>> Versions/1.8/usr/bin/ruby
>> - EXECUTABLE DIRECTORY: /usr/bin
>
> Something seems out of whack there. If the ruby executable is located
> here:
>
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
>
> then it seems to be that the executable directory should be listed as:
>
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/

This is correct for OS X.

Eric Hodel

6/2/2009 9:59:00 PM

0

On Jun 1, 2009, at 16:45, Doug McBride wrote:

> ERROR: While executing gem ... (URI::InvalidURIError)
> bad URI(is not URI?):
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
> 1.8/uri/common.rb:437:in `split'
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
> 1.8/uri/common.rb:486:in `parse'
> /Library/Ruby/Site/1.8/rubygems/remote_fetcher.rb:258:in
> `open_uri_or_path'

This checks the URI

> /Library/Ruby/Site/1.8/rubygems/remote_fetcher.rb:288:in
> `open_uri_or_path'

This is the redirect response handler

Since it got nil, and you got a bunch of EOFErrors above, I'd guess
that there's network issues between you and rubyforge.

matt

6/2/2009 10:16:00 PM

0

Eric Hodel <drbrain@segment7.net> wrote:

> On Jun 1, 2009, at 17:33, 7stud -- wrote:
>
> > Doug McBride wrote:
> >>
> >> - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/
> >> Versions/1.8/usr/bin/ruby
> >> - EXECUTABLE DIRECTORY: /usr/bin
> >
> > Something seems out of whack there. If the ruby executable is located
> > here:
> >
> > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
> >
> > then it seems to be that the executable directory should be listed as:
> >
> > /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/
>
> This is correct for OS X.

What the OP has is correct for OS X 10.5 Leopard, which is evidently
what the OP has. 7stud has something earlier (presumably Tiger) and what
he has is correct for that system. Comparing apples with oranges is
pointless here. m.


--
matt neuburg, phd = matt@tidbits.com, http://www.tidbits...
Leopard - http://www.takecontrolbooks.com/leopard-custom...
AppleScript - http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart. http://www.t...