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

情到浓时终转凉″ 提交于 2019-12-09 15:28:49

问题


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

I never use ri nor rdoc and they take too long to install. Is there a config file somewhere that will let me do this


回答1:


Just add

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

to your ~/.gemrc file




回答2:


You're looking for the '.gemrc' config file.




回答3:


you can alias your gem command for something like

alias geminst='gem install --no-ri --no-rdoc'



回答4:


Under Windows XP the path to gemrc file is "c:\Documents and Settings\All Users\Application Data\gemrc". And this file is not created by default, you should create it yourself.




回答5:


To add those flags to ~/.gemrc only for those specific commands that need them:

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


来源:https://stackoverflow.com/questions/1789376/how-do-i-make-no-ri-no-rdoc-the-default-for-gem-install

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!