undefined method `reset' for RDoc::TopLevel:Class when installing a new Ruby gem

前端 未结 2 1243
忘掉有多难
忘掉有多难 2021-02-08 04:29

For example,

$ gem install netaddr
Fetching: netaddr-1.5.1.gem (100%)
Successfully installed netaddr-1.5.1
ERROR:  While executing gem ... (NoMethodError)
    un         


        
2条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-08 05:03

    I had a similar issue:

    $ gem install rdoc
    Fetching: rdoc-6.0.4.gem (100%)
    WARNING:  You don't have /home/myusername/.gem/ruby/2.5.0/bin in your PATH,
          gem executables will not run.
    Successfully installed rdoc-6.0.4
    ERROR:  While executing gem ... (NoMethodError)
        undefined method `reset' for RDoc::TopLevel:Class
    

    Same when installing compass. After adding /home/myusername/.gem/ruby/2.5.0/bin to $PATH, this worked for me:

    $ gem install rdoc
    Successfully installed rdoc-6.0.4
    Parsing documentation for rdoc-6.0.4
    Installing ri documentation for rdoc-6.0.4
    Done installing documentation for rdoc after 3 seconds
    1 gem installed
    

提交回复
热议问题