The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Rails gem

Highlighted
Visitor

Rails gem

Hi,

 

I've installed the Rails gem https://github.com/wishery/constant_contact and created a model, but when I go to the console and try to work with the ConstantContent model, I get the error:

 

LoadError: Expected <file path>/gems/whenever-0.3.7/lib/base.rb to define Base

 

This is my constant_contact.rb:

 

class ConstantContact < ActiveRecord::Base
  ConstantContact::Base.user = '***'
  ConstantContact::Base.api_key = '***'
  ConstantContact::Base.password = '***'
 
  # Contact not found. Create it.
  begin
    @constant_contact = ConstantContact::Contact.new(
      :email_address => "me@example.com"
    )
    @constant_contact.save
  rescue ActiveResource::ResourceConflict => e
    # contact already exists
    puts 'Contact already exists. Saving contact failed.'
    puts e
  end
end

 

Any help is appreciated!

3 REPLIES 3
Highlighted
Trusted Contributor

Re: Rails gem

Hi,

 

The Rails gem you're using was developed by a third party, whom you should contact directly for support in resolving errors. This library is several steps revised from the original developed by Github user timcase. Because this originated from a library developed three years ago, and we do not track updates to third-party libraries, there may be some deprecated functionality or code lingering in the library.  At this time, we don't offer any Constant Contact Ruby/Rails libraries that we can directly support.

 

The error you indicate appears to indicate a problem with your Ruby or Rails setup/configuration, so you may want to seek assistance through the Rails Developer communities.

 

I hope this points you in the right direction to get things rolling.

 

Cheers,

Mark Coleman
Support Engineer
Highlighted
Visitor

Re: Rails gem

Thanks, Marc, I am trying to get an aswer through those avenues.  I just thought I'd try here as well.

Highlighted
Trusted Contributor

Re: Rails gem

I understand.  It is definitely worth a try.  Perhaps one of our third-party developers with direct expeirence using the same or a one of the earlier forks of that wrapper and similar Ruby/Rails setup error will see your request. I'll put out some feelers internally and as I have some time will also research the error myself and post back if I find something that may be useful. 

Mark Coleman
Support Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured