我刚刚在 Rails 3.2.11 上安装了 Savon 2.0.2。当我尝试在控制台中创建新客户端时,我得到TypeError: can't convert String into Hash
:
1.9.3-p362 :003 > client = Savon::Client.new("http://www.webservicex.net/uszip.asmx?WSDL")
TypeError: can't convert String into Hash
from /Users/jasonswett/.rvm/gems/ruby-1.9.3-p362/gems/savon-2.0.2/lib/savon/options.rb:49:in `merge'
from /Users/jasonswett/.rvm/gems/ruby-1.9.3-p362/gems/savon-2.0.2/lib/savon/options.rb:49:in `initialize'
from /Users/jasonswett/.rvm/gems/ruby-1.9.3-p362/gems/savon-2.0.2/lib/savon/client.rb:10:in `new'
from /Users/jasonswett/.rvm/gems/ruby-1.9.3-p362/gems/savon-2.0.2/lib/savon/client.rb:10:in `initialize'
from (irb):3:in `new'
from (irb):3
from /Users/jasonswett/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.11/lib/rails/commands/console.rb:47:in `start'
from /Users/jasonswett/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.11/lib/rails/commands/console.rb:8:in `start'
from /Users/jasonswett/.rvm/gems/ruby-1.9.3-p362/gems/railties-3.2.11/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
知道为什么会发生这种情况吗?这是一个全新的、几乎是普通的 Rails 应用程序,所以我不明白可能出了什么问题。