Can't update rubygems

on Mac OS X Tiger 10.4 and unable to update rubygems from 1.0.1 to 1.3.5

Here’s the command line story…


computer-says-no:/ d$ gem env
RubyGems Environment:

  • RUBYGEMS VERSION: 1.0.1 (1.0.1)
  • RUBY VERSION: 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.10.1]
  • INSTALLATION DIRECTORY: /usr/local//lib/ruby/gems/1.8
  • RUBYGEMS PREFIX: /usr/local/lib/ruby/site_ruby
  • RUBY EXECUTABLE: /usr/local//bin/ruby
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-darwin-8
  • GEM PATHS:
    • /usr/local//lib/ruby/gems/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:

computer-says-no:/ d$ sudo gem update --system
Password:
Updating RubyGems…
Bulk updating Gem source index for: http://gems.rubyforge.org
Attempting remote update of rubygems-update
Successfully installed rubygems-update-1.3.5
1 gem installed
Installing ri documentation for rubygems-update-1.3.5…
Installing RDoc documentation for rubygems-update-1.3.5…
Could not find main page README
Could not find main page README
Could not find main page README
Could not find main page README
Updating version of RubyGems to 1.3.5
Installing RubyGems 1.3.5
ERROR: While executing gem … (NoMethodError)
undefined method `ruby_version’ for Gem:Module
setup.rb:36: uninitialized constant Gem::SystemExitException (NameError)

computer-says-no:/ d$ sudo gem install rubygems-update
Password:
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR: Error installing rubygems-update:
hoe requires RubyGems version >= 1.3.1

computer-says-no:/ d$ sudo gem install rubygems-update -v=1.1.1
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed rubygems-update-1.1.1
1 gem installed
computer-says-no:/ d$ sudo update_rubygems
Error: Cannot find RubyGems Update Path!

RubyGems has already been updated.
The rubygems-update gem may now be uninstalled.
E.g. gem uninstall rubygems-update
computer-says-no:/ d$ gem -v
1.0.1


any ideas much appreciated?

On Sep 3, 2009, at 1:56 PM, Derek M. wrote:

any ideas much appreciated?

I suggest you grab the tgz from here:

http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz

unarchive it, then run “sudo ruby setup.rb”


Aaron P.
http://tenderlovemaking.com

I’ve tried that already, thanks. Here’s what I got when I tried it…


computer-says-no:/usr/local/src/rubygems-1.3.5 d$ sudo ruby setup.rb
Password:
ERROR: While executing gem … (NoMethodError)
undefined method `ruby_version’ for Gem:Module
setup.rb:36: uninitialized constant Gem::SystemExitException (NameError)

On Sep 3, 2009, at 3:17 PM, Derek M. wrote:

computer-says-no:/usr/local/src/rubygems-1.3.5 d$ sudo ruby setup.rb
Password:
ERROR: While executing gem … (NoMethodError)
undefined method `ruby_version’ for Gem:Module
setup.rb:36: uninitialized constant Gem::SystemExitException
(NameError)

What is your “ruby -v” info? Also, can you run it like this:

sudo ruby setup.rb --debug

Then paste the output somewhere


Aaron P.
http://tenderlovemaking.com

On Sep 3, 2009, at 16:28, Derek M. wrote:

ERROR: While executing gem … (NoMethodError)
undefined method ruby_version' for Gem:Module ./lib/rubygems/commands/setup_command.rb:62:incheck_ruby_version’
./lib/rubygems/commands/setup_command.rb:100:in execute' /usr/local//lib/ruby/site_ruby/lib/rubygems/command.rb:136:ininvoke’

Whoah! How’d you load up your system RubyGems?

setup.rb re-exec’s itself if it see RUBYOPT is set to load installed
RubyGems, but it seems that you’re escaping this check somehow.

After the three require ‘rubygems’ in setup.rb can you add:

p $", $:

I’d like to see where/how your installed rubygems is getting loaded.

What is your “ruby -v” info?

same as in gem env above

ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.10.1]

sudo ruby setup.rb --debug

Then paste the output somewhere

here it is…


computer-says-no:/usr/local/src/rubygems-1.3.5 d$ sudo ruby setup.rb
–debug
Password:
Exception NameError' at /usr/local//lib/ruby/site_ruby/lib/rubygems/command_manager.rb:132 - uninitialized constant Gem::Commands::SetupCommand ExceptionLoadError’ at
/usr/local//lib/ruby/site_ruby/lib/rubygems/custom_require.rb:27 - no
such file to load – Win32API
Exception LoadError' at /usr/local//lib/ruby/site_ruby/lib/rubygems/custom_require.rb:34 - no such file to load -- Win32API ExceptionNoMethodError’ at ./lib/rubygems/commands/setup_command.rb:62

  • undefined method ruby_version' for Gem:Module ERROR: While executing gem ... (NoMethodError) undefined methodruby_version’ for Gem:Module
    ./lib/rubygems/commands/setup_command.rb:62:in
    check_ruby_version' ./lib/rubygems/commands/setup_command.rb:100:inexecute’
    /usr/local//lib/ruby/site_ruby/lib/rubygems/command.rb:136:in
    invoke' /usr/local//lib/ruby/site_ruby/lib/rubygems/command_manager.rb:104:inprocess_args’
    /usr/local//lib/ruby/site_ruby/lib/rubygems/command_manager.rb:74:in
    run' /usr/local//lib/ruby/site_ruby/lib/rubygems/gem_runner.rb:39:inrun’
    setup.rb:35
    Exception `NameError’ at setup.rb:36 - uninitialized constant
    Gem::SystemExitException
    setup.rb:36: uninitialized constant Gem::SystemExitException (NameError)

so in setup_command.rb commented out the code in…

def check_ruby_version
required_version = Gem::Version.new ‘1.8.3’

#unless Gem.ruby_version > required_version then
#  alert_error "Ruby version > #{required_version} required, is 

#{Gem.ruby_version}"
# terminate_interaction 1
#end
end

tried again…

computer-says-no:/usr/local/src/rubygems-1.3.5 d$ sudo ruby setup.rb
–debug
Exception NameError' at /usr/local//lib/ruby/site_ruby/lib/rubygems/command_manager.rb:132 - uninitialized constant Gem::Commands::SetupCommand ExceptionLoadError’ at
/usr/local//lib/ruby/site_ruby/lib/rubygems/custom_require.rb:27 - no
such file to load – Win32API
Exception LoadError' at /usr/local//lib/ruby/site_ruby/lib/rubygems/custom_require.rb:34 - no such file to load -- Win32API ExceptionErrno::EEXIST’ at /usr/local//lib/ruby/1.8/fileutils.rb:243 -
File exists - /usr/local//lib/ruby/site_ruby/1.8
Exception Errno::EEXIST' at /usr/local//lib/ruby/1.8/fileutils.rb:243 - File exists - /usr/local//bin ExceptionErrno::ENOENT’ at /usr/local//lib/ruby/1.8/fileutils.rb:1297

  • No such file or directory - /Users/derekmailer/.gem/source_cache
    Exception `Errno::ENOENT’ at /usr/local//lib/ruby/1.8/fileutils.rb:1297
  • No such file or directory - /usr/local//lib/ruby/gems/1.8/source_cache
    Exception NameError' at ./lib/rubygems/commands/setup_command.rb:118 - uninitialized constant Gem::VERSION ERROR: While executing gem ... (NameError) uninitialized constant Gem::VERSION ./lib/rubygems/commands/setup_command.rb:118:inexecute’
    /usr/local//lib/ruby/site_ruby/lib/rubygems/command.rb:136:in
    invoke' /usr/local//lib/ruby/site_ruby/lib/rubygems/command_manager.rb:104:inprocess_args’
    /usr/local//lib/ruby/site_ruby/lib/rubygems/command_manager.rb:74:in
    run' /usr/local//lib/ruby/site_ruby/lib/rubygems/gem_runner.rb:39:inrun’
    setup.rb:35
    Exception `NameError’ at setup.rb:36 - uninitialized constant
    Gem::SystemExitException
    setup.rb:36: uninitialized constant Gem::SystemExitException (NameError)

I could go on hacking it, but willing to listen to suggestions first :slight_smile:

After the three require ‘rubygems’ in setup.rb can you add:

p $", $:

I’d like to see where/how your installed rubygems is getting loaded.

here’s how it looks…

computer-says-no:/usr/local/src/rubygems-1.3.5 d$ sudo ruby setup.rb
Password:
[“rubygems/rubygems_version.rb”, “rubygems/defaults.rb”,
“thread.bundle”, “thread.rb”, “rbconfig.rb”, “rbconfig/datadir.rb”,
“rubygems/exceptions.rb”, “rubygems/requirement.rb”,
“rubygems/version.rb”, “rubygems/dependency.rb”,
“rubygems/gem_path_searcher.rb”, “rubygems/user_interaction.rb”,
“rubygems/platform.rb”, “rubygems/specification.rb”,
“rubygems/source_index.rb”, “rubygems/builder.rb”,
“rubygems/custom_require.rb”, “rubygems.rb”, “timeout.rb”,
“optparse.rb”, “rubygems/command.rb”, “rubygems/command_manager.rb”,
“stringio.bundle”, “yaml/error.rb”, “syck.bundle”, “yaml/ypath.rb”,
“yaml/basenode.rb”, “yaml/syck.rb”, “yaml/tag.rb”, “yaml/stream.rb”,
“yaml/constants.rb”, “rational.rb”, “date/format.rb”, “date.rb”,
“yaml/rubytypes.rb”, “yaml/types.rb”, “yaml.rb”,
“rubygems/config_file.rb”, “etc.bundle”, “fileutils.rb”,
“rubygems/doc_manager.rb”, “rubygems/gem_runner.rb”]
[“lib”, “/usr/local//lib/ruby/site_ruby/1.8”,
“/usr/local//lib/ruby/site_ruby/1.8/i686-darwin8.10.1”,
“/usr/local//lib/ruby/site_ruby”, “/usr/local//lib/ruby/1.8”,
“/usr/local//lib/ruby/1.8/i686-darwin8.10.1”, “.”]
ERROR: While executing gem … (NoMethodError)
undefined method `ruby_version’ for Gem:Module
setup.rb:36: uninitialized constant Gem::SystemExitException (NameError)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs