mhenrixon/active_campaign

undefined method for ActiveCampaign:Module

Closed this issue · 1 comments

I just can't get this gem to work. I've followed the setup instructions but when I try ActiveCampaign.list_list ids: 'all' I just get undefined method 'list_list' for ActiveCampaign:Module. I've looked at the module's source code and see that method_missing is meant to create the client object and invoke the method on it, but that doesn't seem to be happening.

I'm using active_campaign version 0.1.13 and Ruby 2.2.1. Thanks.

I have the same problem. It only works when I initialise it that way:

    client = ::ActiveCampaign::Client.new(
      api_endpoint: ENV['ACTIVE_CAMPAIGN_ENDPOINT'],
      api_key:      ENV['ACTIVE_CAMPAIGN_KEY']
    )
    client.contact_tag_add(email: params[:ac_email],tags: params[:ac_tag])