"gem install rails –r" => (URI::InvalidURIError)

Hi All,

I installed Ruby 1.9.0-03 (ruby 1.9.0 (2008-07-25 revision 18217)
[i386-mswin32]) over WinXP/SP2 a few days ago. It works great.

That installation included gem 1.2.0.1824. I searched for a Rails gem
and got:

K:_Utilities\Ruby>gem list rails -r
*** REMOTE GEMS ***
rails (2.1.0)
[snip]

I tried a number of permutations/combinations of:
gem install rails –r

They all failed with:
ERROR: While executing gem … (URI::InvalidURIError)
bad URI(is not URI?):

Gem under my Ruby 1.8.6 installation was working fine a while back.
My Firefox 2.0 browser is working fine. Any idea what the problem
might be?

Thanks in Advance,
Richard

On Aug 4, 7:05 pm, RichardOnRails
[email protected] wrote:

rails (2.1.0)
My Firefox 2.0 browser is working fine. Any idea what the problem
might be?

Thanks in Advance,
Richard

I just thought of what the problem might be: Ruby 1.9.0-03 is a
Japanese version of Ruby. I guessed my way through the .msi installer
screens. I haven’t seen any impact of its Japanese origin when
running run-of-the-mill Ruby scrips, so far. But maybe the URI
generated was for a Japanese browser. Trying to actually debug the
gem is beyond my pay grade :slight_smile:

I’m going to experiment some more to see if I can get a better fix on
this problem.

Again, Thanks in Advance,
Richard

On Aug 4, 2008, at 16:08 PM, RichardOnRails wrote:

I tried a number of permutations/combinations of:
gem install rails –r

They all failed with:
ERROR: While executing gem … (URI::InvalidURIError)
bad URI(is not URI?):

Gem under my Ruby 1.8.6 installation was working fine a while back.
My Firefox 2.0 browser is working fine. Any idea what the problem
might be?

Please report:

gem env

gem --debug install rails -r

On Aug 4, 7:46 pm, Eric H. [email protected] wrote:

K:_Utilities\Ruby>gem list rails -r

Gem under my Ruby 1.8.6 installation was working fine a while back.
My Firefox 2.0 browser is working fine. Any idea what the problem
might be?

Please report:

gem env

gem --debug install rails -r

Hi again Eric,

I still have 1.8.6 installed along with 1.9.0. I mention that because
it might have some bearing at the second exception following the “gem
–debug install rails -r” command.

The exception references F:\Documents and Settings\RLMuller.gem\specs
\gems.rubyforge.org%80,
which contains an untyped file “latest_specs.4.8” that seems to
contain Rails settings, e.g. ActsAsEscaped.

Presumably my 1.8.6 version references the Latest Specs file also.
that presents a potential conflict that might bear on the current
problem.

I hope this is a help to your analysis and not a distraction.

Best wishes,
Richard

Hi Eric,

Thanks for looking into this issue. It’s not life or death for me: I
can alway switch back painlessly to 1.8.6.
The results per your request follow below.

Best wishes,
Richard

K:>gem env
RubyGems Environment:

  • RUBYGEMS VERSION: 1.2.0.1824
  • RUBY VERSION: 1.9.0 (2008-07-25 patchlevel 0) [i386-mswin32]
  • INSTALLATION DIRECTORY: K:/_Utilities/Ruby/lib/ruby/gems/1.9.0
  • RUBY EXECUTABLE: K:/_Utilities/Ruby/bin/ruby.exe
  • EXECUTABLE DIRECTORY: K:/_Utilities/Ruby/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-mswin32-60
  • GEM PATHS:
    • K:/_Utilities/Ruby/lib/ruby/gems/1.9.0
    • F:/Documents and Settings/RLMuller/.gem
  • GEM CONFIGURATION:
  • REMOTE SOURCES:

K:>gem --debug install rails -r
Exception NameError' at K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/ command_manager.rb:134 - uninitialized constant Gem::Commands::InstallCommand Exception Errno::EEXIST’ at K:/_Utilities/Ruby/lib/ruby/1.9.0/
fileutils.rb:243 - File exists - F:/Documents and Settings/
RLMuller/.gem/specs/gems.rub
yforge.org%80
Exception URI::InvalidURIError' at K:/_Utilities/Ruby/lib/ruby/1.9.0/ uri/common.rb:436 - bad URI(is not URI?): ERROR: While executing gem ... (URI::InvalidURIError) bad URI(is not URI?): K:/_Utilities/Ruby/lib/ruby/1.9.0/uri/common.rb:436:in split’
K:/_Utilities/Ruby/lib/ruby/1.9.0/uri/common.rb:485:in parse' K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/remote_fetcher.rb: 237:in open_uri_or_path’
K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/remote_fetcher.rb:
249:in open_uri_or_path' K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/remote_fetcher.rb: 142:in fetch_path’
K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/spec_fetcher.rb:
193:in load_specs' K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/spec_fetcher.rb: 173:in block in list’
K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/spec_fetcher.rb:
165:in each' K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/spec_fetcher.rb: 165:in list’
K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/spec_fetcher.rb:
116:in find_matching' K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/spec_fetcher.rb: 62:in fetch’
K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/
dependency_installer.rb:94:in find_gems_with_sources' K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/ dependency_installer.rb:187:in find_spec_by_name_and_version’
K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/
dependency_installer.rb:208:in install' K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/commands/ install_command.rb:73:in block in execute’
K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/commands/
install_command.rb:70:in each' K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/commands/ install_command.rb:70:in execute’
K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/command.rb:136:in
invoke' K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/command_manager.rb: 105:in process_args’
K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/command_manager.rb:
75:in run' K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/gem_runner.rb:39:in run’
K:/_Utilities/Ruby/bin/gem.bat:32:in `’

On Aug 4, 2008, at 20:28 PM, RichardOnRails wrote:

*** REMOTE GEMS ***
Gem under my Ruby 1.8.6 installation was working fine a while back.

I still have 1.8.6 installed along with 1.9.0. I mention that because
it might have some bearing at the second exception following the “gem
–debug install rails -r” command.

The exception references F:\Documents and Settings\RLMuller.gem\specs
\gems.rubyforge.org%80,
which contains an untyped file “latest_specs.4.8” that seems to
contain Rails settings, e.g. ActsAsEscaped.

The .4.8 at the end refers to the Marshal version of the contents of
the file. Inside it is an Array of Arrays of gem names, versions and
platforms.

Presumably my 1.8.6 version references the Latest Specs file also.
that presents a potential conflict that might bear on the current
problem.

Provided Ruby 1.9 correctly bumps the Marshal version numbers when
changes occur, there should be no problem. Your backtrace shows that
this isn’t the problem.

On Aug 6, 7:31 pm, Eric H. [email protected] wrote:

gem
They all failed with:

which contains an untyped file “latest_specs.4.8” that seems to
Provided Ruby 1.9 correctly bumps the Marshal version numbers when
changes occur, there should be no problem. Your backtrace shows that
this isn’t the problem.

Hey Eric,

The is a belated post to tell you that 1.9 seemed more problematic
than I’m prepared to deal with. I have only occasional use for look-
behind and can always use Perl until a regular release of 1.9 is
issued.

I apologize for not having reported back promptly.

Best wishes,
Richard

On Aug 4, 2008, at 19:48 PM, RichardOnRails wrote:

RubyGems Environment:
- F:/Documents and Settings/RLMuller/.gem
- http://gems.rubyonrails.org
uri/common.rb:436 - bad URI(is not URI?):
ERROR: While executing gem … (URI::InvalidURIError)
bad URI(is not URI?):
K:/_Utilities/Ruby/lib/ruby/1.9.0/uri/common.rb:436:in split' K:/_Utilities/Ruby/lib/ruby/1.9.0/uri/common.rb:485:in parse’
K:/_Utilities/Ruby/lib/ruby/1.9.0/rubygems/remote_fetcher.rb:
237:in `open_uri_or_path’

Can you add ‘p uri’ above this line and report what it is trying to
parse?