Ruby Documentation 2.2.2 ri

I am starting to learn Ruby, so I installed Ruby 2.2.2 via Macports. I understand that the documentation is ri

not installed by default, so I want to generate it. I read several questions / answers on SO and came up with the following:

gem install rdoc-data

rdoc-data --install

and said: Your ruby version 2.2.2 is not supported, only 1.8.7, 1.9.2, 1.9.3, 2.0.0

How do I get documentation ri

for version 2.2.2? Is there another way?

+3


source to share


1 answer


If you are using version 2.0 or latest and you are using Ruby Installer for Windows follow these steps:

From the command line and from the Ruby installation folder, just enter gem install rdoc-data strong> at the command line. This results in rdocs being generated in a folder named doc in the Ruby installation folder.



Instead of browsing online to check the API or documentation, you can simply open the files in the doc folder. I know this is contrary to the teaching of most Ruby books and tutorials, but keep in mind that you just created the API on your hard drive and you don't need to use ri on the command line. You can just expose the API while coding.

0


source







All Articles