簡體   English   中英

spree_chimpy:merge_vars:同步耙中止

[英]spree_chimpy:merge_vars:sync rake aborted

我安裝了寶石spree_chimpyhttps://github.com/watg/spree_chimpy在我的Ruby on Rails應用程序與大禮包 完成mailchimp設置后,我會通知mailchimp關於merge_vars ,這似乎會導致錯誤。 當我運行命令

rake spree_chimpy:merge_vars:sync --trace

我得到的錯誤"tag" must be 10 bytes and may only contain "AZ 0-9 _ 。我不理解該錯誤,我在配置中無處添加任何tag變量。作為參考,我的config/initializers/spree_chimpy.rb粘貼在這里:

    Spree::Chimpy.config do |config|
  # your API key as provided by MailChimp
  config.key = '<#my-api-hash-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 = 'test'

  # Allow users to be subscribed by default. Defaults to false
  # If you enable this option, it's strongly advised that your enable
  # double_opt_in as well. Abusing this may cause Mailchimp to suspend your account.
  # config.subscribed_by_default = false

  # When double-opt is enabled, the user will receive an email
  # asking to confirm their subscription. Defaults to false
  config.double_opt_in = false

  # id of your store. max 10 letters. defaults to "spree"
  # config.store_id = 'acme'

  # 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.
  # default is {'EMAIL' => :email}
  config.merge_vars = {
    'EMAIL'       => :email,
    'FNAME'       => :fname,
    'LNAME'       => :lname,
    'ORDERNUMBER' => :onumber
  }
end

該錯誤是從這里附近的某個地方拋出的:

https://github.com/watg/spree_chimpy/blob/7ba5d855112050e1b61c2d0a3369bc08f254842d/lib/spree_chimpy.rb#L59-L62

實際錯誤在mailchimp API客戶端內。 您收到錯誤消息是因為ORDERNUMBER中包含11個字符。 如果將其縮減為10個字符,則可以。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM