Ruby Core & Ruby on Rails CHM Documentation

Today, my company’s internet provider managed to cut off the internet connection for the whole day! This made me wonder why I always use the online available Ruby & RoR APIs, while having them offline would give me faster loading times and doesn’t require an internet connection (although that situation is probably the same as being cut off from water for most of us 🙂 ).


There is a project page on sourceforge that contains CHM documentation for Ruby 1.8.6 and Rails 2.3.

Do it yourself

Rdoc provides you with four possible formats to create your own documentation: html, xml, ri and chm.

To create the documentation for Ruby, go to the Ruby source directory (\src\ruby-x.x.x-pxxx) in the console and enter: rdoc -f [format] -o [destination-folder].

To create the documentation for Rails, go to the ruby gems directory (i.e. \lib\ruby\gems\1.8\gems) and enter: rdoc -f [format] -x test/* -x template/* -o [destination-folder] action* active* rails-* .

The extra argument -x template/* is needed here to prevent errors from occurring during compilation, as discussed here. This problem occurs for both html and chm compilation.

Update 16-12-2008: When generating the Rails documentation, a good idea is to also add -x test/* to the command, since you’ll probably don’t need the documentation of Rails’s test classes, which are included in the gems.

If you are using windows, you might like the CHM format (the Windows Helpfile format). To be able to create CHM files, you’ll need HTML Help Workshop. Install it in C:\Program Files\HTML Help Workshop\, even if you are running Windows x64.

Update 16-12-2008: A small list of locations of gem home directories:

  • Windows:
    • C:\ruby\lib\ruby\gems\1.8\gems
  • Mac OS X
    • /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/user-gems/1.8/gems (included version)
    • /usr/local/lib/ruby/gems/1.8/gems/

~ by moiristo on August 28, 2008.

5 Responses to “Ruby Core & Ruby on Rails CHM Documentation”

  1. Mac OS X-user might find their gem-homedirectory at
    – if you can’t find it there you might locate gem by executing “locate gems”.

  2. Both CHM files are not working and resulting in missing page

  3. Thanks for notifying me. It seems that rdoc generates a chm with links to an absolute path, so when moving the chm it breaks. Since the sourceforge project is still nicely maintained, I’ve removed the chm files I’ve generated myself.

  4. Do this::

    1. right click, properties, unblock

  5. Thanks, it worked

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: