martingordon / bronto-ruby

A Ruby wrapper for the Bronto SOAP API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

undefined method `evaluate' for Bronto::Contact:Class

darynl opened this issue · comments

Perhaps I'm calling it wrong, but I just followed your instructions on the readme. I am using Savon 1.2.0.

NoMethodError: undefined method `evaluate' for Bronto::Contact:Class
    from /Users/dlam/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/client.rb:147:in `rescue in method_missing'
    from /Users/dlam/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/client.rb:145:in `method_missing'
    from /Users/dlam/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/bronto-0.1.0/lib/bronto/base.rb:35:in `block in request'
    from /Users/dlam/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/client.rb:154:in `instance_eval'
    from /Users/dlam/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/client.rb:154:in `evaluate'
    from /Users/dlam/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/client.rb:122:in `process'
    from /Users/dlam/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/client.rb:84:in `block in request'
    from /Users/dlam/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in `call'
    from /Users/dlam/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in `request'
    from /Users/dlam/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/savon-1.2.0/lib/savon/client.rb:86:in `request'
    from /Users/dlam/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/bronto-0.1.0/lib/bronto/base.rb:33:in `request'
    from /Users/dlam/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/bronto-0.1.0/lib/bronto/contact.rb:28:in `save'
    from (irb):20

I am getting this as well, any fix?

Going to be updating this gem in the coming weeks, but if someone wants to generate a pull request in the interim, I'm happy to merge it in.

I am also getting this error (Ruby 2.0.0) using Savon 1.2.0. If I were to guess I would say that Savon updated their Gem to remove some functionality that this Gem is depending on. I looked through the history of this Gem and that 'evaluate' line has been in the code for most of the past 2 years. I have no idea what version of Savon was the working version though because the gemspec file doesn't require a specific version. :(

I just submitted a PR (#8) that might solve the problem.

@rnhurt it looks like Savon 1.x does not support Ruby 2. http://savonrb.com/version1/

Although, I can confirm this is happening for me in 1.9.3 too.

I can also confirm this issue is resolved on master. Probably time for a version bump out to Rubygems?

I just pushed a new version (0.1.3) to Rubygems.