Ruby ri file - Nothing known about File error

1.3k views Asked by At

I tried installing a gem first gem install rdoc-data After it successfully installed, I tried rdoc-data --install However, I get the error: Your ruby version 2.1.1 is not supported, only 1.8.7, 1.9.2, 1.9.3, 2.0.0

Does this mean I have to downgrade to Ruby 2.0.0?


I tried running ri File to read the documentation however all I get is the message: Nothing known about File.

Did some research into older Stack Overflow posts and someone suggested running rvm docs generate however all I get is "Currently 'rvm docs ...' does not work with non-rvm rubies.

2

There are 2 answers

0
Moin Haidar On

Install ri documentation first:

rvm docs generate-ri
0
stevec On

I used

gem install rdoc-data
gem rdoc --all --ri --no-rdoc

Don't forget to open a new terminal window, then ri "test" ri "if" etc should thereafter.

These commands came from here and here