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.
How do I make --no-ri --no-rdoc the default for gem install?
Just add
gem: --no-ri --no-rdoc
to your ~/.gemrc file
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 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.
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 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
How to Redirect to a 404 in Rails
How to Get a Random Number in Ruby
Best Way to Require All Files from a Directory in Ruby
Using Sinatra For Larger Projects Via Multiple Files
How to Break Out from a Ruby Block
Ruby Objects and Json Serialization (Without Rails)
How to Solve "Ruby Installation Is Missing Psych" Error
Backslashes in Single Quoted Strings Vs. Double Quoted Strings
Why Doesn't Ruby Support I++ or I-- (Increment/Decrement Operators)
Rvm Installation Not Working: "Rvm Is Not a Function"
Ruby: What Does 'Require: False' in Gemfile Mean
Reducing N+1 Queries Using the Bullet and Rspec Gems
Checking If a Variable Is Defined