How do I solve/debug "gem update" problem?


#1

I used InstantRails 2.0 to install RoR on Win XP SP3. It brought rails
2.0.2 and I am having problems updating to rails 2.2.2

After initial installation I run “gem update—system” w/o a problem.
However the subsequent “gem update rails” results in

ERROR: While executing gem … (Gem::InstallError) rails requires
activesupport (= 2.2.2, runtime)

Trying to manually update activesupport by “gem update activesupport”
results in

ERROR: While executing gem … (Gem::GemNotFoundException) could not
find gem activesupport locally or in a repository

Other variations (“gem install rails—version 2.2.2”, “gem install
activesupport”, etc.) produce same errors.

A few more data points that may be helpful
“gem -v” returns 1.3.1.
“gem sources” outputs “http://gems.rubyforge.org/” and
“gem list—remote” output does include “activesupport (2.2.2)”

Any suggestions on how to resolve or at least debug the issue? I am a
relative novice and am lost.


#2

What does ‘gem list --local’ return?
I presume you are doing this with administrative rights?
Martin


#3

Here is the output of “gem list --local”

*** LOCAL GEMS ***

actionmailer (2.0.2)
actionpack (2.0.2)
activerecord (2.0.2)
activeresource (2.0.2)
activesupport (2.0.2)
capistrano (2.1.0)
cgi_multipart_eof_fix (2.5.0)
cmdparse (2.0.2)
fxri (0.3.6)
fxruby (1.6.12)
gem_plugin (0.2.3)
highline (1.4.0)
hpricot (0.6)
log4r (1.0.5)
mongrel (1.1.2)
mysql (2.7.3)
needle (1.3.0)
net-sftp (1.1.0)
net-ssh (1.1.2)
rails (2.0.2)
rake (0.8.3)
rubygems-update (1.3.1)
sources (0.0.1)
sqlite3-ruby (1.2.1)
win32-api (1.0.4)
win32-clipboard (0.4.3)
win32-dir (0.3.2)
win32-eventlog (0.4.6)
win32-file (0.5.4)
win32-file-stat (1.2.7)
win32-process (0.5.3)
win32-sapi (0.1.4)
win32-sound (0.4.1)
windows-api (0.2.0)
windows-pr (0.7.2)


#4

I’ve had problems with upgrading gem in the past but they have
involved gem itself and not running it once installed.
Have a look at http://rubyforge.org/forum/forum.php?forum_id=28071 and
try re-installing.

Does ‘gem env’ give you anything out of the ordinary?
Martin


#5

I am not sure what to look for in the output of “gem env” but here it
is
RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.1
  • RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
  • INSTALLATION DIRECTORY: C:/InstantRails2.0/ruby/lib/ruby/gems/1.8
  • RUBY EXECUTABLE: C:/InstantRails2.0/ruby/bin/ruby.exe
  • EXECUTABLE DIRECTORY: C:/InstantRails2.0/ruby/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-mswin32-60
  • GEM PATHS:
    • C:/InstantRails2.0/ruby/lib/ruby/gems/1.8
    • C:/Documents and Settings/Leonid/.gem/ruby/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:

The only thing that appears a bit strange is the second line in GEM
PATHS because it points to my documents folder while I expected RoR
installation to be entirely self contained under C:/InstantRails2.0. I
have already tried deleting everything (is that the right way to
uninstall RoR?) and unzipped everything again from
InstantRails-2.0.zip. Then I run “gem update --system” again and it
upgraded rubygems to 1.3.1. I also observed that this gem update
command added the second path to GEM PATHS (is it OK?). Now I am back
hitting the same wall; still can not update rails and at a loss.

Thanks for trying to help,

  • LR