前提・実現したいこと
herokuへのデプロイ。ウェブサイトが見えるようにすること。
herokuでRailsアプリをデプロイしたのですが、アプリのURLへ移動すると「Application error」の文字が出ていて開くことができません。
発生している問題・エラーメッセージ
herokuの指示通りにエラーログを見るとウェブサイトがクラッシュしてると出ています。
以下全文
2020-11-23T11:42:28.728823+00:00 heroku[web.1]: State changed from starting to crashed
2020-11-23T12:24:12.000000+00:00 app[api]: Build started by user sample@gmail.com
2020-11-23T12:24:34.778963+00:00 app[api]: Deploy f7cd84e2 by user sample@gmail.com
2020-11-23T12:24:34.778963+00:00 app[api]: Release v8 created by user sample@gmail.com
2020-11-23T12:24:34.978226+00:00 heroku[web.1]: State changed from crashed to starting
2020-11-23T12:24:38.000000+00:00 app[api]: Build succeeded
2020-11-23T12:24:45.936826+00:00 heroku[web.1]: Starting process with command bin/rails server -p ${PORT:-5000} -e production
2020-11-23T12:24:50.961672+00:00 app[web.1]: => Booting Puma
2020-11-23T12:24:50.961710+00:00 app[web.1]: => Rails 5.2.4.3 application starting in production
2020-11-23T12:24:50.961710+00:00 app[web.1]: => Run rails server -h
for more startup options
2020-11-23T12:24:52.618610+00:00 app[web.1]: Puma starting in single mode...
2020-11-23T12:24:52.618655+00:00 app[web.1]: * Version 3.12.6 (ruby 2.5.7-p206), codename: Llamas in Pajamas
2020-11-23T12:24:52.618656+00:00 app[web.1]: * Min threads: 5, max threads: 5
2020-11-23T12:24:52.618657+00:00 app[web.1]: * Environment: production
2020-11-23T12:24:52.618657+00:00 app[web.1]: * Daemonizing...
2020-11-23T12:24:52.699464+00:00 heroku[web.1]: Process exited with status 0
2020-11-23T12:24:52.748175+00:00 heroku[web.1]: State changed from starting to crashed
2020-11-23T12:24:52.751758+00:00 heroku[web.1]: State changed from crashed to starting
2020-11-23T12:24:56.249937+00:00 heroku[web.1]: Starting process with command bin/rails server -p ${PORT:-5000} -e production
2020-11-23T12:25:00.046479+00:00 app[web.1]: => Booting Puma
2020-11-23T12:25:00.046503+00:00 app[web.1]: => Rails 5.2.4.3 application starting in production
2020-11-23T12:25:00.046503+00:00 app[web.1]: => Run rails server -h
for more startup options
2020-11-23T12:25:01.021976+00:00 app[api]: Starting process with command rails db:migrate
by user sample@gmail.com
2020-11-23T12:25:01.241199+00:00 app[web.1]: Puma starting in single mode...
2020-11-23T12:25:01.241231+00:00 app[web.1]: * Version 3.12.6 (ruby 2.5.7-p206), codename: Llamas in Pajamas
2020-11-23T12:25:01.241232+00:00 app[web.1]: * Min threads: 5, max threads: 5
2020-11-23T12:25:01.241271+00:00 app[web.1]: * Environment: production
2020-11-23T12:25:01.241272+00:00 app[web.1]: * Daemonizing...
2020-11-23T12:25:01.310817+00:00 heroku[web.1]: Process exited with status 0
2020-11-23T12:25:01.348989+00:00 heroku[web.1]: State changed from starting to crashed
2020-11-23T12:25:05.071909+00:00 heroku[run.5191]: State changed from starting to up
2020-11-23T12:25:05.573411+00:00 heroku[run.5191]: Awaiting client
2020-11-23T12:25:05.600826+00:00 heroku[run.5191]: Starting process with command rails db:migrate
2020-11-23T12:25:12.953170+00:00 heroku[run.5191]: Process exited with status 1
2020-11-23T12:25:13.011921+00:00 heroku[run.5191]: State changed from up to complete
2020-11-23T12:51:41.040184+00:00 heroku[web.1]: State changed from crashed to starting
2020-11-23T12:51:46.041337+00:00 heroku[web.1]: Starting process with command bin/rails server -p ${PORT:-5000} -e production
2020-11-23T12:51:52.253856+00:00 app[web.1]: => Booting Puma
2020-11-23T12:51:52.253929+00:00 app[web.1]: => Rails 5.2.4.3 application starting in production
2020-11-23T12:51:52.253930+00:00 app[web.1]: => Run rails server -h
for more startup options
2020-11-23T12:51:54.099034+00:00 app[web.1]: Puma starting in single mode...
2020-11-23T12:51:54.099095+00:00 app[web.1]: * Version 3.12.6 (ruby 2.5.7-p206), codename: Llamas in Pajamas
2020-11-23T12:51:54.099445+00:00 app[web.1]: * Min threads: 5, max threads: 5
2020-11-23T12:51:54.099450+00:00 app[web.1]: * Environment: production
2020-11-23T12:51:54.099478+00:00 app[web.1]: * Daemonizing...
2020-11-23T12:51:54.196863+00:00 heroku[web.1]: Process exited with status 0
2020-11-23T12:51:54.249720+00:00 heroku[web.1]: State changed from starting to crashed
2020-11-23T12:56:37.000000+00:00 app[api]: Build started by user sample@gmail.com
2020-11-23T12:57:00.660854+00:00 app[api]: Deploy 68bd8cc3 by user sample@gmail.com
2020-11-23T12:57:00.660854+00:00 app[api]: Release v9 created by user sample@gmail.com
2020-11-23T12:57:00.965611+00:00 heroku[web.1]: State changed from crashed to starting
2020-11-23T12:57:05.000000+00:00 app[api]: Build succeeded
2020-11-23T12:57:05.404574+00:00 heroku[web.1]: Starting process with command bin/rails server -p ${PORT:-5000} -e production
2020-11-23T12:57:10.819227+00:00 app[web.1]: => Booting Puma
2020-11-23T12:57:10.820450+00:00 app[web.1]: => Rails 5.2.4.3 application starting in production
2020-11-23T12:57:10.820473+00:00 app[web.1]: => Run rails server -h
for more startup options
2020-11-23T12:57:12.523671+00:00 app[web.1]: Puma starting in single mode...
2020-11-23T12:57:12.523718+00:00 app[web.1]: * Version 3.12.6 (ruby 2.5.7-p206), codename: Llamas in Pajamas
2020-11-23T12:57:12.523719+00:00 app[web.1]: * Min threads: 5, max threads: 5
2020-11-23T12:57:12.523720+00:00 app[web.1]: * Environment: production
2020-11-23T12:57:12.523720+00:00 app[web.1]: * Daemonizing...
2020-11-23T12:57:12.608213+00:00 heroku[web.1]: Process exited with status 0
2020-11-23T12:57:12.656332+00:00 heroku[web.1]: State changed from starting to crashed
2020-11-23T12:57:13.229865+00:00 app[api]: Starting process with command rails db:migrate
by user sample@gmail.com
2020-11-23T12:57:18.457251+00:00 heroku[run.2344]: State changed from starting to up
2020-11-23T12:57:18.780785+00:00 heroku[run.2344]: Awaiting client
2020-11-23T12:57:18.824780+00:00 heroku[run.2344]: Starting process with command rails db:migrate
2020-11-23T12:57:29.929856+00:00 heroku[run.2344]: Process exited with status 0
2020-11-23T12:57:29.979214+00:00 heroku[run.2344]: State changed from up to complete
2020-11-23T12:58:31.945291+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=yumekanpo1.herokuapp.com request_id=00f0959e-c822-4088-bbee-e1251eaa91ab fwd="218.227.177.96" dyno= connect= service= status=503 bytes= protocol=https
2020-11-23T13:04:41.031396+00:00 app[api]: Starting process with command rails console
by user sample@gmail.com
2020-11-23T13:04:45.990272+00:00 heroku[run.4214]: State changed from starting to up
2020-11-23T13:04:46.253939+00:00 heroku[run.4214]: Awaiting client
2020-11-23T13:04:46.278491+00:00 heroku[run.4214]: Starting process with command rails console
2020-11-23T13:09:24.160004+00:00 heroku[run.4214]: Process exited with status 0
2020-11-23T13:09:24.199078+00:00 heroku[run.4214]: State changed from up to complete
2020-11-23T13:10:35.355463+00:00 app[api]: Starting process with command rails console
by user sample@gmail.com
2020-11-23T13:10:41.207283+00:00 heroku[run.8036]: State changed from starting to up
2020-11-23T13:10:41.518702+00:00 heroku[run.8036]: Awaiting client
2020-11-23T13:10:41.546780+00:00 heroku[run.8036]: Starting process with command rails console
2020-11-23T13:17:37.113313+00:00 heroku[web.1]: State changed from crashed to starting
2020-11-23T13:17:40.783140+00:00 heroku[web.1]: Starting process with command bin/rails server -p ${PORT:-5000} -e production
2020-11-23T13:17:44.443000+00:00 app[web.1]: => Booting Puma
2020-11-23T13:17:44.443018+00:00 app[web.1]: => Rails 5.2.4.3 application starting in production
2020-11-23T13:17:44.443018+00:00 app[web.1]: => Run rails server -h
for more startup options
2020-11-23T13:17:45.528045+00:00 app[web.1]: Puma starting in single mode...
2020-11-23T13:17:45.528091+00:00 app[web.1]: * Version 3.12.6 (ruby 2.5.7-p206), codename: Llamas in Pajamas
2020-11-23T13:17:45.528092+00:00 app[web.1]: * Min threads: 5, max threads: 5
2020-11-23T13:17:45.528093+00:00 app[web.1]: * Environment: production
2020-11-23T13:17:45.528093+00:00 app[web.1]: * Daemonizing...
2020-11-23T13:17:45.589176+00:00 heroku[web.1]: Process exited with status 0
2020-11-23T13:17:45.626258+00:00 heroku[web.1]: State changed from starting to crashed
2020-11-23T13:30:57.698481+00:00 heroku[run.8036]: Process exited with status 0
2020-11-23T13:30:57.757507+00:00 heroku[run.8036]: State changed from up to complete
2020-11-23T13:33:24.742473+00:00 app[api]: Starting process with command rails c
by user sample@gmail.com
2020-11-23T13:33:30.304564+00:00 heroku[run.6669]: State changed from starting to up
2020-11-23T13:33:30.435951+00:00 heroku[run.6669]: Awaiting client
2020-11-23T13:33:30.474413+00:00 heroku[run.6669]: Starting process with command rails c
2020-11-23T13:36:06.037039+00:00 heroku[run.6669]: Process exited with status 0
2020-11-23T13:36:06.085573+00:00 heroku[run.6669]: State changed from up to complete
エラーメッセージ 2020-11-23T12:58:31.945291+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=yumekanpo1.herokuapp.com request_id=00f0959e-c822-4088-bbee-e1251eaa91ab fwd="218.227.177.96" dyno= connect= service= status=503 bytes= protocol=https```
### 試したこと 調べて見るとheroku run rails c で詳しいエラーが出るとありましたが、出てくるのはコンソールの入力待ち画面でした。またデータベースの設定が間違えているという情報にも当たりましたが https://qiita.com/kazukimatsumoto/items/a0daa7281a3948701c39 こちらをコピペしてやっているので間違いはないのかなと思います。 初学者で色々足らないことがあると思いますがよろしくお願いします。 ### 補足情報(FW/ツールのバージョンなど) ruby 2.3.7 rails 5.2.4.4
あなたの回答
tips
プレビュー