Viewing documentation for your ruby gems

As I get started with ruby, one of the things I've noticed is that ruby's documentation could be a bit better.  However, I discovered that this four line ruby script will give your documentation for your server's installed gems:

1
2
3
4
#!/usr/bin/env ruby
require "rubygems/server"
options = {:gemdir => Gem.dir, :port => 4242, :daemon => true}
Gem::Server::run(options)

Thanks to Daniel for the ruby code!

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Printed from: http://rackerhacker.com/2008/11/05/viewing-documentation-for-your-ruby-gems/ .
© Major Hayden 2010.

1 Comment   »

  • Vincent says:

    hi,
    a "gem server --deamon -p 4242" will also do the trick

RSS feed for comments on this post , TrackBack URI

Leave a Reply