LoginSignup
4
1

More than 1 year has passed since last update.

herokuへデプロイした時にApplication errorが起きた

Posted at

はじめに

とうとうfurimaアプリが完成し、 herokuにデプロイした時にApplication errorが起きてしまいました。
その時にどう対応したかをアウトプットします。

エラー時に参考させて頂いた記事になります。↓↓↓

image-644x378.png

heroku logs --tail

Heroku上のアプリケーションが稼働したログを、表示するためのコマンドです。
ログの最後の10行を表示するためのオプション(--tail)

まずは画面に出てきた通り、heroku logs --tailを確認しました。

2021-05-19T05:57:12.141751+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=アプリ名.herokuapp.com request_id=f257bdcd-bb86-416d-ba92-7650c15d3253 fwd="124.211.233.13" dyno= connect= service= status=503 bytes= protocol=https

heroku公式でも調べてみました。

A crashed web dyno or a boot timeout on the web dyno will present this error.
和訳:Web dynoがクラッシュした場合や、Web dynoの起動がタイムアウトした場合に、このエラーが表示されます。

分かりませんでした。。。

heroku run rails c

はじめに記載させて頂いた記事を参考にheroku上でコンソールを開いて詳細を調べました。

 `require': /app/app/controllers/purchase_histories_controller.rb:47: syntax error, unexpected end-of-input, expecting end (SyntaxError)

がっつり誤字で構文エラーが出ていた事が分かりました。

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1