How to disable post-install messages from rubygems?

房东的猫 提交于 2020-12-02 06:51:07

问题


I'm tired of seeing silly messages like this, after installing gems:

Post-install message from httparty:
When you HTTParty, you must party hard!

In a quick scan of the RubyGems Guides I found no option to disable post-install messages. I'm hoping to be able to configure this in my ~/.gemrc.


回答1:


This gem will disable all post install messages of other gems.




回答2:


To ignore all post-install messages, in all projects:

bundle config --global ignore_messages true

Documentation:

ignore_messages (BUNDLE_IGNORE_MESSAGES): When set, no post install messages will be printed. To silence a single gem, use dot notation like ignore_messages.httparty true. https://bundler.io/v1.13/man/bundle-config.1.html




回答3:


If you are using bundler they added an option for that, just

bundle config ignore_messages.httparty true




回答4:


I wouldn't recommend disabling them. Granted HTTParty's isn't useful, but the reason they are there is to tell you something important about upgrades, etc.

If it were me, I would fork httparty's gem, remove the message, and submit a pull request pointing out that it's not helpful and increases the signal to noise ratio.



来源:https://stackoverflow.com/questions/21584349/how-to-disable-post-install-messages-from-rubygems

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