The 3 Step Guide to Slick Local Documentation for all your Ruby Gems
A couple of weeks ago, I wrote about RubyDoc.info, a "good looking, up-to-date Ruby documentation" site powered by YARD. Well, as of YARD 0.6 you can get the same greatness that RubyDoc.info provides applied to your local machine's collection of gems in just a few steps. Try it out - you won't regret it.
Step 1: Install YARD. Install the
yard gem with
sudo gem install yard or similar.
Step 2: Run the YARD server. Run
yard server --gems. Take note of the hostname and port given in the output.
Step 3: Get browsing. Visit
http://0.0.0.0:8808/, where the IP address and port should be replaced with those provided by the YARD server. This URL should work for most of you though.
How does it look? Here's the overall view of all installed gems:
And here's a specific gem's documentation:
There's a lot more to YARD than merely serving up documentation - it's primarily a tool for generating it from both RDoc and YARD-enhanced RDoc formats. Learn more at Loren Segal's YARD 0.6.0 release post or from the GitHub project.