我有一个使用savon制作肥皂请求的ruby / thor脚本。如果我在桌面上运行脚本:
thor my_script:my_action
一切正常。如果我用:运行脚本
bundle exec thor my_script:my_action
当savon试图解析响应时我收到错误。错误是:
Zlib::DataError incorrect header check
我使用Gem.loaded_specs.values.map {|x| "#{x.name} #{x.version}"}
查看加载了哪些版本的gem。有或没有bundle exec版本是相同的。 bundle exec确实包含2个额外的gems bundler和io-console。
如果我在Server 2012上运行相同的脚本,我会在有或没有bundle exec的情况下得到Zlib错误。
如何获得有关如何使其工作的更多信息?
桌面Ruby:ruby 2.3.1p112 (2016-04-26 revision 54768) [x64-mingw32]
服务器Ruby:ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]
堆栈追踪:
incorrect header check
C:/tools/ruby23/lib/ruby/2.3.0/net/http/response.rb:380:in 'inflate'
C:/tools/ruby23/lib/ruby/2.3.0/net/http/response.rb:380:in 'block in inflate_adapter'
C:/tools/ruby23/lib/ruby/2.3.0/net/protocol.rb:411:in 'call_block'
C:/tools/ruby23/lib/ruby/2.3.0/net/protocol.rb:402:in '<<'
C:/tools/ruby23/lib/ruby/2.3.0/net/protocol.rb:108:in 'read'
C:/tools/ruby23/lib/ruby/2.3.0/net/http/response.rb:402:in 'read'
C:/tools/ruby23/lib/ruby/2.3.0/net/http/response.rb:291:in 'block in read_body_0'
C:/tools/ruby23/lib/ruby/2.3.0/net/http/response.rb:262:in 'inflater'
C:/tools/ruby23/lib/ruby/2.3.0/net/http/response.rb:281:in 'read_body_0'
C:/tools/ruby23/lib/ruby/2.3.0/net/http/response.rb:202:in 'read_body'
C:/tools/ruby23/lib/ruby/2.3.0/net/http/response.rb:227:in 'body'
C:/tools/ruby23/lib/ruby/2.3.0/net/http/response.rb:164:in 'reading_body'
C:/tools/ruby23/lib/ruby/2.3.0/net/http.rb:1445:in 'transport_request'
C:/tools/ruby23/lib/ruby/2.3.0/net/http.rb:1407:in 'request'
C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/httpi/adapter/net_http.rb:70:in 'perform'
C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/httpi/adapter/net_http.rb:47:in 'block in request'
C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/httpi/adapter/net_http.rb:87:in 'block in do_request'
C:/tools/ruby23/lib/ruby/2.3.0/net/http.rb:853:in 'start'
C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/httpi/adapter/net_http.rb:85:in 'do_request'
C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/httpi/adapter/net_http.rb:38:in 'request'
C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/httpi.rb:161:in 'request'
C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/httpi.rb:133:in 'post'
C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/savon-2.11.1/lib/savon/operation.rb:94:in 'block in call_with_logging'
C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/savon-2.11.1/lib/savon/request_logger.rb:12:in 'log'
C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/savon-2.11.1/lib/savon/operation.rb:94:in 'call_with_logging'
C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/savon-2.11.1/lib/savon/operation.rb:54:in 'call'
C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/savon-2.11.1/lib/savon/client.rb:36:in 'call'
D:/integrator_promo/lib/soap_order_status.rb:47:in 'query_all_since_last_update'
D:/integrator_promo/lib/update_runner.rb:61:in 'block (2 levels) in process'