I ha开发者_如何学编程ve a bunch of gems that I use, but am often disconnected and want to be able to pull up documentation on the gems locally.
so far, the only thing I've been able to do is actually go to the gem library and find the README.
Is there a better way that shows the readme and the full documentation locally without going to the web/github?
Have you tried gem server
? I don't install RDocs, but I believe it will provide a way to browse the RDocs while offline.
gem server
And some more characters.
gem server
This will launch a local web server that you can browse. If the gem includes documentation, you get it.
I have the following simple shell script that allows me to browse everything offline and at my prompt:
> cat ~/bin/rim
ri -Tf ansi -w 150 $1
usage
> rim Bundler
Bundler
(from gem bundler-1.0.10)
------------------------------------------------------------------------------
Constants:
[...]
There are alot of other tools here if you don't like
gem server
http://ruby-toolbox.com/categories/gem_doc_viewers.html
Ref. http://guides.rubygems.org/rubygems-basics/#viewing-documentation
You can use ri [options] [names]
command, e.g. ri RBTree
. ri --help
for more info.
or gem server
command, where you can access the docs at localhost:8808
精彩评论