[RUBY] How to redo a deployment on Heroku


About this article
After deploying on Heroku, it is not reflected in the production environment and deploy again I was able to solve it safely, so I posted it as a memorandum!

[environment] ・ Ruby 2.6.5, Rails 6.0.0 ・ MacOS


Situation
When creating an application with rails, deploy it with Heroku to check the movement in the production environment. The first time it worked fine, but the second time a problem occurred. The view is similar to the local environment Since it is not implemented, it cannot be solved by trial and error. When I asked the mentor, I was able to solve it by doing one new operation.

The following are all operations at the terminal.

$ git commit --allow-empty -m "Any commit message"

→ Normally, you cannot commit/push if there is no difference, but a command that forcibly executes even if there is no difference

The rest is the same flow as normal deployment to Heroku.

$ git push heroku master
$ heroku run raills db:migrate

Check in the production environment and if there is no problem, it is completed.


At the end
It's easy to get impatient if it doesn't work in the same way in the production environment even though there is no problem in the local environment. Just knowing that a command like this can solve it will make you mentally stable!

Recommended Posts

How to redo a deployment on Heroku
How to deploy on heroku
How to deploy a simple Java Servlet app on Heroku
How to publish an application on Heroku
How to deploy a container on AWS Lambda
How to save images on Heroku to S3 on AWS
Note how to rollback Mysql deployed on Heroku
[Rails MySQL] How to reset DB on heroku
How to build a Pytorch environment on Ubuntu
How to post images on Heroku + CarrierWave + S3
How to deploy to Heroku from a local docker image
How to leave a comment
How to make JavaScript work on a specific page
How to connect to ClearDB from Sequel Pro on Heroku
[Ruby On Rails] How to reset DB in Heroku
[Java] How to execute tasks on a regular basis
How to insert a video
How to create a method
[Docker] How to update using a container on Heroku and how to deal with Migrate Error
How to get inside a container running on AWS Fargate
How to deploy a kotlin (java) app on AWS fargate
How to display a graph in Ruby on Rails (LazyHighChart)
How to install GNOME as a desktop environment on CentOS 7
How to deploy a Rails application on AWS (article summary)
How to check the database of apps deployed on Heroku
How to deploy jQuery on Rails
How to add columns to a table
How to deploy Laravel on CentOS 7
How to "hollow" View on Android
[Java] How to update Java on Windows
How to make a Java container
How to install ImageMagick on Windows 10
How to use Ruby on Rails
How to sign a Minecraft MOD
How to make a JDBC driver
How to deploy Bootstrap on Rails
How to run JavaFX on Docker
How to use Bio-Formats on Ubuntu 20.04
Deploy a war file on Heroku
[Java] How to create a folder
How to write a ternary operator
How to connect Heroku and Sequel
How to install MariaDB 10.4 on CentOS 8
Rails on Tiles (how to write)
[Swift] How to send a notification
How to install WildFly on Ubuntu 18.04
How to make a splash screen
How to make a Jenkins plugin
How to make a Maven project
Deploy Rails on Docker to heroku
How to build vim on Ubuntu 20.04
How to make a Java array
How to run a mock server on Swagger-ui using stoplight/prism (using AWS/EC2/Docker)
[Rejected] A memorandum because an error occurred during deployment on Heroku
How to automatically operate a screen created in Java on Windows
[Rails / Heroku / MySQL] How to reset the DB of Rails application on Heroku
How to deploy an app that references a local jar to heroku
[Rails] How to put a crown mark on the ranking function
How to create a web server on an EC2 instance on AWS
How to get JDK 11 on your mac in a comfortable way
[Xcode] How to add a README.md file