How to disable post-install messages from rubygems?

后端 未结 4 2316
轮回少年
轮回少年 2021-02-20 10:16

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

Post-install message from httparty:
When you HTTPa         


        
相关标签:
4条回答
  • 2021-02-20 10:22

    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.

    0 讨论(0)
  • 2021-02-20 10:35

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

    0 讨论(0)
  • 2021-02-20 10:36

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

    bundle config ignore_messages.httparty true

    0 讨论(0)
  • 2021-02-20 10:40

    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

    0 讨论(0)
提交回复
热议问题