websdotcom / constant_contact

Activeresource wrapper gem for the Constant Contact API
MIT License
23 stars 22 forks source link

NoMethodError (undefined method `collect!' for #<Net::HTTPOK 200 OK readbody=true>): #13

Open salmanaslam25 opened 12 years ago

salmanaslam25 commented 12 years ago

I am trying to fetched complete list in rails 3.0 and getting below error

NoMethodError (undefined method `collect!' for #<Net::HTTPOK 200 OK readbody=true>):

Below is code

ConstantContact::List.find (:all)

Kindly help me in this regards

jipiboily commented 12 years ago

It is just probably not Rails 3.1.0+ compatible due to inheriting AR::Base:

https://github.com/websdotcom/constant_contact/blob/master/lib/constant_contact/base.rb

You had a fix for that?

ghost commented 11 years ago

I think I have a fix.

Make sure on constant_contact.gemspec you have: s.add_dependency("activeresource", ">= 3.0") s.add_dependency("builder", "> 2.1.2")

My fork has it fixed: https://github.com/guillelopez/constant_contact

duongdn commented 11 years ago

I created an activity to bulk import but return bad request. Can you help me with this problem: Here is my code: @contacts = [] 3.times do |n| @contacts << ConstantContact::Contact.new(:first_name => "Fred#{n}",:last_name => "Test#{n}",:email_address => "email#{n}@gmail.com") end
@activity = ConstantContact::Activity.new(:activity_type => "SV_ADD") @activity.contacts = @contacts @activity.lists = [real_list]