为什么gibbon抛出“未初始化的常量Gibbon :: API(NameError)" [英] Why does gibbon throw 'uninitialized constant Gibbon::API (NameError)'
本文介绍了为什么gibbon抛出“未初始化的常量Gibbon :: API(NameError)"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将长臂猿添加到Rails 3.2应用中.
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
该应用正在抛出
uninitialized constant Gibbon::API (NameError)
除了其他方面,我还尝试过require 'gibbon'
,但似乎没有任何作用.
I've tried to require 'gibbon'
amongst other things, but nothing seems to work.
为什么类没有初始化?
推荐答案
原来我使用的是错误版本的gem.
Turns out I was using the wrong version of the gem.
Github拥有一个闪亮的新版本0.5,而rubygems仍在0.4版中.
Github sports a shiney new version 0.5, while rubygems is still on v. 0.4.
从git: 'git://github.com/amro/gibbon.git'
安装可以解决所有问题!
Installing from git: 'git://github.com/amro/gibbon.git'
solved everything!
facepalm!
这篇关于为什么gibbon抛出“未初始化的常量Gibbon :: API(NameError)"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文