I can’t believe I didn’t know about this until recently… it’s such a gem of a tip. :)

If you type “gem server” in the shell, you’ll start a webrick server that’s listening on port 8808 to dish out all of the help files for your installed ruby gems. Here’s a little alias I made that helps me get right to the documentation from the console:


alias gemdocs="gem server >/dev/null 2>&1 & \
    sleep 0.2 ; open http://localhost:8808"

Basically, it starts the gem server and ignores the log output. Next, it waits a fraction of a second for the server to start listening on port 8808, and then uses the Mac OS “open” command to open the default browser and points it to the gem server so you can start looking at your documentation.

Having a gem server is Brilliant!