如何隐藏soap4r gem警告



在soap4r gem的帮助下,我编写了ruby代码来访问magento核心api。当我运行代码时,它工作得很好,但问题是它应该给出大量的soap警告。

/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/xsd/charset.rb:13: warning: variable $KCODE is no longer effective
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/property.rb:68: warning: encoding option is ignored - u
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/property.rb:69: warning: encoding option is ignored - u
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/property.rb:70: warning: encoding option is ignored - u
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key
/home/chandru/.rvm/gems/ruby-1.9.2-p0/gems/soap4r-1.5.8/lib/soap/rpc/element.rb:226: warning: Hash#index is deprecated; use Hash#key

我得到了上面的警告。有人能告诉我如何隐藏这些警告吗?谢谢。

soap4r在Ruby 1.9中有许多已知的问题。您应该考虑使用较新的SOAP工具包之一,例如savon或handsoap

考虑使用soap4r-spox gem

您只需设置$VERBOSE=nil,所有警告都会消失。

相关内容

  • 没有找到相关文章

最新更新