Search code examples
ruby-on-railsmailchimpgibbon

Why does gibbon throw 'uninitialized constant Gibbon::API (NameError)'


I'm trying to add the gibbon gem into a Rails 3.2 app.

I've followed the instructions, and set up a gibbon.rb initializer with the following

Gibbon::API.api_key = ENV["MAILCHIMP_API_KEY"]
Gibbon::API.timeout = 15
Gibbon::API.throws_exceptions = false

The app is throwing

uninitialized constant Gibbon::API (NameError)

I've tried to require 'gibbon' amongst other things, but nothing seems to work.

Why is the class not initialized?


Solution

  • Turns out I was using the wrong version of the gem.

    Github sports a shiney new version 0.5, while rubygems is still on v. 0.4.

    Installing from git: 'git://github.com/amro/gibbon.git' solved everything!

    facepalm!