For example,
$ gem install netaddr
Fetching: netaddr-1.5.1.gem (100%)
Successfully installed netaddr-1.5.1
ERROR: While executing gem ... (NoMethodError)
undefined method `reset' for RDoc::TopLevel:Class
The NoMethodError exception keeps being raised when I install any new gem. I googled about it and searched issues in RDoc and RubyGems GitHub repositories, but had no luck.
My Ruby version is
$ ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
The RubyGems version is
$ gem -v
2.5.1
The installed RDoc version is
$ gem search rdoc -l
*** LOCAL GEMS ***
rdoc (4.2.2, 4.2.1)
I installed Ruby with RVM on Mac OS X El Capitan.
Thanks!
[UPDATE] 2018/08/03
I haven't used my Macbook for long time, so I forgot the problem until now. The day before yesterday I got an answer notification and today I checked my situation with the same Macbook. I found that I no longer have the problem and the Ruby and Gems were updated as follows:
$ gem install netaddr
Fetching: netaddr-2.0.3.gem (100%)
Successfully installed netaddr-2.0.3
Parsing documentation for netaddr-2.0.3
Installing ri documentation for netaddr-2.0.3
Done installing documentation for netaddr after 1 seconds
1 gem installed
$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin15]
$ gem -v
2.6.8
$ gem search rdoc -l
*** LOCAL GEMS ***
rdoc (default: 5.0.0)
I don't remember when I updated them, but the problem has gone anyway, I guessed it was a bug and fixed in the updates.
Thanks.
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
), and had no problem installing the gem. – Zennieruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
&gem 2.7.7
and for me it happened while installing rdoc itself:rdoc-6.0.4
– Reprimand