`gem cert --add` error

Elia Schito's Avatar

Elia Schito

25 Feb, 2011 10:59 AM

FileUtils appears not being required during gem cert --add command:

Exception `NameError' at /Library/Ruby/Site/1.8/rubygems/command_manager.rb:163 - uninitialized constant Gem::Commands::CertCommand
Exception `NameError' at /Library/Ruby/Site/1.8/rubygems/security.rb:665 - uninitialized constant Gem::Security::FileUtils
ERROR:  While executing gem ... (NameError)
    uninitialized constant Gem::Security::FileUtils
    /Library/Ruby/Site/1.8/rubygems/security.rb:665:in `verify_trust_dir'
    /Library/Ruby/Site/1.8/rubygems/security.rb:770:in `add_trusted_cert'
    /Library/Ruby/Site/1.8/rubygems/commands/cert_command.rb:12:in `initialize'
    /Library/Ruby/Site/1.8/rubygems/command.rb:443:in `call'
    /Library/Ruby/Site/1.8/rubygems/command.rb:443:in `configure_options'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1267:in `call'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1267:in `parse_in_order'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1254:in `catch'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1254:in `parse_in_order'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1248:in `order!'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1339:in `permute!'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1360:in `parse!'
    /Library/Ruby/Site/1.8/rubygems/command.rb:348:in `handle_options'
    /Library/Ruby/Site/1.8/rubygems/command.rb:271:in `invoke'
    /Library/Ruby/Site/1.8/rubygems/command_manager.rb:133:in `process_args'
    /Library/Ruby/Site/1.8/rubygems/command_manager.rb:103:in `run'
    /Library/Ruby/Site/1.8/rubygems/gem_runner.rb:63:in `run'
    /usr/bin/gem:21
  1. 1 Posted by robert.slifka on 26 Feb, 2011 08:35 PM

    robert.slifka's Avatar

    Interesting coincidence - same problem here within 12 hours :)

    slif:~$ gem cert --build email_address
    ERROR: While executing gem ... (NameError)

    uninitialized constant Gem::Security::FileUtils
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/security.rb:665:in `verify_trust_dir'
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/security.rb:712:in `build_self_signed_cert'
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/commands/cert_command.rb:52:in `initialize'
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/command.rb:443:in `call'
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/command.rb:443:in `configure_options'
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/optparse.rb:1267:in `call'
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/optparse.rb:1267:in `parse_in_order'
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/optparse.rb:1254:in `catch'
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/optparse.rb:1254:in `parse_in_order'
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/optparse.rb:1248:in `order!'
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/optparse.rb:1339:in `permute!'
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/optparse.rb:1360:in `parse!'
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/command.rb:348:in `handle_options'
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/command.rb:271:in `invoke'
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:133:in `process_args'
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:103:in `run'
    ~/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:63:in `run'
    ~/.rvm/rubies/ree-1.8.7-2010.02/bin/gem:21
    

    On RubyGems 1.5.2.

  2. Support Staff 2 Posted by Eric Hodel on 26 Feb, 2011 09:02 PM

    Eric Hodel's Avatar

    Fixed in trunk, will be in 1.6.0

  3. Eric Hodel closed this discussion on 26 Feb, 2011 09:02 PM.

  4. robert.slifka re-opened this discussion on 26 Feb, 2011 09:33 PM

  5. 3 Posted by robert.slifka on 26 Feb, 2011 09:33 PM

    robert.slifka's Avatar

    FYI, just downgrade to 1.3.3 conduct your business then upgrade :)

  6. Support Staff 4 Posted by Eric Hodel on 26 Feb, 2011 10:51 PM

    Eric Hodel's Avatar

    You should be able to work around this with ruby -rfileutils -S gem cert …

  7. Eric Hodel closed this discussion on 26 Feb, 2011 10:51 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

23 Oct, 2014 05:37 PM
21 Oct, 2014 10:47 AM
18 Oct, 2014 08:39 PM
16 Oct, 2014 12:41 PM
06 Oct, 2014 02:30 PM