Problem aved update rubygems update

rat.jonathan's Avatar

rat.jonathan

02 Jun, 2011 07:15 PM

Hi everyone,

I made an update to have rubygems 1.8.5 and I got this message

Jonathan$ sudo gem install rubygems-update
Password:
Successfully installed rubygems-update-1.8.5
1 gem installed
ERROR: While executing gem ... (Errno::ENOENT)
    No such file or directory - getcwd

Also, when I do gem list, I have this : (As you can see no gems)

Jonathan$ gem list

*** LOCAL GEMS ***

rubygems-update (1.8.5)

Jonathan$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.5
  - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.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-10
  - GEM PATHS:
     - /Library/Ruby/Gems/1.8
     - /Users/Jonathan/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

Jonathan$ gem update --system --debug -v
Exception `NameError' at /Library/Ruby/Site/1.8/rubygems/command_manager.rb:177 - uninitialized constant Gem::Commands::UpdateCommand
Exception `LoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36 - no such file to load -- psych
Exception `LoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:62 - no such file to load -- psych
Exception `OptionParser::InvalidOption' at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1450 - invalid option: v
GET http://rubygems.org/latest_specs.4.8.gz
302 Found
GET http://production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
Exception `Errno::EEXIST' at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:243 - File exists - /Users/Jonathan/.gem/specs/rubygems.org%80
Latest version currently installed. Aborting.

  1. Support Staff 1 Posted by Luis Lavena on 02 Jun, 2011 07:20 PM

    Luis Lavena's Avatar

    Hello,

    Please provide more details about your environment (Version of OS, how you installed Ruby, version of Ruby itself, etc).

    It is handy if you provide also the complete output of gem env command.

    Also, please provide (in a gist or pastie) the complete output of the update command but with debugging:

    gem update --system --debug -V

    With that information we will be able to know better your environment and could help you better.

  2. 2 Posted by rat.jonathan on 02 Jun, 2011 07:28 PM

    rat.jonathan's Avatar

    Thank you Luis.

    So I have a Mac OS X 10.6.7. I just installed it this morning and I installed XCode.

    Concerning gem env :

    Jonathan$ gem env
    RubyGems Environment:
    - RUBYGEMS VERSION: 1.8.5 - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.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-10
    
    • GEM PATHS:
      • /Library/Ruby/Gems/1.8
      • /Users/Jonathan/.gem/ruby/1.8
    • GEM CONFIGURATION:
      • :update_sources => true
      • :verbose => true
      • :benchmark => false
      • :backtrace => false
      • :bulk_threshold => 1000
    • REMOTE SOURCES:

    And for the gem update --system --debug -v

    Jonathan$ gem update --system --debug -v
    Exception NameError' at /Library/Ruby/Site/1.8/rubygems/command_manager.rb:177 - uninitialized constant Gem::Commands::UpdateCommand ExceptionLoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36 - no such file to load -- psych
    Exception LoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:62 - no such file to load -- psych ExceptionOptionParser::InvalidOption' at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1450 - invalid option: v
    GET http://rubygems.org/latest_specs.4.8.gz
    302 Found
    GET http://production.s3.rubygems.org/latest_specs.4.8.gz
    200 OK
    Exception `Errno::EEXIST' at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:243 - File exists - /Users/Jonathan/.gem/specs/rubygems.org%80
    Latest version currently installed. Aborting.

    Thank you

  3. 3 Posted by rat.jonathan on 02 Jun, 2011 07:31 PM

    rat.jonathan's Avatar

    Thank you Luis for your help

    I have a Mac OS 10.6.7 just installed this morning.

    gem env

    Jonathan$ gem env
    RubyGems Environment:
    - RUBYGEMS VERSION: 1.8.5 - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.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-10
    
    • GEM PATHS:
      • /Library/Ruby/Gems/1.8
      • /Users/Jonathan/.gem/ruby/1.8
    • GEM CONFIGURATION:
      • :update_sources => true
      • :verbose => true
      • :benchmark => false
      • :backtrace => false
      • :bulk_threshold => 1000
    • REMOTE SOURCES:

    gem update --system --debug -v

    Jonathan$ gem update --system --debug -v
    Exception NameError' at /Library/Ruby/Site/1.8/rubygems/command_manager.rb:177 - uninitialized constant Gem::Commands::UpdateCommand ExceptionLoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36 - no such file to load -- psych
    Exception LoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:62 - no such file to load -- psych ExceptionOptionParser::InvalidOption' at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1450 - invalid option: v
    GET http://rubygems.org/latest_specs.4.8.gz
    302 Found
    GET http://production.s3.rubygems.org/latest_specs.4.8.gz
    200 OK
    Exception `Errno::EEXIST' at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:243 - File exists - /Users/Jonathan/.gem/specs/rubygems.org%80
    Latest version currently installed. Aborting.

  4. 4 Posted by rat.jonathan on 02 Jun, 2011 07:36 PM

    rat.jonathan's Avatar

    Thank you Luis

    Jonathan$ gem env
    RubyGems Environment:
    - RUBYGEMS VERSION: 1.8.5 - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.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-10
    
    • GEM PATHS:
      • /Library/Ruby/Gems/1.8
      • /Users/Jonathan/.gem/ruby/1.8
    • GEM CONFIGURATION:
      • :update_sources => true
      • :verbose => true
      • :benchmark => false
      • :backtrace => false
      • :bulk_threshold => 1000
    • REMOTE SOURCES:

    Jonathan$ gem update --system --debug -v
    Exception NameError' at /Library/Ruby/Site/1.8/rubygems/command_manager.rb:177 - uninitialized constant Gem::Commands::UpdateCommand ExceptionLoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36 - no such file to load -- psych
    Exception LoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:62 - no such file to load -- psych ExceptionOptionParser::InvalidOption' at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1450 - invalid option: v
    GET http://rubygems.org/latest_specs.4.8.gz
    302 Found
    GET http://production.s3.rubygems.org/latest_specs.4.8.gz
    200 OK
    Exception `Errno::EEXIST' at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:243 - File exists - /Users/Jonathan/.gem/specs/rubygems.org%80
    Latest version currently installed. Aborting.

  5. 5 Posted by rat.jonathan on 02 Jun, 2011 07:39 PM

    rat.jonathan's Avatar

    I updated my post with the information you asked Luis. Thank you for your help.

  6. Support Staff 6 Posted by Luis Lavena on 02 Jun, 2011 07:47 PM

    Luis Lavena's Avatar

    So, from gem env it seems you already have 1.8.5 running:

    Latest version currently installed. Aborting.

    The error you received could be consecuence of an pre-1.2 version of RubyGems you had in your system.

    Recommend reading UPGRADING document in RubyGems:

    https://github.com/rubygems/rubygems/blob/master/UPGRADING.rdoc

    Going to close this since the error could have been a fluke of the upgrade process.

    Please feel free to reopen if you still have issues.

  7. Luis Lavena closed this discussion on 02 Jun, 2011 07:47 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

28 Oct, 2014 09:51 AM
23 Oct, 2014 05:37 PM
21 Oct, 2014 10:47 AM
18 Oct, 2014 08:39 PM
16 Oct, 2014 12:41 PM