I want to achieve

I want to eliminate the error We're sorry, but something went wrong. And allow the app to open again in the production environment.

  • Development environment Ruby on Rails6
  • MySQL

I updated the app locally and pressed the automatic deploy command for the first time in a while to complete the deployment. When I tried to check the reflection, the error in the picture below occurred in the production environment and the app could not be opened.

We're sorry, but something went wrong.
If i am the application owner check the logs for more information.

I googled because the app works locally but doesn't work in production, and this error itself seems to be common. And I was angry to check the log of my app, so I logged in to EC2 and checked the log of the production environment with cat production.log.

Error details excerpt
ActionController :: RoutingError (No route matches [GET] "/TP/html/public/index.php"):
Rendered tweets/index.html.erb within layouts/application (Duration: 10.5ms | Allocations: 4817)
Completed 500 Internal Server Error in 12ms (ActiveRecord: 0.6ms | Allocations: 5296)
ActionView :: Template :: Error (undefined method `breadcrumb'for #<#<Class: 0x00000000076186e8>: 0x0000000006cdd218>):

I found that such an error occurred in the production environment. However, the content of the cause of the error is unknown, and we are currently investigating the content of the error statement.

What I tried&what I can think of

Before deploying, I added gem'gretel' to create a file and repeated editing.
Since it was displayed locally, the branch that was cut was merged with a pull request.
After reflecting locally, the deployment itself was completed successfully with the bundle exec cap production deploy command.

Before doing a series of workrails db: migrateTo stop working once after doingrails db: rollbackI am doing.

I'm wondering if that was wrong, but at the moment I don't have a concrete solution as to what to fix in the production environment.

I'm sorry to ask you a question in a row, but I would like to borrow your wisdom.

  • Answer # 1

    undefined method breadcrumb
    It is said that.
    Please check two.
    Does local work with the same branch as deploy?
    Is there a file that you haven't committed with git status?
    Especially newly added