Project

General

Profile

Actions

Bug #20862

closed

gem install --document=rdoc,ri fails with some gem

Added by mtasaka (Mamoru TASAKA) 19 days ago. Updated 3 days ago.

Status:
Closed
Assignee:
Target version:
-
ruby -v:
ruby 3.4.0dev (2024-11-02 master 24f7829abf) +PRISM [x86_64-linux]
[ruby-dev:<unknown>]

Description

With using 24f7829abfd29fc226e38829caaecaa76885afbf , trying $ gem install --document=rdoc,ri foo.gem fails with some (not one) gem like:

$ gem install -V --document=rdoc,ri tk
...
...
ERROR:  While executing gem ... (RDoc::Error)
    error generating Busy.html: Error while evaluating /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/generator/template/darkfish/class.rhtml: undefined method 'match' for an instance of RDoc::Markup::Document (RDoc::Error)
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/generator/darkfish.rb:789:in 'RDoc::Generator::Darkfish#excerpt'
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/generator/template/darkfish/class.rhtml:16:in 'block in RDoc::Generator::Darkfish#generate_class'
        /usr/share/ruby/erb.rb:429:in 'Kernel#eval'
        /usr/share/ruby/erb.rb:429:in 'ERB#result'
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/generator/darkfish.rb:750:in 'RDoc::Generator::Darkfish#template_result'
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/generator/darkfish.rb:729:in 'block in RDoc::Generator::Darkfish#render_template'
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/generator/darkfish.rb:724:in 'IO.open'
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/generator/darkfish.rb:724:in 'Pathname#open'
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/generator/darkfish.rb:724:in 'RDoc::Generator::Darkfish#render_template'
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/generator/darkfish.rb:356:in 'RDoc::Generator::Darkfish#generate_class'
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/generator/darkfish.rb:382:in 'block in RDoc::Generator::Darkfish#generate_class_files'
        <internal:array>:42:in 'Array#each'
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/generator/darkfish.rb:379:in 'RDoc::Generator::Darkfish#generate_class_files'
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/generator/darkfish.rb:246:in 'RDoc::Generator::Darkfish#generate'
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/rubygems_hook.rb:139:in 'block in RDoc::RubygemsHook#document'
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/rubygems_hook.rb:136:in 'Dir.chdir'
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/rubygems_hook.rb:136:in 'RDoc::RubygemsHook#document'
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/rubygems_hook.rb:198:in 'RDoc::RubygemsHook#generate'
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/rubygems_hook.rb:56:in 'block in RDoc::RubygemsHook.generation_hook'
        <internal:array>:42:in 'Array#each'
        /usr/share/gems/gems/rdoc-6.7.0/lib/rdoc/rubygems_hook.rb:55:in 'RDoc::RubygemsHook.generation_hook'
        /usr/share/rubygems/rubygems/request_set.rb:313:in 'block in Gem::RequestSet#install_hooks'
        <internal:array>:42:in 'Array#each'
        /usr/share/rubygems/rubygems/request_set.rb:312:in 'Gem::RequestSet#install_hooks'
        /usr/share/rubygems/rubygems/request_set.rb:210:in 'Gem::RequestSet#install'
        /usr/share/rubygems/rubygems/commands/install_command.rb:207:in 'Gem::Commands::InstallCommand#install_gem'
        /usr/share/rubygems/rubygems/commands/install_command.rb:223:in 'block in Gem::Commands::InstallCommand#install_gems'
        <internal:array>:42:in 'Array#each'
        /usr/share/rubygems/rubygems/commands/install_command.rb:216:in 'Gem::Commands::InstallCommand#install_gems'
        /usr/share/rubygems/rubygems/commands/install_command.rb:162:in 'Gem::Commands::InstallCommand#execute'
        /usr/share/rubygems/rubygems/command.rb:326:in 'Gem::Command#invoke_with_build_args'
        /usr/share/rubygems/rubygems/command_manager.rb:253:in 'Gem::CommandManager#invoke_command'
        /usr/share/rubygems/rubygems/command_manager.rb:194:in 'Gem::CommandManager#process_args'
        /usr/share/rubygems/rubygems/command_manager.rb:152:in 'Gem::CommandManager#run'
        /usr/share/rubygems/rubygems/gem_runner.rb:56:in 'Gem::GemRunner#run'
        /usr/bin/gem:12:in '<main>'

Installing ri documentation for tk-0.5.0
Installing darkfish documentation for tk-0.5.0

I guess this is related to ed993b5bcc4fcae661dd022d3211dcc770425218 , but not sure.

Note that "vanilla" rdoc 6.7.0 does not seem to have the above change,
the change on rdoc was installed on https://github.com/ruby/rdoc/commit/716bc16a7dbcac937d38c328d2d89a2f7cff2fa9 ,
and "vanilla" rdoc 6.7.0 seems NOT to reproduce this issue.

Actions #1

Updated by hsbt (Hiroshi SHIBATA) 15 days ago

  • Status changed from Open to Assigned
  • Assignee set to rdoc
Actions #2

Updated by st0012 (Stan Lo) 13 days ago

Thanks for reporting, I've opened https://github.com/ruby/rdoc/pull/1200 to address it.

Actions #3

Updated by st0012 (Stan Lo) 3 days ago

  • Status changed from Assigned to Closed

Since the PR has been merged, I'm closing this now. Thanks again for reporting it.
In the future, you can report related issues directly to RDoc.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0