Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable post-install messages from rubygems?

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.

like image 396
Jared Beck Avatar asked Feb 05 '14 17:02

Jared Beck


People also ask

How to uninstall a gem in RubyGems?

Only for use by gem repackagers. The uninstall command removes a previously installed gem. RubyGems will ask for confirmation if you are attempting to uninstall a gem that is a dependency of an existing gem. You can use the –ignore-dependencies option to skip this check.

How do I check that my RubyGems plugin is loaded?

The first step is to follow the conventional file name, we will use ruby for this example and check that our plugin is loaded correctly: % cat lib/rubygems_plugin.rb puts 'hello from my plugin!' % RUBYOPT=-Ilib gem hello from my plugin! RubyGems is a sophisticated package manager for Ruby.

How to update the editor in RubyGems?

Editor command can be specified with -e option, otherwise rubygems will look for editor in $EDITOR, $VISUAL and $GEM_EDITOR variables. The outdated command lists gems you may wish to upgrade to a newer version. You can check for dependency mismatches using the dependency command and update the gems with the update or install commands.

What is @RubyGems?

RubyGems is a sophisticated package manager for Ruby. This is a basic help message containing pointers to more information. Usage: […] Of course, our plugin would better be packaged as a gem, which is described in detail in the make your own gem guide.


2 Answers

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

bundle config ignore_messages.httparty true

like image 78
fpg1503 Avatar answered Oct 05 '22 22:10

fpg1503


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

like image 20
Jared Beck Avatar answered Oct 05 '22 20:10

Jared Beck