[RUBY] [Note] Update to production environment [heroku]

Introduction

I'm nervous every time I update to the production environment. This time I updated to the first production environment on heroku. As it was my first time, I got an error and was impatient, but the cause was very simple. ..

This time, I will post it as an article so that other people can solve this error immediately so that I will not forget the solution.

Error screen

6ae4049abac24c612af7c9f06c3aa624.png

At the moment, I am saying that it is not an environment that can be pushed.

Solution

Deployment on heroku is linked with git, so if there are any changes, execute the following command so that the changes can be reflected.

$ git add
$ git commit -m "Update application"
$ git push heroku master

#Execute the following command when you change the migration etc.
$ heroku run rails db:migrate

At the end

As mentioned above, it was a very simple story. Every time I have a strange feeling of tension in the production environment.

The procedure is very easy, but if anyone is stumbling, please refer to it.

Recommended Posts

[Note] Update to production environment [heroku]
[Note] Update to production environment (heroku)
[Note] Update to production environment (AWS EC2)
How to reflect seeds.rb in production environment
Note how to rollback Mysql deployed on Heroku
Steps to deploy to Heroku
Production environment and credentials.yml.enc
Can't upload to heroku
Deploy Vapor Project to Heroku
How to deploy on heroku
Introduction to Metabase ~ Environment Construction ~
Update Ruby in Unicorn environment
[Note] How to write Dockerfile/docker-compose.yml
How to update with activerecord-import
[Rails] How to execute "rails db: create" etc. in production environment EC2
I want to display the images under assets/images in the production environment
[Rails] How to reset the database in production environment (Capistrano version)
AWS Cloud9 environment construction Update Ruby to the latest stable version