4

I'm getting this error when running my script:

`require': cannot load such file -- rdoc/usage (LoadError)

from

/Users/S/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rdoc/usage (LoadError)
from /Users/S/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from pdf.rb:34:in `<main>'

I have rdoc in my Gemfile

gem 'rdoc', '~> 4.2.2'

and I have also tried without specifying version. In my script I've required gems and rdoc/usage:

require 'rubygems'
require 'rdoc/usage'

I have run gem install rdoc

Depending on your version of ruby, you may need to install ruby rdoc/ri data:

<= 1.8.6 : unsupported
 = 1.8.7 : gem install rdoc-data; rdoc-data --install
 = 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Successfully installed rdoc-4.2.2

and as I'm running ruby 2.2.2 should not need to install ruby roc/ri data. (I tried at a loss and as expected no effect).

Any help would be greatly appreciated, thanks.

2
  • Try to delete your Gemfile.lock file and run bundle Commented Oct 5, 2016 at 14:25
  • Thanks @GokoGorgiovski , just tried this and am still getting an error. The only difference is it is now reporting kernel_require.rb:126:in `require': cannot load such file -- rdoc/usage (LoadError) Commented Oct 5, 2016 at 15:10

1 Answer 1

2

The old rdoc/usage module was removed from rdoc quite some time ago, namely in Ruby 1.9.1 (when rdoc was still part of the Ruby core language). See https://bugs.ruby-lang.org/issues/2713 for a discussion or the SVN commit.

Thus, with recent Rubies, there is no way to use this module anymore. You should update your code to use alternatives to generate documentation.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.