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

44,953

Solution 1

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)

Solution 2

Bundler doesn't include rdoc and ri. There is nothing you need to do.

Solution 3

See https://stackoverflow.com/a/7662245/109618 for a better ~/.gemrc:

install: --no-rdoc --no-ri 
update:  --no-rdoc --no-ri

Solution 4

The up-to-date setting for ~/.gemrc is

gem: --no-document

But as pointed out, this is already bundler's default.

Share:
44,953
deb
Author by

deb

Updated on July 15, 2020

Comments

  • deb
    deb almost 4 years

    When using gem install gem_name I can pass --no-rdoc and --no-ri switches to skip generating RDoc/RI documentation for the gem on install.

    Is there a similar way to do this with bundle install?

  • deb
    deb over 12 years
    should it be gem: --no-rdoc --no-ri or :gem: --no-rdoc --no-ri?
  • Mitch Dempsey
    Mitch Dempsey over 12 years
    I copied and pasted what I have in my file, and that has been working for me for a while
  • docwhat
    docwhat over 12 years
    Order doesn't matter, btw. It's a list of command line flags to pass to gem.
  • Timbinous
    Timbinous over 9 years
    So I see I'm downvoted 5 times. Can anyone explain how I am wrong? Bundler does not include RDoc and RI files when you install gems using bundle install. People wanted this as a feature to allow you to install the documentation but they just don't allow it.
  • p4sh4
    p4sh4 over 9 years
    Timbinous is right. It is not only correct, it should be the accepted answer because it actually answers the question. Damn shame people are herd-downvoting a correct answer when they know nothing.
  • Timbinous
    Timbinous about 9 years
    Just so I'm clear Cyril. When he asks is there a similar way to do this with bundle install? Telling him that bundler already does this for you by default is not actually solving his problem. He never had a problem to begin with. I was telling him that.
  • Kris
    Kris almost 5 years
    Works with gem 2.x
  • buncis
    buncis almost 3 years
  • A moskal escaping from Russia
    A moskal escaping from Russia about 2 years