我不知道为什么我无法在我的heroku服务器上设置我的gmail env变量。我跑,并设置容易根据to their docs的用户名,通过运行zsh heroku和Env变量
heroku config:add [email protected]
但是,现在当我尝试设置密码与此一起去为我所用的邮件
heroku config:add GMAIL_PASSWORD=mypassword
我m到处错误
zsh: no matches found: GMAIL_PASSWORD=mypassword
我不知道为什么我不能设置此变量以这种方式要少得多,为什么我碰到我的壳这个输出。
关于这部分设置的一些事情。
- 使用loca_env.yml
的邮件用户名和密码,被检查到.gitignore
(因此在Heroku服务器上设置此。)
寄件人initializer-
ActionMailer::Base.smtp_settings = {
:enable_starttls_auto => true,
:address => "smtp.gmail.com",
:port => "587",
:domain => "gmail.com",
:authentication => :plain,
:user_name => ENV["GMAIL_USERNAME"],
:password => ENV["GMAIL_PASSWORD"]
}
ActionMailer::Base.default_url_options[:host] = "myapp.herokuapp.com"
它精细的邮件在本地,现在我试图在产品设置中进行测试,而无需在版本控制中检入local_env.yml
。简单的事我不明白?