Using --No-Rdoc and --No-Ri with Bundler

Using --no-rdoc and --no-ri with bundler

Make a file ~/.gemrc and put this in it:

gem: --no-rdoc --no-ri

That should make it apply whenever you run the gem command. (Even from bundle install)

How to make --no-ri --no-rdoc the default for gem install?

You just add the following line to your local ~/.gemrc file (it is in your home folder):

gem: --no-document

by

echo 'gem: --no-document' >> ~/.gemrc

or you can add this line to the global gemrc config file.

Here is how to find it (in Linux):

strace gem source 2>&1 | grep gemrc

The --no-document option is documented in the RubyGems CLI Reference.

What to use instead of --no-ri for gem install?

The new option is --no-document or -N.

From gem help install:

  Deprecated Options:
--[no-]rdoc Generate RDoc for installed gems
Use --document instead
--[no-]ri Generate ri data for installed gems.
Use --document instead

How do I make --no-ri --no-rdoc the default for gem install?

Just add

gem: --no-ri --no-rdoc

to your ~/.gemrc file

How to specify no ri/rdoc exists for a gem so user doesn't get warning when trying to install

So there was actually a confusion of issues on this question. I mistakenly assumed the error message about lib was associated with the message before it about the ri install.

This was not the case. The problem was that the default require_paths is ["lib"] which my gem did not have. Resetting the require_paths in my gemspec eliminated the error.

Ruby - global --no-document with RVM

run below command on linux/unix/mac

echo 'gem: --no-document' >> ~/.gemrc

and then install any gem (even with rvm) and it should work

How to specify no ri/rdoc exists for a gem so user doesn't get warning when trying to install

So there was actually a confusion of issues on this question. I mistakenly assumed the error message about lib was associated with the message before it about the ri install.

This was not the case. The problem was that the default require_paths is ["lib"] which my gem did not have. Resetting the require_paths in my gemspec eliminated the error.



Related Topics



Leave a reply



Submit