我正在安裝gem spree_chimpy
從https://github.com/watg/spree_chimpy
到我的Ruby on Rails應用程序spree。在做了mailchimp設置之後,我正在通知關於merge_vars
的mailchimp,這似乎會導致錯誤。當我運行命令spree_chimpy:merge_vars:sync rake aborted
rake spree_chimpy:merge_vars:sync --trace
我得到錯誤"tag" must be 10 bytes and may only contain "A-Z 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