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
).
Download
There is a project page on sourceforge that contains CHM documentation for Ruby 1.8.6 and Rails 2.2.
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/

Mac OS X-user might find their gem-homedirectory at
/usr/local/lib/ruby/gems/1.8/gems/
- if you can’t find it there you might locate gem by executing “locate gems”.
florianb said this on September 6, 2008 at 10:42 am
Both CHM files are not working and resulting in missing page
Raza said this on January 23, 2009 at 1:01 am
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.
moiristo said this on January 23, 2009 at 3:16 pm
Do this::
1. right click, properties, unblock
rollyn said this on February 5, 2009 at 1:14 am
Thanks, it worked
Raza said this on February 5, 2009 at 9:54 am