Sunday, August 25, 2019

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



I don't use the RI or RDoc output from the gems I install in my machine or in the servers I handle (I use other means of documentation).



Every gem I install installs RI and RDoc documentation by default, because I forget to set --no-ri --no-rdoc.



Is there a way to make those two flags the default?


Answer



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




gem: --no-document


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

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...