2

When I run any gem command, I get this message:

Error loading RubyGems plugin 
"/home/thiago/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/yard-
0.8.2.1/lib/rubygems_plugin.rb": cannot load such file -- 
rubygems/doc_manager (LoadError)

In this case, I run a simple gem --version. I'm using gem version: 2.6.8.

Any idea how to fix it?

Kathryn
  • 1,557
  • 8
  • 12
Thiago Anderson
  • 587
  • 1
  • 6
  • 13

1 Answers1

2

It's likely your installation of Ruby 2.4.0 is broken. First make sure it's installed:

$ rbenv versions

It should also have an asterisk next to it:

* 2.4.0 (set by /home/thiago/.rbenv/version)

If everything looks correct, I'd recommend uninstalling and reinstalling 2.4.0. If you still can't run gem commands, you might need to reinstall rbenv as well.

See also: a related question for RVM.

Jon 'links in bio' Ericson
  • 20,880
  • 12
  • 98
  • 148
Kathryn
  • 1,557
  • 8
  • 12