如何为rails app设置`httpclient` gem的全局配置?

时间:2015-02-18 17:23:53

标签: ruby-on-rails ruby logging warnings httpclient

每当我的应用程序中的某个gem使用httpclient-2.1.0时(我在rails Gemfile中没有这个gem) - 它会向日志文件写入许多警告:

opt/ruby/2.1.2/lib/ruby/gems/2.1.0/gems/httpclient-2.3.4.1/lib/httpclient/ssl_config.rb:333:in `default_verify_callback' : at depth 2 - 19: self signed certificate in certificate chain (StandardWarning)
opt/ruby/2.1.2/lib/ruby/gems/2.1.0/gems/httpclient-2.3.4.1/lib/httpclient/ssl_config.rb:333:in `default_verify_callback' : at depth 2 - 19: self signed certificate in certificate chain (StandardWarning)
opt/ruby/2.1.2/lib/ruby/gems/2.1.0/gems/httpclient-2.3.4.1/lib/httpclient/ssl_config.rb:333:in `default_verify_callback' : at depth 2 - 19: self signed certificate in certificate chain (StandardWarning)
opt/ruby/2.1.2/lib/ruby/gems/2.1.0/gems/httpclient-2.3.4.1/lib/httpclient/ssl_config.rb:333:in `default_verify_callback' : at depth 2 - 19: self signed certificate in certificate chain (StandardWarning)
opt/ruby/2.1.2/lib/ruby/gems/2.1.0/gems/httpclient-2.3.4.1/lib/httpclient/ssl_config.rb:333:in `default_verify_callback' : at depth 2 - 19: self signed certificate in certificate chain (StandardWarning)
opt/ruby/2.1.2/lib/ruby/gems/2.1.0/gems/httpclient-2.3.4.1/lib/httpclient/ssl_config.rb:333:in `default_verify_callback' : at depth 2 - 19: self signed certificate in certificate chain (StandardWarning)

应用程序正常运行,我不知道这些警告的原因是什么。以及如何禁用它..

我可以以某种方式将HttpClient配置'use_ssl'全局设置为false吗? 请帮忙。

0 个答案:

没有答案