2017-08-16 56 views
0

我最近將我的Rails應用程序數據庫從sqlite3更改爲postgresql。該應用程序在C9上的開發工作正常,但我遇到Heroku生產問題。在Heroku上,索引頁實際顯示,但導航到註冊頁面或嘗試登錄會在頁面上產生此錯誤:Rails應用程序在Heroku Production中不起作用

很抱歉,發生了問題。 如果您是應用程序所有者,請檢查日誌以獲取更多信息。

我已經做了一些搜索,發現我應該運行$ heroku run rails db:migrate爲了我的應用程序工作。但是,在嘗試遷移時,我被告知需要啓動服務器。運行$ rails s並嘗試遷移後,我在終端出現此錯誤:

無法運行超過1個自由大小的dynos。

我已經嘗試heroku ps:stop workerheroku ps:stop <DYNO>,但無論是在終端返回此錯誤:

期望的迴應是成功的,得到了​​400

編輯:有錯誤日誌中我得到的時候導航到註冊頁面:

2017-08-16T01:17:58.770873+00:00 heroku[router]: at=error code=H14 desc="No 
web processes running" method=GET path="/" host=operation-give- 
back.herokuapp.com request_id=484539c6-91dd-42da-863c-e293f008d2c1 
fwd="75.171.228.74" dyno= connect= service= status=503 bytes= protocol=https 
2017-08-16T01:18:00.108900+00:00 heroku[router]: at=error code=H14 desc="No 
web processes running" method=GET path="/" host=operation-give- 
back.herokuapp.com request_id=de8eff7f-4e1c-4fe0-8a99-ba731109d8de 
fwd="75.171.228.74" dyno= connect= service= status=503 bytes= protocol=https 
2017-08-16T01:18:00.206753+00:00 heroku[router]: at=error code=H14 desc="No 
web processes running" method=GET path="/favicon.ico" host=operation-give- 
back.herokuapp.com request_id=a6d18caf-0c2e-44bb-aa09-cf4c0141054d 
fwd="75.171.228.74" dyno= connect= service= status=503 bytes= protocol=https 
2017-08-16T01:18:01.101111+00:00 heroku[router]: at=error code=H14 desc="No 
web processes running" method=GET path="/favicon.ico" host=operation-give- 
back.herokuapp.com request_id=c71d4340-17d7-4bcf-b50d-20aeee5494d4 
fwd="75.171.228.74" dyno= connect= service= status=503 bytes= protocol=https 
2017-08-16T01:18:01.002590+00:00 heroku[router]: at=error code=H14 desc="No 
web processes running" method=GET path="/" host=operation-give- 
back.herokuapp.com request_id=343a0a5f-b000-4199-80f2-1bb2248963e0 
fwd="75.171.228.74" dyno= connect= service= status=503 bytes= protocol=https 
2017-08-16T01:18:01.928432+00:00 heroku[router]: at=error code=H14 desc="No 
web processes running" method=GET path="/" host=operation-give- 
back.herokuapp.com request_id=4d62b417-c284-42f6-a43c-ec6c77335855 
fwd="75.171.228.74" dyno= connect= service= status=503 bytes= protocol=https 
2017-08-16T01:18:02.050002+00:00 heroku[router]: at=error code=H14 desc="No 
web processes running" method=GET path="/favicon.ico" host=operation-give- 
back.herokuapp.com request_id=7c18d099-cd2e-454e-b079-bc19bf58fb30 
fwd="75.171.228.74" dyno= connect= service= status=503 bytes= protocol=https 

有誰知道如何解決這個問題?提前致謝!

注:我使用的Rails 5

+0

@RockwellRice我已經添加了一些日誌,但我不確定這些是否是錯誤。 – Wallie

+0

不,這些都不是錯誤,是否有任何部分可能會從您的頁面看到一些代碼。你也運行「heroku運行rake db:migrate」正確嗎?你根本不需要做任何rails服務器來運行這個命令。 –

+0

@RockwellRice我添加了一組不同的舊日誌(這些日誌實際上是在說「錯誤」)。除了這些,最近沒有任何顯示錯誤。 – Wallie

回答

相關問題