gibbon

Rails Mailchimp Background Job Not Implemented Error

南笙酒味 提交于 2019-12-13 08:27:38
问题 So I'd like to add a user that registers on my rails site onto a mailing list. I've got the gibbon gem installed and I had success testing my ruby method in a stand-alone ruby file. I'm having issues integrating it into my application, however. The error I receive in my rails logs is ERROR -- : NotImplementedError (NotImplementedError) Here's my approach, which I tried to follow from this blog post: http://aspiringwebdev.com/mailchimp-and-active-job-on-rails-4-adding-users-to-your-mailing

Testing Mailchimp 3.0 and Gibbon 2.x with Rspec

若如初见. 提交于 2019-12-10 15:43:31
问题 I have a rails 4.2 app that has a newsletter signup via MailChimp using the Gibbon gem. Here is my initializer: Gibbon::Request.api_key = ENV['MAILCHIMP_API_KEY'] Gibbon::Request.timeout = 15 Gibbon::Request.throws_exceptions = false Here are the relevant methods in user.rb: # returns the mailchimp member if one exists for @user.email def mailchimp_user gb = Gibbon::Request.new(api_key: ENV['MAILCHIMP_API_KEY']) gb.lists(ENV['MAILCHIMP_LIST_ID']).members(Digest::MD5.hexdigest("#{self.email

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

↘锁芯ラ 提交于 2019-12-10 13:58:58
问题 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? 回答1: Turns out I was using the wrong version of the gem. Github