How to hide the soap4r gem warnings

1.7k Views Asked by At

I write the ruby code to access the magento core api, with the help of soap4r gem. When i run the code it works perfectly, but the problem is it should giving the lots of soap warnings.

/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

i got the above the warnings. So anyone tell me how to hide these kind of warnings. thanks.

3

There are 3 best solutions below

0
On BEST ANSWER

soap4r has a number of known issues with Ruby 1.9. You should consider using one of the newer SOAP toolkits, such as savon or handsoap

0
On

You can just set $VERBOSE=nil and all warnings disappear.

0
On

consider using soap4r-spox gem