2015-01-12 56 views
1

嗨,我已經完成了以下從heroku tutorialheroku config:push不添加環境變量

heroku plugins:install git://github.com/ddollar/heroku-config.git 
heroku config:push --overwrite 

.env文件在項目目錄的根目錄

GOOGLE_RETURN_URL = http://example.herokuapp.com/auth/google/return 
GOOGLE_REALM = http://example.herokuapp.com/ 

我還設置了--overwrite標誌作爲this answer suggested

然而,當我贊同我的heroku config它仍然是空的!

回答

1

問題是您的.env文件中的空格。刪除「=」兩側的空格,插件將工作。

變化:

GOOGLE_RETURN_URL = http://example.herokuapp.com/auth/google/return 
GOOGLE_REALM = http://example.herokuapp.com/ 

要:

GOOGLE_RETURN_URL=http://example.herokuapp.com/auth/google/return 
GOOGLE_REALM=http://example.herokuapp.com/ 
+0

值得一提的是'bash'不會讓你這樣做可以: '$ FOO = 「酒吧」 慶典:FOO :找不到命令' –