質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby on Rails 6

Ruby on Rails 6は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Q&A

0回答

383閲覧

herokuでデプロイしたらエラーになってしまう

koikoikoikoi

総合スコア14

Ruby on Rails 6

Ruby on Rails 6は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

0グッド

0クリップ

投稿2022/09/29 09:35

前提

rails tutorialで学習中です。
cloud9のターミナルで git push heroku master した後、herokuでデプロイ してもWebページには

Application error An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command heroku logs --tail

とエラーが表示されてしまいます。

実現したいこと

エラーの解決

発生している問題・エラーメッセージ

$heroku logs --tail 2022-09-27T11:19:25.429742+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fathomless-shore-68344.herokuapp.com request_id=80f4a59e-ab4a-485d-990f-2bad86af7a1f fwd="156.146.35.170" dyno= connect= service= status=503 bytes= protocol=https 2022-09-27T11:28:53.686261+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fathomless-shore-68344.herokuapp.com request_id=d1178c52-40cf-45ca-aadc-162171111f49 fwd="156.146.35.170" dyno= connect= service= status=503 bytes= protocol=https 2022-09-27T11:28:54.530109+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fathomless-shore-68344.herokuapp.com request_id=6589b966-65cd-4c66-9294-01d90944585b fwd="156.146.35.170" dyno= connect= service= status=503 bytes= protocol=https ※字数制限の為割愛 2022-09-27T11:39:03.981726+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fathomless-shore-68344.herokuapp.com request_id=c7dea03d-6485-4ef9-a88e-5a1820eacd94 fwd="156.146.35.170" dyno= connect= service= status=503 bytes= protocol=https 2022-09-27T15:42:39.579344+00:00 heroku[web.1]: State changed from crashed to starting 2022-09-27T15:42:42.863340+00:00 heroku[web.1]: Starting process with command `npm start` 2022-09-27T15:42:44.356170+00:00 app[web.1]: npm ERR! missing script: start 2022-09-27T15:42:44.362295+00:00 app[web.1]: 2022-09-27T15:42:44.362433+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2022-09-27T15:42:44.362485+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-09-27T15_42_44_356Z-debug.log 2022-09-27T15:42:44.488708+00:00 heroku[web.1]: Process exited with status 1 2022-09-27T15:42:44.596272+00:00 heroku[web.1]: State changed from starting to crashed 2022-09-27T18:16:45.608999+00:00 heroku[web.1]: State changed from crashed to starting 2022-09-27T18:16:49.175447+00:00 heroku[web.1]: Starting process with command `npm start` 2022-09-27T18:16:50.835566+00:00 app[web.1]: npm ERR! missing script: start 2022-09-27T18:16:50.841448+00:00 app[web.1]: 2022-09-27T18:16:50.841597+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2022-09-27T18:16:50.841643+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-09-27T18_16_50_836Z-debug.log 2022-09-27T18:16:50.956922+00:00 heroku[web.1]: Process exited with status 1 2022-09-27T18:16:51.036539+00:00 heroku[web.1]: State changed from starting to crashed 2022-09-27T20:17:09.845597+00:00 heroku[web.1]: State changed from crashed to starting 2022-09-27T20:17:13.713641+00:00 heroku[web.1]: Starting process with command `npm start` 2022-09-27T20:17:15.434629+00:00 app[web.1]: npm ERR! missing script: start 2022-09-27T20:17:15.442596+00:00 app[web.1]: 2022-09-27T20:17:15.442743+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2022-09-27T20:17:15.442766+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-09-27T20_17_15_435Z-debug.log 2022-09-27T20:17:15.720939+00:00 heroku[web.1]: Process exited with status 1 2022-09-27T20:17:15.772583+00:00 heroku[web.1]: State changed from starting to crashed 2022-09-28T00:00:05.627095+00:00 heroku[web.1]: State changed from crashed to starting 2022-09-28T00:00:09.137208+00:00 heroku[web.1]: Starting process with command `npm start` 2022-09-28T00:00:10.742614+00:00 app[web.1]: npm ERR! missing script: start 2022-09-28T00:00:10.747874+00:00 app[web.1]: 2022-09-28T00:00:10.748017+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2022-09-28T00:00:10.748075+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-09-28T00_00_10_743Z-debug.log 2022-09-28T00:00:10.890627+00:00 heroku[web.1]: Process exited with status 1 2022-09-28T00:00:10.970157+00:00 heroku[web.1]: State changed from starting to crashed 2022-09-28T05:34:46.738158+00:00 heroku[web.1]: State changed from crashed to starting 2022-09-28T05:34:50.391709+00:00 heroku[web.1]: Starting process with command `npm start` 2022-09-28T05:34:51.849347+00:00 app[web.1]: npm ERR! missing script: start 2022-09-28T05:34:51.851744+00:00 app[web.1]: 2022-09-28T05:34:51.851897+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2022-09-28T05:34:51.851941+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-09-28T05_34_51_849Z-debug.log 2022-09-28T05:34:51.974330+00:00 heroku[web.1]: Process exited with status 1 2022-09-28T05:34:52.033174+00:00 heroku[web.1]: State changed from starting to crashed 2022-09-28T11:34:55.046139+00:00 heroku[web.1]: State changed from crashed to starting 2022-09-28T11:34:58.574051+00:00 heroku[web.1]: Starting process with command `npm start` 2022-09-28T11:35:00.099011+00:00 app[web.1]: npm ERR! missing script: start 2022-09-28T11:35:00.104375+00:00 app[web.1]: 2022-09-28T11:35:00.104525+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2022-09-28T11:35:00.104586+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-09-28T11_35_00_099Z-debug.log 2022-09-28T11:35:00.224223+00:00 heroku[web.1]: Process exited with status 1 2022-09-28T11:35:00.355310+00:00 heroku[web.1]: State changed from starting to crashed 2022-09-28T17:03:07.139847+00:00 heroku[web.1]: State changed from crashed to starting 2022-09-28T17:03:10.562012+00:00 heroku[web.1]: Starting process with command `npm start` 2022-09-28T17:03:12.213926+00:00 app[web.1]: npm ERR! missing script: start 2022-09-28T17:03:12.219849+00:00 app[web.1]: 2022-09-28T17:03:12.220073+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2022-09-28T17:03:12.220148+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-09-28T17_03_12_214Z-debug.log 2022-09-28T17:03:12.344262+00:00 heroku[web.1]: Process exited with status 1 2022-09-28T17:03:12.403952+00:00 heroku[web.1]: State changed from starting to crashed 2022-09-28T22:50:37.930709+00:00 heroku[web.1]: State changed from crashed to starting 2022-09-28T22:50:41.621115+00:00 heroku[web.1]: Starting process with command `npm start` 2022-09-28T22:50:43.630788+00:00 app[web.1]: npm ERR! missing script: start 2022-09-28T22:50:43.636305+00:00 app[web.1]: 2022-09-28T22:50:43.636533+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2022-09-28T22:50:43.636619+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-09-28T22_50_43_631Z-debug.log 2022-09-28T22:50:43.781331+00:00 heroku[web.1]: Process exited with status 1 2022-09-28T22:50:43.833316+00:00 heroku[web.1]: State changed from starting to crashed 2022-09-29T04:42:47.113088+00:00 heroku[web.1]: State changed from crashed to starting 2022-09-29T04:42:50.397810+00:00 heroku[web.1]: Starting process with command `npm start` 2022-09-29T04:42:52.194754+00:00 app[web.1]: npm ERR! missing script: start 2022-09-29T04:42:52.197188+00:00 app[web.1]: 2022-09-29T04:42:52.197339+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2022-09-29T04:42:52.197401+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-09-29T04_42_52_195Z-debug.log 2022-09-29T04:42:52.335100+00:00 heroku[web.1]: Process exited with status 1 2022-09-29T04:42:52.443456+00:00 heroku[web.1]: State changed from starting to crashed 2022-09-29T09:21:46.000000+00:00 app[api]: Build started by user koichan1996@icloud.com 2022-09-29T09:22:39.663542+00:00 heroku[web.1]: State changed from crashed to starting 2022-09-29T09:22:49.727248+00:00 heroku[web.1]: Starting process with command `npm start` 2022-09-29T09:22:52.196442+00:00 app[web.1]: npm ERR! missing script: start 2022-09-29T09:22:52.201802+00:00 app[web.1]: 2022-09-29T09:22:52.202011+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2022-09-29T09:22:52.202088+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-09-29T09_22_52_197Z-debug.log 2022-09-29T09:22:52.322556+00:00 heroku[web.1]: Process exited with status 1 2022-09-29T09:22:52.825835+00:00 heroku[web.1]: State changed from starting to crashed 2022-09-29T09:22:52.834359+00:00 heroku[web.1]: State changed from crashed to starting 2022-09-29T09:23:01.182633+00:00 heroku[web.1]: Starting process with command `npm start` 2022-09-29T09:23:03.857801+00:00 app[web.1]: npm ERR! missing script: start 2022-09-29T09:23:03.862605+00:00 app[web.1]: 2022-09-29T09:23:03.862739+00:00 app[web.1]: npm ERR! A complete log of this run can be found in: 2022-09-29T09:23:03.862803+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-09-29T09_23_03_858Z-debug.log 2022-09-29T09:23:04.009321+00:00 heroku[web.1]: Process exited with status 1 2022-09-29T09:23:04.099238+00:00 heroku[web.1]: State changed from starting to crashed 2022-09-29T09:23:05.049527+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fathomless-shore-68344.herokuapp.com request_id=000ea899-df59-4cd9-bf75-5ed0fdd5113a fwd="138.199.22.226" dyno= connect= service= status=503 bytes= protocol=https 2022-09-29T09:23:05.899592+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fathomless-shore-68344.herokuapp.com request_id=f3189283-3490-4efd-b6bb-1b2f8e217cd5 fwd="138.199.22.226" dyno= connect= service= status=503 bytes= protocol=https 2022-09-29T09:22:39.338415+00:00 app[api]: Deploy a47a9f2f by user koichan1996@icloud.com 2022-09-29T09:22:39.338415+00:00 app[api]: Release v9 created by user koichan1996@icloud.com 2022-09-29T09:22:43.000000+00:00 app[api]: Build succeeded

試したこと

ルートディレクトリにProcfileを作成し、下記を記述したら解決するとあったので実行。

web: node index.js

補足情報(FW/ツールのバージョンなど)

https://teratail.com/questions/149944

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問