问题
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