前提・実現したいこと
現在rails tutorial 12章を進めています。
Herokuにデプロイしたところで、Application error がでました。
さまざまなサイトを見てみましたが、解決策がわかりませんでした。。。
ご教示いただけると幸いです。
実行
$heroku open
で表示されるURLにheroku logs --tailと表示されていましたので、
heroku logs --tailを実行しました。
該当のソースコード
heroku logs --tail › Warning: heroku update available from 7.51.0 to › 7.52.0. 2021-04-25T03:28:54.000000+00:00 app[api]: Build started by user bbyuue0323@gmail.com 2021-04-25T03:30:11.438500+00:00 app[api]: Release v20 created by user bbyuue0323@gmail.com 2021-04-25T03:30:11.438500+00:00 app[api]: Deploy 5ce2b4dd by user bbyuue0323@gmail.com 2021-04-25T03:30:12.335716+00:00 heroku[web.1]: State changed from crashed to starting 2021-04-25T03:30:19.000000+00:00 app[api]: Build succeeded 2021-04-25T03:30:19.869035+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb` 2021-04-25T03:30:22.014756+00:00 app[web.1]: [4] Puma starting in cluster mode... 2021-04-25T03:30:22.014775+00:00 app[web.1]: [4] * Version 4.3.6 (ruby 2.6.6-p146), codename: Mysterious Traveller 2021-04-25T03:30:22.014775+00:00 app[web.1]: [4] * Min threads: 5, max threads: 5 2021-04-25T03:30:22.014778+00:00 app[web.1]: [4] * Environment: production 2021-04-25T03:30:22.014810+00:00 app[web.1]: [4] * Process workers: 2 2021-04-25T03:30:22.014810+00:00 app[web.1]: [4] * Preloading application 2021-04-25T03:30:26.585798+00:00 app[web.1]: [4] * Listening on tcp://0.0.0.0:45106 2021-04-25T03:30:26.586068+00:00 app[web.1]: bundler: failed to load command: puma (/app/vendor/bundle/ruby/2.6.0/bin/puma) 2021-04-25T03:30:26.586094+00:00 app[web.1]: Errno::EADDRINUSE: Address already in use - bind(2) for "0.0.0.0" port 45106 2021-04-25T03:30:26.586095+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/binder.rb:229:in `initialize' 2021-04-25T03:30:26.586095+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/binder.rb:229:in `new' 2021-04-25T03:30:26.586096+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/binder.rb:229:in `add_tcp_listener' 2021-04-25T03:30:26.586096+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/binder.rb:106:in `block in parse' 2021-04-25T03:30:26.586097+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/binder.rb:90:in `each' 2021-04-25T03:30:26.586097+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/binder.rb:90:in `parse' 2021-04-25T03:30:26.586097+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/runner.rb:161:in `load_and_bind' 2021-04-25T03:30:26.586097+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/cluster.rb:413:in `run' 2021-04-25T03:30:26.586098+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/launcher.rb:172:in `run' 2021-04-25T03:30:26.586098+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/cli.rb:80:in `run' 2021-04-25T03:30:26.586098+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/bin/puma:10:in `<top (required)>' 2021-04-25T03:30:26.586100+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/bin/puma:23:in `load' 2021-04-25T03:30:26.586100+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/bin/puma:23:in `<top (required)>' 2021-04-25T03:30:26.650899+00:00 heroku[web.1]: Process exited with status 1 2021-04-25T03:30:26.710290+00:00 heroku[web.1]: State changed from starting to crashed 2021-04-25T03:30:26.713075+00:00 heroku[web.1]: State changed from crashed to starting 2021-04-25T03:30:34.221861+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb` 2021-04-25T03:30:36.590279+00:00 app[web.1]: [4] Puma starting in cluster mode... 2021-04-25T03:30:36.590357+00:00 app[web.1]: [4] * Version 4.3.6 (ruby 2.6.6-p146), codename: Mysterious Traveller 2021-04-25T03:30:36.590358+00:00 app[web.1]: [4] * Min threads: 5, max threads: 5 2021-04-25T03:30:36.590366+00:00 app[web.1]: [4] * Environment: production 2021-04-25T03:30:36.590366+00:00 app[web.1]: [4] * Process workers: 2 2021-04-25T03:30:36.590366+00:00 app[web.1]: [4] * Preloading application 2021-04-25T03:30:42.454546+00:00 app[web.1]: [4] * Listening on tcp://0.0.0.0:59130 2021-04-25T03:30:42.454836+00:00 app[web.1]: bundler: failed to load command: puma (/app/vendor/bundle/ruby/2.6.0/bin/puma) 2021-04-25T03:30:42.454882+00:00 app[web.1]: Errno::EADDRINUSE: Address already in use - bind(2) for "0.0.0.0" port 59130 2021-04-25T03:30:42.454883+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/binder.rb:229:in `initialize' 2021-04-25T03:30:42.454884+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/binder.rb:229:in `new' 2021-04-25T03:30:42.454884+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/binder.rb:229:in `add_tcp_listener' 2021-04-25T03:30:42.454884+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/binder.rb:106:in `block in parse' 2021-04-25T03:30:42.454884+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/binder.rb:90:in `each' 2021-04-25T03:30:42.454885+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/binder.rb:90:in `parse' 2021-04-25T03:30:42.454885+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/runner.rb:161:in `load_and_bind' 2021-04-25T03:30:42.454885+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/cluster.rb:413:in `run' 2021-04-25T03:30:42.454886+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/launcher.rb:172:in `run' 2021-04-25T03:30:42.454886+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/lib/puma/cli.rb:80:in `run' 2021-04-25T03:30:42.454886+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/gems/puma-4.3.6/bin/puma:10:in `<top (required)>' 2021-04-25T03:30:42.454887+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/bin/puma:23:in `load' 2021-04-25T03:30:42.454888+00:00 app[web.1]: /app/vendor/bundle/ruby/2.6.0/bin/puma:23:in `<top (required)>' 2021-04-25T03:30:42.525979+00:00 heroku[web.1]: Process exited with status 1 2021-04-25T03:30:42.583050+00:00 heroku[web.1]: State changed from starting to crashed 2021-04-25T03:31:17.449495+00:00 app[api]: Starting process with command `rails db:migrate` by user bbyuue0323@gmail.com 2021-04-25T03:31:26.048727+00:00 heroku[run.1868]: State changed from starting to up 2021-04-25T03:31:26.143982+00:00 heroku[run.1868]: Awaiting client 2021-04-25T03:31:26.172825+00:00 heroku[run.1868]: Starting process with command `rails db:migrate` 2021-04-25T03:31:34.845672+00:00 heroku[run.1868]: Process exited with status 0 2021-04-25T03:31:34.901055+00:00 heroku[run.1868]: State changed from up to complete 2021-04-25T03:39:49.315561+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=afternoon-fortress-59290.herokuapp.com request_id=b8abec90-82eb-4b18-919e-a2c13f71fbeb fwd="125.196.61.197" dyno= connect= service= status=503 bytes= protocol=https 2021-04-25T03:39:49.683912+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=afternoon-fortress-59290.herokuapp.com request_id=7f9514a7-c0d4-4a96-b709-5f8e730916b8 fwd="125.196.61.197" dyno= connect= service= status=503 bytes= protocol=https 2021-04-25T03:43:35.913555+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=afternoon-fortress-59290.herokuapp.com request_id=1ace9325-3613-4240-8b64-939f561e24c5 fwd="125.196.61.197" dyno= connect= service= status=503 bytes= protocol=https 2021-04-25T03:43:36.202257+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=afternoon-fortress-59290.herokuapp.com request_id=751648f6-99ed-4496-80c4-444ee3a24b5c fwd="125.196.61.197" dyno= connect= service= status=503 bytes= protocol=https
herokuへのデプロイ
heroku run rails db:migrate
は成功していると思います。
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。