Saturday, July 15, 2006

Offline rdoc gem documentation in Ruby

I always forget how to do this one, even though it's really simple. (Make sure that you have rdoc installed first) To view all the API documentation in gems, simple run:

gem_server
gem server

from the command prompt. It will start a WEBrick server up on your local machine on port 8808. Therefore, if you browse to http://localhost:8808/, you'll see a list of documentation of the gems on your machine.

Updated:
It's incorporated into the gem command now, so just do "gem server"

3 comments:

  1. Anonymous11:02 AM

    Actually I find that it's with a space, not an underscore, otherwise it won't work:
    gem server

    ReplyDelete
  2. Anonymous2:08 PM

    i was looking for this for quite some time. I figured something like this should exist, because when you install a gem it says installing rdoc. Great stuff!

    ReplyDelete
  3. yeah, it's with a space. gem_server was the old command. They sucked it into the gem command now.

    ReplyDelete