我的电脑(Gnu/Linux Fedora 30)正在运行一个爬虫程序,由于断电,该程序被关闭,此后,我的爬虫程序和任何其他 Ruby Gem 都无法工作,并显示以下错误
Traceback (most recent call last):
8: from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
7: from <internal:gem_prelude>:2:in `require'
6: from /usr/share/rubygems/rubygems.rb:116:in `<top (required)>'
5: from /usr/share/rubygems/rubygems.rb:1365:in `<module:Gem>'
4: from /usr/share/rubygems/rubygems.rb:1365:in `require'
3: from /usr/share/rubygems/rubygems/specification.rb:16:in `<top (required)>'
2: from /usr/share/rubygems/rubygems/specification.rb:16:in `require'
1: from /usr/share/rubygems/rubygems/specification_policy.rb:1:in `<top (required)>'
/usr/share/rubygems/rubygems/specification_policy.rb:1:in `require': cannot load such file -- delegate (LoadError)
或者
$ gem env version
Traceback (most recent call last):
8: from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
7: from <internal:gem_prelude>:2:in `require'
6: from /usr/share/rubygems/rubygems.rb:116:in `<top (required)>'
5: from /usr/share/rubygems/rubygems.rb:1365:in `<module:Gem>'
4: from /usr/share/rubygems/rubygems.rb:1365:in `require'
3: from /usr/share/rubygems/rubygems/specification.rb:16:in `<top (required)>'
2: from /usr/share/rubygems/rubygems/specification.rb:16:in `require'
1: from /usr/share/rubygems/rubygems/specification_policy.rb:1:in `<top (required)>'
/usr/share/rubygems/rubygems/specification_policy.rb:1:in `require': cannot load such file -- delegate (LoadError)
当我想查看 Gem 版本时:
$ gem -v
Traceback (most recent call last):
8: from <internal:gem_prelude>:2:in `<internal:gem_prelude>'
7: from <internal:gem_prelude>:2:in `require'
6: from /usr/share/rubygems/rubygems.rb:116:in `<top (required)>'
5: from /usr/share/rubygems/rubygems.rb:1365:in `<module:Gem>'
4: from /usr/share/rubygems/rubygems.rb:1365:in `require'
3: from /usr/share/rubygems/rubygems/specification.rb:16:in `<top (required)>'
2: from /usr/share/rubygems/rubygems/specification.rb:16:in `require'
1: from /usr/share/rubygems/rubygems/specification_policy.rb:1:in `<top (required)>'
/usr/share/rubygems/rubygems/specification_policy.rb:1:in `require': cannot load such file -- delegate (LoadError)
我的 ruby 版本:
$ ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
重新安装 Ruby 后,没有任何变化。