Can You Install Documentation for Existing Gems

Can you install documentation for existing gems?

> gem help rdoc

Usage: gem rdoc [args] [options]
Options:
--all Generate RDoc/RI documentation for all
installed gems
--[no-]rdoc Include RDoc generated documents
--[no-]ri Include RI generated documents
-v, --version VERSION Specify version of gem to rdoc
Arguments:
GEMNAME gem to generate documentation for (unless --all)
Summary:
Generates RDoc for pre-installed gems
Defaults:
--version '>= 0' --rdoc --ri

Can you install documentation for existing gems?

> gem help rdoc

Usage: gem rdoc [args] [options]
Options:
--all Generate RDoc/RI documentation for all
installed gems
--[no-]rdoc Include RDoc generated documents
--[no-]ri Include RI generated documents
-v, --version VERSION Specify version of gem to rdoc
Arguments:
GEMNAME gem to generate documentation for (unless --all)
Summary:
Generates RDoc for pre-installed gems
Defaults:
--version '>= 0' --rdoc --ri

Does rails and other gems install documentation anywhere when you install them?

If you have installed your gems the "normal" way, they install rdoc documentation.

Just run gem server in your console and go to http://localhost:8808 in your browser. There you'll find all available Gems and the RDoc documentation

How can I install RDOC of gems already installed?

EDIT:

Some of the answers on this question may help you.

OLD:

This site seems to have your answer.

Example:

gem rdoc rake --version 0.5.4

Is there a way to view docs for all gems in a project?

Yes, it is part of RubyGems - specifically, the gem command (the same one used to install gems).

To view info for the gems installed to your system e.g. the ones you installed via gem install and not through a Gemfile, you use gem server and then visit the web interface at http://localhost:8808

To see documentation for only gemfile-specific packages, you can use bundle exec gem server.

Is it possible to generate Rdocs after a gem has already been installed?

Yes, with the gem rdoc command.

See gem help rdoc for details.

How to rebuild rdoc for all the installed gems?

yard gems

or

sudo yard gems

should do the job. You may also want to use the --rebuild flag. If you want to run a local Yardoc server for your installed gems, then run

yard server -g

How do you remove the documentation installed by gem install?

Gem documentation is installed in [RUBY]/lib/ruby/gems/doc, where [RUBY] is the directory into which you installed Ruby (C:/ruby on my machine).

I don't see why you shouldn't just delete the folders representing the gems for which don't don't need documentation: you can always regenerate it.



Related Topics



Leave a reply



Submit