2

Installed Ruby 2.3.1 using rbenv and now I want to enable

gem: --no-document

for all users. I mean I do not want to put it into ~/.gemrc. Here (How to make --no-ri --no-rdoc the default for gem install?) I've read that this global file is /etc/gemrc but it does not work for me.

Tried on Mac with default Ruby 2.0.0, with Ruby installed with rbenv, inside Docker image CentOS 6.7 - no luck, /etc/gemrc does not work for me.

But when I copy gemrc to my home dir with cp /etc/gemrc ~/.gemrc and install any gem, I immediately see that documentation is no longer installed.

Where am I mistaken or maybe something changed in Ruby-world?

Kirill
  • 6,762
  • 4
  • 51
  • 81

1 Answers1

1

The new notation is:

install: --no-document

The directives are now per gem command, not for gem itself.

tadman
  • 208,517
  • 23
  • 234
  • 262
  • Good to know. Since what version/dates? Unfortunately this still does not work if I put it into `/etc/gemrc` – Kirill Oct 26 '17 at 16:39
  • 1
    `rbenv` uses different config locations since it's user-specific. It may not even look in `/etc`. I think this is since Rubygems 2.0 but I could be wrong. They've changed it back and forth a few times for reasons nobody can ever explain. – tadman Oct 26 '17 at 17:12