DynamoMTL / spree_chimpy

Spree/MailChimp Integration
BSD 3-Clause "New" or "Revised" License
35 stars 123 forks source link

Unable to run merge_vars:sync rake task #65

Closed Ionut-Milas closed 7 years ago

Ionut-Milas commented 8 years ago

When running the rake task : _rake spree_chimpy:mergevars:sync the following error is raised: /home/andreea/.rvm/gems/ruby-2.1.4/bundler/gems/mailchimp-bac6563673e8/lib/spree_chimpy.rb:25:in configured?': Use RbConfig instead of obsolete and deprecated Config. /home/andreea/.rvm/gems/ruby-2.1.4/bundler/gems/mailchimp-bac6563673e8/lib/spree_chimpy.rb:25:inconfigured?': Use RbConfig instead of obsolete and deprecated Config. rake aborted! NoMethodError: undefined method key' for RbConfig:Module /home/andreea/.rvm/gems/ruby-2.1.4/bundler/gems/mailchimp-bac6563673e8/lib/spree_chimpy.rb:25:inconfigured?' /home/andreea/.rvm/gems/ruby-2.1.4/bundler/gems/mailchimp-bac6563673e8/lib/spree_chimpy.rb:41:in list' /home/andreea/.rvm/gems/ruby-2.1.4/bundler/gems/mailchimp-bac6563673e8/lib/spree_chimpy.rb:61:insync_merge_vars' /home/andreea/.rvm/gems/ruby-2.1.4/bundler/gems/mailchimp-bac6563673e8/lib/tasks/spree_chimpy.rake:5:in block (3 levels) in <top (required)>' /home/andreea/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:ineval' /home/andreea/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `

' Tasks: TOP => spree_chimpy:merge_vars:sync

This is the spree_chimpy.rb initializer:

Spree::Chimpy.config do |config|

your API key as provided by MailChimp

config.key = 'api-key'

extra api options for the Mailchimp gem

config.api_options = { throws_exceptions: false, timeout: 3600 }

name of your list, defaults to "Members"

config.list_name = 'Clienti'

define a list of merge vars:

- key: a unique name that mail chimp uses. 10 letters max

- value: the name of any method on the user class.

make sure to avoid any of these reserved field names:

http://kb.mailchimp.com/article/i-got-a-message-saying-that-my-list-field-name-is-reserved-and-cant-be-used

default is {'EMAIL' => :email}

config.merge_vars = { 'EMAIL' => :email, 'FIRSTNAME' => :first_name, 'LASTNAME' => :last_name } end

\ Spree-Chimpy version: 3-stable ** Could you provide some details on what might be missing?

artempankov commented 8 years ago

same issue, any updates?

im-fortech commented 8 years ago

No updates ... :(

braidn commented 8 years ago

Hey all! Sorry I missed this. @artempankov and @Ionut-Milas do you all mind running this with list_id and the list id over the list name? Sorry again for missing the issue.

im-fortech commented 8 years ago

@braidn can't really follow ... I should put the list_id as well ?

braidn commented 8 years ago

@Ionut-Milas the list name is really a vestige of the older way we were looking up people's lists. Can you remove the list name entirely and add the list_id?

im-fortech commented 8 years ago

I tried with the List id .. but no luck ...

braidn commented 8 years ago

@Ionut-Milas Will look into it. Thanks!

braidn commented 8 years ago

@Ionut-Milas what version of spree are you using? Assuming 3.x but just checking.

Ionut-Milas commented 8 years ago

Yep 3.0

On Dec 23, 2015, 10:31 PM, at 10:31 PM, Braden Douglass notifications@github.com wrote:

@Ionut-Milas what version of spree are you using? Assuming 3.x but just checking.


Reply to this email directly or view it on GitHub: https://github.com/DynamoMTL/spree_chimpy/issues/65#issuecomment-166985130

Ionut-Milas commented 8 years ago

Also the website is on https don't know if it changes anything....

On Dec 23, 2015, 10:31 PM, at 10:31 PM, Braden Douglass notifications@github.com wrote:

@Ionut-Milas what version of spree are you using? Assuming 3.x but just checking.


Reply to this email directly or view it on GitHub: https://github.com/DynamoMTL/spree_chimpy/issues/65#issuecomment-166985130

braidn commented 8 years ago

It does not. Have not forgotten about this all. Hopefull get to it soon.

joshnuss commented 8 years ago

I remember seeing this before, try bundle exec rake ..., that might fix it

braidn commented 8 years ago

@GraphicDesk did running bundle exec here help out the situation? Still having a lot of issues trying to recreate the issue originally described.

Ionut-Milas commented 8 years ago

RAILS_ENV=production bundle exec rake spree_chimpy:merge_vars:sync rake aborted! NameError: uninitialized constant Spree::Chimpy::Config /usr/local/rvm/gems/ruby-2.2.0/bundler/gems/mailchimp-bac6563673e8/lib/spree_chimpy.rb:25:in configured?' /usr/local/rvm/gems/ruby-2.2.0/bundler/gems/mailchimp-bac6563673e8/lib/spree_chimpy.rb:41:inlist' /usr/local/rvm/gems/ruby-2.2.0/bundler/gems/mailchimp-bac6563673e8/lib/spree_chimpy.rb:61:in sync_merge_vars' /usr/local/rvm/gems/ruby-2.2.0/bundler/gems/mailchimp-bac6563673e8/lib/tasks/spree_chimpy.rake:5:inblock (3 levels) in <top (required)>' Tasks: TOP => spree_chimpy:merge_vars:sync (See full trace by running task with --trace)

Ionut-Milas commented 8 years ago

I am on Centos... don't know if that affects ...

Ionut-Milas commented 8 years ago

seems to be working now....

samar-mishra commented 8 years ago

I am also getting the error while executing the below command, can any body help me on this.

bundle exec rake spree_chimpy:merge_vars:sync /Users/Topform/.rvm/gems/ruby-2.1.4@skinnymint/bundler/gems/spree_chimpy-af8a138e4678/lib/spree_chimpy.rb:25:in configured?': Use RbConfig instead of obsolete and deprecated Config. /Users/Topform/.rvm/gems/ruby-2.1.4@skinnymint/bundler/gems/spree_chimpy-af8a138e4678/lib/spree_chimpy.rb:25:inconfigured?': Use RbConfig instead of obsolete and deprecated Config. rake aborted! NoMethodError: undefined method key' for RbConfig:Module /Users/Topform/.rvm/gems/ruby-2.1.4@skinnymint/bundler/gems/spree_chimpy-af8a138e4678/lib/spree_chimpy.rb:25:inconfigured?' /Users/Topform/.rvm/gems/ruby-2.1.4@skinnymint/bundler/gems/spree_chimpy-af8a138e4678/lib/spree_chimpy.rb:41:in list' /Users/Topform/.rvm/gems/ruby-2.1.4@skinnymint/bundler/gems/spree_chimpy-af8a138e4678/lib/spree_chimpy.rb:61:insync_merge_vars' /Users/Topform/.rvm/gems/ruby-2.1.4@skinnymint/bundler/gems/spree_chimpy-af8a138e4678/lib/tasks/spree_chimpy.rake:5:in `block (3 levels) in <top (required)>' Tasks: TOP => spree_chimpy:merge_vars:sync (See full trace by running task with --trace)

braidn commented 8 years ago

Will look into it for yah!

samar-mishra commented 8 years ago

Can you please suggest me what is the error and how to fix these errors.

MOOn2k commented 8 years ago

Same error for me.

braidn commented 8 years ago

Will try and check this out for you all. Ultimately we need to go to the new Mailchimp API. @MOOn2k and @samar-mishra are you using Spree 3.0 and above or?

MOOn2k commented 8 years ago

v2.3.10

braidn commented 8 years ago

Hey @MOOn2k and @samar-mishra what ruby manager are you using? Also are you using the path flag with bundler when installing or are you installing globally?

braidn commented 7 years ago

@MOOn2k and @samar-mishra if this is still an issue would it be ok to start a new, fresh issue? Thanks for being awesome.