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?
Use `gem install -v` You may already be familiar with gem install , but if you add the -v flag, you can specify the version of the gem to install. Using -v you can specify an exact version or use version comparators.
Almost seems like running 'gem install' adds it to the global available gems (and hence terminal can run the package's commands), whereas adding it to the gemfile and running bundle install only adds it to the application. Similar to npm install --global. that's basically it.
Common Attempts To Resolve Ruby Gem Dependencies Bundler can help to resolve dependencies when working with Ruby gems by allowing you to specify a set of gems in a Gemfile, then issue a single command to install them. Bundler then automatically resolves the dependencies for you.
The install command installs local or remote gem into a gem repository. For gems with executables ruby installs a wrapper file into the executable directory by default.
The install command downloads and installs the gem and any necessary dependencies then builds documentation for the installed gems. $ gem install drip Fetching: rbtree-0.4.1.gem (100%) Building native extensions. This could take a while...
Ruby installs the dependency rbtree and builds its extension, installs the drip gem, then builds documentation for the installed gems. You can disable documentation generation using the --no-doc argument when installing gems.
The list command shows your locally installed gems: (Ruby ships with some gems by default, bigdecimal, io-console, json, minitest, psych, rake, rdoc, test-unit for ruby 2.0.0). The uninstall command removes the gems you have installed. If you uninstall a dependency of a gem RubyGems will ask you for confirmation.
RBTree is a subclass of MultiRBTree. ------------------------------------------- If you wish to audit a gem’s contents without installing it you can use the fetch command to download the .gem file then extract its contents with the unpack command.
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.)
The option has changed to --no-document
(see http://rubygems.rubyforge.org/rubygems-update/History_txt.html)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With