Just copy content to corresponding files
Created
November 21, 2011 15:36
-
-
Save gmarik/1382974 to your computer and use it in GitHub Desktop.
Disable Gem deprecation spam
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -d "$HOME/.ruby/lib/" ]; then | |
RUBYLIB="$RUBYLIB:$HOME/.ruby/lib" | |
RUBYOPT="-rno_deprecation_warnings_kthxbye" | |
export RUBYLIB RUBYOPT | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .ruby/lib/no_deprecation_warnings_kthxbye.rb | |
begin | |
require 'rubygems' | |
Gem::Deprecate.skip = true if defined?(Gem::Deprecate) | |
rescue LoadError => e | |
p e | |
end |
Hey, were you looking for ruby or gem deprecation warnings? This ones are for gem, and probably irrelevant nowdays.
For ruby you need
$ RUBYOPT=-W0 ruby script.rb
to disable warnings.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Flakster the first one would go to the end of your
$HOME/.bashrc
The second one goes into
$HOME/.ruby/lib/no_deprecation_warnings_kthxbye.rb
Though, to be fair, I haven't seen any change.