Using SOAP and other Standard Libraries in Ruby 1.9.2

后端 未结 3 1715
执笔经年
执笔经年 2020-12-29 16:41

So, I recently upgraded to 1.9.2 Ruby, having used 1.8.7 for forever (I wanted to try out Rails 3).

The BIGGEST problem I\'m having is that none of my SOAP require

相关标签:
3条回答
  • 2020-12-29 17:18

    if you are trying rails 3 update your gem file with

    gem 'soap4r', :git => 'git://github.com/felipec/soap4r.git'

    this is updated with fix.

    0 讨论(0)
  • 2020-12-29 17:20

    https://rubygems.org/gems/soap4r-ruby1.9

    gem install soap4r-ruby1.9

    This gem solved most of my soap related issues with ruby 1.9

    0 讨论(0)
  • 2020-12-29 17:31

    If you want to keep using Ruby 1.8's standard soap library (aka soap4r), you can try https://github.com/spox/soap4r-spox ...

    wget --no-check-certificate https://github.com/spox/soap4r-spox/tarball/1.5.8.4
    tar -xzf spox-soap4r-spox-1.5.8.4-0-g345a6cb.tar.gz
    cd spox-soap4r-spox-345a6cb/
    ruby setup.rb all
    

    If you're using rvm, don't sudo the last command... instead su into root and rvm to ruby 1.9 so that setup.rb puts the files into the right place.

    $ irb
    ruby-1.9.2-p0 > require 'soap/rpc/driver'
     => true 
    ruby-1.9.2-p0 > require 'xsd/qname'
     => false 
    ruby-1.9.2-p0 > require 'soap/wsdlDriver'
     => true 
    ruby-1.9.2-p0 > require 'fileutils'
     => true 
    

    As suggested by other StackOverflow answers, you might want to switch to a gem like savon.

    0 讨论(0)
提交回复
热议问题