Gibbon::MailChimpError (the server responded with status 400 @title="Invalid Resource"
<p>I am trying to use gibbon gem and following their github docs. Here is the code I have</p>

<pre><code>class ChimpController &lt; ApplicationController
  def create
    send_to_mail_chimp ( params[:email])
  end

  def send_to_mail_chimp(email)
    puts "send email is #{email}"
    gibbon = Gibbon::Request.new(api_key: "bla")
    gibbon.timeout = 10
    gibbon.lists('e61cf2454d').members.create(body: {email_address: email, status: "subscribed"})
  end
end
</code></pre>

<p><br></p>

<p><code>&lt;%= simple_form_for :email, url: newsletter_path, :method =&gt; :post do |f| %&gt;
&lt;%= f.input :email, input_html: {class: 'form-control', placeholder: 'enter email'} %&gt;
&lt;% end %&gt;</code></p>

<p>The exact error message is</p>

<pre><code>Gibbon::MailChimpError (the server responded with status 400 @title="Invalid Resource", @detail="The resource submitted could not be validated. For field-specific details, see the 'errors' array.", @body={"type"=&gt;"http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/", "title"=&gt;"Invalid Resource", "status"=&gt;400, "detail"=&gt;"The resource submitted could not be validated. For field-specific details, see the 'errors' array.", "instance"=&gt;"", "errors"=&gt;[{"field"=&gt;"email_address", "message"=&gt;"Schema describes string, object found instead"}]}, @raw_body="{\"type\":\"http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/\",\"title\":\"Invalid Resource\",\"status\":400,\"detail\":\"The resource submitted could not be validated. For field-specific details, see the 'errors' array.\",\"instance\":\"\",\"errors\":[{\"field\":\"email_address\",\"message\":\"Schema describes string, object found instead\"}]}", @status_code=400):
  app/controllers/chimp_controller.rb:10:in `send_to_mail_chimp'
  app/controllers/chimp_controller.rb:3:in `create'
</code></pre>