Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install the Ruby ri documentation?

Tags:

ruby

I've recently installed Ruby 1.9.1 on Windows 7, and apparently it doesn't come with the standard ri documentation. So when I do 'ri Array', I get:

C:\>ri Array  Nothing known about Array 

Is there a way I can install this documentation so that the above works?

like image 208
Grant Crofton Avatar asked Jul 05 '10 10:07

Grant Crofton


People also ask

What is ri documentation?

ri is a tool that allows Ruby documentation to be viewed on the command-line. You can use ri to look up information from either the command line or interactively. When you run ri without any arguments it will launch in interactive mode. In interactive mode you can tab-complete class and method names.

What is Ri in Ruby?

ri an online reference tool developed by Dave Thomas, the famous pragmatic programmer. When you have a question about the behavior of a certain method, you can invoke ri to read the brief explanation of the method.


1 Answers

In case people on other platforms need to install their ri docs (like I did). This article gives the why and the how:

http://jstorimer.com/ri.html

The command is:

gem rdoc --all --ri --no-rdoc 
like image 136
Jon Smock Avatar answered Sep 20 '22 07:09

Jon Smock