2016-04-23 116 views
0

好吧,我剛剛完成了第10章,並希望在測試「忘記密碼」邏輯時看到從生產到我的gmail帳戶的電子郵件。production.rb未被推送到heroku

它沒有工作。我知道爲什麼,但我不確定兩個版本的production.rb如何不同步。

現在我對sample_app的(主)分支,當我試圖把我得到這些消息......

abundantmind:~/workspace/sample_app (master) $ git push 
Everything up-to-date 
abundantmind:~/workspace/sample_app (master) $ git push heroku 
Everything up-to-date 
abundantmind:~/workspace/sample_app (master) $ 

這讓我困惑,因爲在生產相關的行.RB文件看起來像這樣...

# Ignore bad email addresses and do not raise email delivery errors. 
# Set this to true and configure the email server for immediate delivery to raise delivery errors. 
config.action_mailer.raise_delivery_errors = true 
config.action_mailer.delivery_method = :smtp 
# host = '<your heroku app>.herokuapp.com' 
host = 'serene-dusk-31281.herokuapp.com' 
config.action_mailer.default_url_options = { host: host } 
ActionMailer::Base.smtp_settings = { 

而且在Heroku上,production.rb同款看起來像這樣...

# Ignore bad email addresses and do not raise email delivery errors. 
# Set this to true and configure the email server for immediate delivery to raise delivery errors. 
# config.action_mailer.raise_delivery_errors = false 

# Enable locale fallbacks for I18n (makes lookups for any locale fall back to 

現在我的問題...

1)爲什麼git告訴我一切都同步時,它顯然不是?

(其實,我敢肯定的git不會說謊,所以我接受,這個問題是鍵盤和椅子之間)

2)什麼是推只是最簡單的方法production.rb直到heroku(和bitbucket),以便我可以繼續第12章?

回答

0

你把你的分支合併到主了嗎? 如果不運行這個

$ git merge account-activation-password-reset

首先做新上推提交無論你正在使用

$ git push origin master 

然後嘗試在Heroku上重新部署應用程序並遷移它在GitHub上或到位桶中的所有文件再次。

$ git push heroku 
$ heroku run rake db:migrate