sanity, inc.

simple thinking for complex software

Generate an HTML Index of Your Ruby Gem Rdocs

Rubygems is kind enough to generate RDoc for installed gems, but the directories move as the gem versions evolve, and it’s inconvenient to keep browsing for them. This tool produces a useful HTML index with direct links to the RDocs for all the gems installed on your system.

Example Gem RDoc index page

Getting it

The program’s git repository is here: gemdocindex.

Either browse to ‘gemdocindex’ there and download the raw version, or check out (“clone”) the repository as follows:

1
git clone git://github.com/purcell/gemdocindex.git

You can then track future changes by executing this command in the ‘gemdocindex’ directory:

1
git pull

Running it

Execute this command from a UNIX command line:

1
./gemdocindex > gemindex.html

(Windows users can probably run the same command, adding “ruby” at the beginning.)

Tested on OS X; should work on other platforms. Patches are welcome.

Further information

If you found this helpful, you can subscribe to get more articles about Rails and Ruby-related topics and tools.

Comments