在尝试运行“irb”时,我遇到了这个错误:
<internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- rdoc (LoadError)
从
from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/lib/irb/input-method.rb:17:in `<top (required)>'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/lib/irb/context.rb:14:in `require_relative'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/lib/irb/context.rb:14:in `<top (required)>'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/lib/irb.rb:16:in `require_relative'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/lib/irb.rb:16:in `<top (required)>'
from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/usr/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/exe/irb:9:in `<top (required)>'
from /usr/bin/irb:25:in `load'
from /usr/bin/irb:25:in `<main>'
我尝试将 ruby 版本从 3.0.3 降级到 2.7,但没有奏效;有同样的错误。