version 3.0.5 fails with Ruby 2.0p0 #55

mariochavez opened this Issue Mar 3, 2013 · 8 comments

5 participants


This same works with Ruby 1.9.3p392

irb(main):004:0> hominid.lists                                                     
    RuntimeError: Wrong size. Was 6877, should be 662
from /Users/marioch/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/xmlrpc/client.rb:506:in `do_rpc'
from /Users/marioch/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/xmlrpc/client.rb:281:in `call2'
from /Users/marioch/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/xmlrpc/client.rb:262:in `call'
from /Users/marioch/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/hominid-3.0.5/lib/hominid/api.rb:32:in `method_missing'
from (irb):4
from /Users/marioch/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/railties-3.2.12/lib/rails/commands/console.rb:47:in `start'
from /Users/marioch/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/railties-3.2.12/lib/rails/commands/console.rb:8:in `start'
from /Users/marioch/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/railties-3.2.12/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

I have a somehow similar problem when subscribing to a list. While the subscription is successfully done, the problem seems not to be directly related with hominid but rather the xmlrpc client implementation not processing the mailchimp response properly.

The content length in the mailchimp response header is not equal to the response body data length and bytesize, respectively. Maybe this is due to the default encoding changes in Rails 2.0.0.


I did file this issue in the Ruby issue tracker at:

As a workaround one could explicitly set the encoding header to 'identity' right after creating the XMLRPC client:
server ='', '/', 80)
server.http_header_extra = {'accept-encoding' => 'identity'}

Tatemae Consultancy member

A great option here is to transition to the official Mailchimp gem, which uses version 2.0 (the latest as of right now) of the API. It also does not use XMLRPC.

@bgetting bgetting closed this Sep 6, 2013
@HendrikRoth HendrikRoth referenced this issue in jcnnghm/devise_mailchimp Nov 20, 2013

Wrong size #15


Could this issue be reopened?

The fix looks very simple: just cherry-pick descl@582bb02.

I had this very same issue on my project and migrating to @descl repo fixed that.

Tatemae Consultancy member

The hominid gem is no longer a viable option for connecting to Mailchimp. The version of the API that it connects to is deprecated. It does not support concurrency. We recommend using the mailchimp-api gem, which is now the official Ruby gem for connecting to the Mailchimp API.


Thanks for the response!

Maybe putting this deprecation warning on the header of the README?

I got a project and was not familiar with mailchimp before, so I didn't know it was so outdated, it would be cool if people in the same situation could be warned about this.



Actually, just took a better look and saw the warning... Maybe changing it to a heading and also noticing that it won't be maintained anymore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment