gem generate_index fails after yard install

David Jacques's Avatar

David Jacques

04 May, 2011 08:06 PM

We installed yard 0.6.8 and now gem generate_index fails in ways that it did not before. I thought maybe it was my own gemspecs to blame, but I tried with activesupport-3.0.7.gem. Not sure if that's a reasonable test gem.

This may be a yard problem rather than a rubygems problem, looking possible for a workaround on the gem side, maybe to disable hooks into yard?

$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.7.2
  - RUBY VERSION: 1.9.2 (2011-02-18 patchlevel 180) [x86_64-linux]
  - INSTALLATION DIRECTORY: /opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: /opt/ruby-1.9.2-p180/bin/ruby
  - EXECUTABLE DIRECTORY: /opt/ruby-1.9.2-p180/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1
     - /opt/home/DJacqu001/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

$ gem generate_index
Loading 1 gems from .
.
Loaded all gems
loaded: 0.028s
Generating Marshal quick index gemspecs for 1 gems
ERROR:  While executing gem ... (TypeError)
    can't convert nil into String

$ gem generate_index --debug
Exception `NameError' at /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:163 - uninitialized constant Gem::Commands::GenerateIndexCommand
Exception `LoadError' at /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- psych
Exception `LoadError' at /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60 - no such file to load -- psych
Exception `Errno::ENOENT' at /opt/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:1217 - No such file or directory - /tmp/gem_generate_index_12525
Exception `Errno::ENOENT' at /opt/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:1217 - No such file or directory - /tmp/gem_generate_index_12525
Exception `Errno::ENOENT' at /opt/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:1314 - No such file or directory - /tmp/gem_generate_index_12525
Exception `Errno::ENOENT' at /opt/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:243 - No such file or directory - /tmp/gem_generate_index_12525/quick/Marshal.4.8
Exception `Errno::ENOENT' at /opt/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:243 - No such file or directory - 
Exception `Errno::EEXIST' at /opt/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:243 - File exists - /tmp
Exception `Errno::EEXIST' at /opt/ruby-1.9.2-p180/lib/ruby/1.9.1/fileutils.rb:243 - File exists - /tmp/gem_generate_index_12525
Loading 1 gems from .
Exception `NoMethodError' at /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_input.rb:53 - undefined method `readpartial' for #<Gem::Package::TarReader::Entry:0x0000001cdf0e28>
Exception `NoMethodError' at /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:449 - undefined method `readpartial' for #<Gem::Package::TarReader::Entry:0x0000001cdf0e28>
Exception `IOError' at /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/format.rb:45 - closed stream
.
Loaded all gems
loaded: 0.027s
Generating Marshal quick index gemspecs for 1 gems
Exception `TypeError' at /opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/yard-0.6.8/lib/yard/rubygems/specification.rb:31 - can't convert nil into String
ERROR:  While executing gem ... (TypeError)
    can't convert nil into String
    /opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/yard-0.6.8/lib/yard/rubygems/specification.rb:31:in `[]='
    /opt/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/yard-0.6.8/lib/yard/rubygems/specification.rb:31:in `_dump_with_rdoc'
    /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/indexer.rb:167:in `dump'
    /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/indexer.rb:167:in `block (2 levels) in build_marshal_gemspecs'
    /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/indexer.rb:163:in `each'
    /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/indexer.rb:163:in `block in build_marshal_gemspecs'
    /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:1115:in `time'
    /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/indexer.rb:162:in `build_marshal_gemspecs'
    /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/indexer.rb:128:in `build_indicies'
    /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/indexer.rb:460:in `generate_index'
    /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/commands/generate_index_command.rb:118:in `execute'
    /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:278:in `invoke'
    /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:133:in `process_args'
    /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:103:in `run'
    /opt/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:64:in `run'
    /opt/ruby-1.9.2-p180/bin/gem:21:in `<main>'
  1. Support Staff 2 Posted by Nick Quaranto on 27 May, 2011 12:06 AM

    Nick Quaranto's Avatar

    Added Loren to this discussion (the YARD guy!), maybe he has a better idea about this.

  2. 3 Posted by lsegal on 27 May, 2011 12:45 AM

    lsegal's Avatar

    Hi David,

    I'm curious whether this happens in a pre-1.7 version of RubyGems. The RubyGems API changed and we had to make some modifications to keep up, but my guess is those changes don't always work. If you use 1.3.7 (gem update --system 1.3.7), does the error still occur?

    Loren

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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