Based on good work found at http://goo.gl/bKjJe
If you have Nginx running, you can run Yard as a rack app to serve docs for locally installed Gem.
- Create a directory to host Rack app. Install yard gem
mkdir -p ~/Dropbox/yard/public
gem install yard
- Add config.ru as
~/Dropbox/yard/config.ru
- Add Gemfile as
~/Dropbox/yard/Gemfile
- Run
cd ~/Dropbox/yard; bundle install
- In nginx config, add gems.doc virtualhost
- Add a localhost alias
gems.doc
to/etc/hosts
file. - Restart nginx and access http://gems.doc:8010 to see docs.
- You'll need to re-start nginx everytime you add new gems to your Ruby installation.