Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 268
Andy Harvey Avatar asked Jun 21 '13 05:06

Andy Harvey


1 Answers

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!

like image 136
Andy Harvey Avatar answered Oct 13 '22 00:10

Andy Harvey