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
How to Split a String by Commas Except Inside Parenthesis, Using a Regular Expression
Difference Between or and || When Setting Variables
How to Model a Mutual Friendship in Rails
Add Existing Classes into a Module
How to Reference a Constant in a Yaml with Rails
How to Get the Array Index or Iteration Number with an Each Iterator
Rails 3 - How to Set Start Date to Date_Select Method
Select Checkbox Pass Array in Ruby on Rails
How to Write to File When Using Marshal::Dump in Ruby for Object Serialization
How Do Version Numbers Work for Mri Ruby
Bootstrap Datepicker Default Value Simple_Form_For
How to Has_And_Belongs_To_Many Multiple Instances of the Same Model
How to Count Existing Instances of a Class in Ruby