Error resolution on Heroku

environment

This article uses Ruby 2.6.5 installed on macOS Catalina 10.15.6.

procedure

When an error occurs on Heroku, you need to check the error log and resolve the error. It can be solved by the following 5 steps.

1. 1. Error occurred

When I accessed Heroku, the contents of the image below were displayed.

スクリーンショット 2020-10-21 9.23.35.png The site does not know the specific content of the error, so check the error log in the terminal.

2. Output error log

terminal


heroku logs --tail --app <<Application name>>

If you enter, the error log will be displayed.

Look for the log where the error actually occurred.

3. 3. Error found

スクリーンショット 2020-10-21 9.50.37.png Make a hypothesis of the cause from the content of the error and think of a solution.

4. hypothesis

The error content is that the comment table does not exist on Heroku, so it is predicted that the migration content is not reflected in the database on Heroku. If you execute migration on Heroku, it may be solved.

Actually verify.

5. Verification

terminal


heroku run rails db:migrate

After execution, access again. Solved safely!

Summary

What to do if an error occurs on Heroku Roughly divided into 3 steps ・ Output error log ・ Discover the latest error ・ Hypothesis verification that's all.

Thank you for reading to the end! I hope it helps those who are facing similar challenges!

Recommended Posts

Error resolution on Heroku
DB error on deploying with Heroku
ITMS-90626 Error Resolution
Error when running git push heroku master on Heroku
Introducing Bugsnag on Heroku
ActionController :: InvalidAuthenticityToken error resolution
rails heroku error log
rails error resolution summary
Yay! I'm on Heroku!
Use Corretto 11 on Heroku
Introduce Rails/Basic authentication on Heroku.
java setter getter error resolution
How to deploy on heroku
Use PG Backups on Heroku
[Ruby on Rails] undefined method ʻid'for nil: NilClass error resolution method
Error when npm install on Windows 7
Spring Boot + PostgreSQL error resolution method
Run puppeteer-core on Heroku (Docker edition)
Error when deploying EC2 on CircleCI
[Rejected] A memorandum because an error occurred during deployment on Heroku
Deploy a war file on Heroku
Deploy Flask's Docker image on Heroku
Deploy Rails on Docker to heroku
Commit failed exit code 1 error resolution
Deploy your Rails app on Heroku
[Ruby on Rails] Follow function undefined method ʻid'for nil: NilClass error resolution
How to redo a deployment on Heroku
Introducing Basic Authentication on Heroku [Spring Framework]
I want to display background-ground-image on heroku.
How to publish an application on Heroku
Error when trying to use heroku command
Deploy to Heroku [Ruby on Rails] Beginner
Multiple migrations have the name Error resolution
Enable natto / mecab gem on Heroku environment
RSpec error resolution undefined method'name' in'user' factory
Deploy a Java web app on Heroku
Deploy a Tomcat-based Eclipse project on Heroku
[Heroku] How to solve when an error is displayed on git push heroku master
What to do if you get an error on heroku rake db: migrate