NoMethodError executing ri doc for childprocess gem
kevinburke1 opened this issue · comments
Hi, I'm using the latest Ruby (2.6.3) installed from rbenv on a Mac running the latest MacOS, and the latest version of RubyGems (3.0.6). I attempted to run gem install fpm
and it failed with this error, which suggests childprocess is at fault.
Note, this is the first thing I have ever gem installed onto this machine so there's no possible compromising state on the machine.
$ gem --version
3.0.6
1s kevin at hyena in ~
± (master) $ gem install fpm
Fetching dotenv-2.7.5.gem
Fetching insist-1.0.0.gem
Fetching mustache-0.99.8.gem
Fetching clamp-1.0.1.gem
Fetching cabin-0.9.0.gem
Fetching io-like-0.3.0.gem
Fetching stud-0.0.23.gem
Fetching pleaserun-0.0.30.gem
Fetching fpm-1.11.0.gem
Fetching ffi-1.11.1.gem
Fetching ruby-xz-0.2.3.gem
Fetching childprocess-0.9.0.gem
Fetching arr-pm-0.0.10.gem
Fetching backports-3.15.0.gem
Fetching json-1.8.6.gem
Successfully installed stud-0.0.23
Successfully installed dotenv-2.7.5
Successfully installed insist-1.0.0
Successfully installed mustache-0.99.8
Successfully installed clamp-1.0.1
Successfully installed cabin-0.9.0
Successfully installed pleaserun-0.0.30
Successfully installed io-like-0.3.0
Building native extensions. This could take a while...
Successfully installed ffi-1.11.1
Successfully installed ruby-xz-0.2.3
Successfully installed childprocess-0.9.0
Successfully installed arr-pm-0.0.10
Successfully installed backports-3.15.0
Building native extensions. This could take a while...
Successfully installed json-1.8.6
Successfully installed fpm-1.11.0
Parsing documentation for stud-0.0.23
Installing ri documentation for stud-0.0.23
Parsing documentation for dotenv-2.7.5
Installing ri documentation for dotenv-2.7.5
Parsing documentation for insist-1.0.0
Installing ri documentation for insist-1.0.0
Parsing documentation for mustache-0.99.8
Installing ri documentation for mustache-0.99.8
Parsing documentation for clamp-1.0.1
Installing ri documentation for clamp-1.0.1
Parsing documentation for cabin-0.9.0
Installing ri documentation for cabin-0.9.0
Parsing documentation for pleaserun-0.0.30
Installing ri documentation for pleaserun-0.0.30
Parsing documentation for io-like-0.3.0
Installing ri documentation for io-like-0.3.0
Parsing documentation for ffi-1.11.1
Installing ri documentation for ffi-1.11.1
Parsing documentation for ruby-xz-0.2.3
Installing ri documentation for ruby-xz-0.2.3
Parsing documentation for childprocess-0.9.0
Before reporting this, could you check that the file you're documenting
has proper syntax:
/Users/kevin/.rbenv/versions/2.6.3/bin/ruby -c lib/childprocess/tools/generator.rb
RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.
The internal error was:
(NoMethodError) undefined method `[]' for nil:NilClass
ERROR: While executing gem ... (NoMethodError)
undefined method `[]' for nil:NilClass
I tried checking that the file I'm documenting has proper syntax.
$ cd ./.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/childprocess-0.9.0/
$ /Users/kevin/.rbenv/versions/2.6.3/bin/ruby -c lib/childprocess/tools/generator.rb
Syntax OK
I don't have any more information about the problem.
I tried running gem install fpm
a second time and it completed without incident.
$ gem install fpm
Successfully installed fpm-1.11.0
Parsing documentation for fpm-1.11.0
Installing ri documentation for fpm-1.11.0
Done installing documentation for fpm after 0 seconds
1 gem installed
Hey @kevinburkemeter, thanks for the report.
This is unfortunately not something we can fix retroactively for ChildProcess 0.9.0, as it appears to be a bug in RDoc itself.
There are two options:
- Upgrade RDoc to 6.2.0 or newer (recommended, as this solves the issue for other gems that have it).
- Upgrade ChildProcess to 1.0.1 or newer.
ChildProcess 0.9.0, RDoc 6.1.0
⨠ gem install childprocess --version 0.9.0 --document
Fetching ffi-1.11.1.gem
Fetching childprocess-0.9.0.gem
Building native extensions. This could take a while...
Generating ctags for ffi-1.11.1
Successfully installed ffi-1.11.1
Generating ctags for childprocess-0.9.0
Successfully installed childprocess-0.9.0
Parsing documentation for ffi-1.11.1
Installing ri documentation for ffi-1.11.1
Parsing documentation for childprocess-0.9.0
Before reporting this, could you check that the file you're documenting
has proper syntax:
/Users/shanedasilva/.rbenv/versions/2.6.3/bin/ruby -c lib/childprocess/tools/generator.rb
RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.
The internal error was:
(NoMethodError) undefined method `[]' for nil:NilClass
ERROR: While executing gem ... (NoMethodError)
undefined method `[]' for nil:NilClass
ChildProcess 0.9.0, RDoc 6.2.0
⨠ gem install childprocess --version 0.9.0 --document
Generating ctags for childprocess-0.9.0
Successfully installed childprocess-0.9.0
Parsing documentation for childprocess-0.9.0
Installing ri documentation for childprocess-0.9.0
Done installing documentation for childprocess after 0 seconds
1 gem installed
ChildProcess 1.0.1, RDoc 6.1.0
⨠ gem install childprocess --version 1.0.1 --document
Building native extensions. This could take a while...
Generating ctags for childprocess-1.0.1
Successfully installed childprocess-1.0.1
Parsing documentation for childprocess-1.0.1
Installing ri documentation for childprocess-1.0.1
Done installing documentation for childprocess after 0 seconds
1 gem installed
Hope this helps!