Pregunta

Previously set up my system to suppress installing gem documentation with --no-ri and --no-rdoc.

Ruby 2.0.0 and gem 2.0.0 seems to have removed the --no-ri flag (and functionality?).

Even when specifying --no-rdoc, I still get installing documentation:

~/dev/ruby> gem install bundler --no-rdoc
Fetching: bundler-1.3.1.gem (100%)
Successfully installed bundler-1.3.1
Done installing documentation for bundler (0 sec).

How to see whether or not documentation is installed? If it is installed, how to suppress for all gem installs?

¿Fue útil?

Solución

As gem help install states:

Usage: gem install GEMNAME [GEMNAME ...] [options] -- --build-flags [options]
...
  Install/Update Options:
    ...
        --[no-]document [TYPES]      Generate documentation for installed gems
                                     List the documentation types you wish to
                                     generate.  For example: rdoc,ri
    -N, --no-document                Disable documentation generation

In short:

  • --no-rdoc is now --no-document rdoc

  • --no-ri is now --no-document ri.

  • You can prevent both from installing with either --no-document or -N.

(Unfortunately as of this writing the documentation on Rubygems.org is currently out-of-date, so ignore that for now.)

Otros consejos

The option has changed to --no-document (see http://rubygems.rubyforge.org/rubygems-update/History_txt.html)

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top