tags:

views:

286

answers:

3

Hi,

I've never seen the point of installing the ri and rdoc for gems and my .gemrc file has --no-ri and --no-rdoc set. Since every gem includes ri and rdoc info, I just wondered if I'm missing something? Is there any advantage to installing the ri and rdoc for a gem?

Thanks

Chris

Summary

If you don't install the ri and rdoc, you don't lose anything of great value. I thought perhaps it got used in some of the IDEs (I'm an Emacs user) but that doesn't seem to be the case.

+1  A: 

Install it if you want locally available documentation for the gem.

John Topley
So not really missing anything then.
Chris McCauley
+4  A: 

The point of installing ri documentation is simply that you can use the "ri" command to access method-by-method documentation. For an example, try: "ri String#reverse". Exit by pressing "q".

To try out RDoc documentation, run "gem server" and then connect to localhost:8808 in your browser. I find it useful - you can even click on a method name to see the source code. Of course, you can just go into your gems folder and open the HTML files in the doc folder.

An alternate way to access RDoc is the gemdoc command. See http://www.stephencelis.com/2008/06/12/bashfully-yours-gem-shortcuts.html. That's quite handy, IMHO.

Anyway, you can be lazy and wait until you need the RDoc documentation, and then generate it with "gem rdoc ".

Paolo Perrotta
Thanks for mentioning gem server
nilbus
+1  A: 

Personally, I'm installing my gems without rdoc and ri, too, because normally you can find all the documentation you need on the internet as well (i.e. www.rdoc.info), so there's no need for investing hard disk space and time the generation takes

TheDeadSerious