Home>

After deploying the Rails app to Heroku
We're sorry, but something went wrong.
Will transition to the error page

What I tried

This siteAt

$heroku run rails db: migrate


It was said that it would be resolved with, but there was no change

#result
ec2-user: ~/environment/toreka (master) $heroku run rails db: migrate
Running rails db: migrate on ⬢ toreka ... up, run.5067 (Free)
   (4.3ms) SET NAMES utf8, @@ SESSION.sql_mode = CONCAT (CONCAT (@@ sql_mode,', STRICT_ALL_TABLES'),', NO_AUTO_VALUE_ON_ZERO'), @@ SESSION.sql_auto_is_null = 0, @@ SESSION.wait_timeout = 2147483
   (1.3ms) SELECT GET_LOCK ('8068231160949447075', 0)
   (1.5ms) SELECT `schema_migrations` .`version` FROM `schema_migrations` ORDER BY` schema_migrations` .`version` ASC
  ActiveRecord :: InternalMetadata Load (1.5ms) SELECT `ar_internal_metadata`. * FROM` ar_internal_metadata` WHERE `ar_internal_metadata`.`key` ='environment' LIMIT 1
   (1.5ms) BEGIN
   (4.7ms) COMMIT
   (2.3ms) SELECT RELEASE_LOCK ('8068231160949447075')

I checked the error statement, but I couldn't find any error statement.

ec2-user: ~/environment/toreka (master) $heroku logs -t
2020-11-25T06: 28: 42.308260 + 00: 00 app [web.1]: [1dbfaf49-8997-4efb-a34a-08321185edb3] 12:<p>We have accepted "temporary registration" of account information.<br>Please complete the main registration from the link below.</p>2020-11-25T06: 28: 42.308261 + 00: 00 app [web.1]: [1dbfaf49-8997-4efb-a34a-08321185edb3] 13:
2020-11-25T06: 28: 42.308262 + 00: 00 app [web.1]: [1dbfaf49-8997-4efb-a34a-08321185edb3] 14:<p>[URL for main registration]<br>2020-11-25T06: 28: 42.308264 + 00: 00 app [web.1]: [1dbfaf49-8997-4efb-a34a-08321185edb3] 15:<p><% = link_to'Perform main registration', confirmation_url ( @resource, confirmation_token: @token)%><br>2020-11-25T06: 28: 42.308265 + 00: 00 app [web.1]: [1dbfaf49-8997-4efb-a34a-08321185edb3] 16: Click the above link to move to the login screen. Please press the "SIGN IN" button to enter the site</p><br>2020-11-25T06: 28: 42.308265 + 00: 00 app [web.1]: [1dbfaf49-8997-4efb-a34a-08321185edb3] 17:
2020-11-25T06: 28: 42.308266 + 00: 00 app [web.1]: [1dbfaf49-8997-4efb-a34a-08321185edb3] 18:<p>[Notes]<br>2020-11-25T06: 28: 42.308323 + 00: 00 app [web.1]: [1dbfaf49-8997-4efb-a34a-08321185edb3]
2020-11-25T06: 28: 42.308406 + 00: 00 app [web.1]: [1dbfaf49-8997-4efb-a34a-08321185edb3] app/views/devise/mailer/confirmation_instructions.html.erb: 15: in `_app_views_devise_mailer_confirmation_instructions_html_confirmation_instructions_html_. '
2020-11-25T06: 28: 42.308407 + 00: 00 app [web.1]: [1dbfaf49-8997-4efb-a34a-08321185edb3] app/mailers/users/mailer.rb: 14: in `confirmation_instructions'
2020-11-25T06: 28: 42.308999 + 00: 00 heroku [router]: at = info method = POST path = "/ users/confirmation" host = toreka.herokuapp.com request_id = 1dbfaf49-8997-4efb-a34a-08321185edb3 fwd = "175.132.104.83" dyno = web.1 connect = 0ms service = 29ms status = 500 bytes = 1827 protocol = https
2020-11-25T07: 02: 33.760893 + 00: 00 heroku [web.1]: Idling
2020-11-25T07: 02: 33.762730 + 00: 00 heroku [web.1]: State changed from up to down
2020-11-25T07: 02: 38.409254 + 00: 00 heroku [web.1]: Stopping all processes with SIGTERM
2020-11-25T07: 02: 38.446046 + 00: 00 app [web.1]: --Gracefully stopping, waiting for requests to finish
2020-11-25T07: 02: 38.447542 + 00: 00 app [web.1]: === puma shutdown: 2020-11-25 07:02:38 +0000 ===
2020-11-25T07: 02: 38.447544 + 00: 00 app [web.1]: --Goodbye!
2020-11-25T07: 02: 38.447654 + 00: 00 app [web.1]: Exiting
2020-11-25T07: 02: 38.545056 + 00: 00 heroku [web.1]: Process exited with status 143<Partially omitted>2020-11-25T13: 50: 38.823592 + 00: 00 app [web.1]: [4fa6ddd5-11c9-4c58-b6c0-46f3f93d52d4] ActionView :: Template :: Error (Missing host to link to! Please provide the: host parameter, set default_url_options [: host],

 or set: only_path to true):
2020-11-25T13: 50: 38.823805 + 00: 00 app [web.1]: [4fa6ddd5-11c9-4c58-b6c0-46f3f93d52d4] 12:<p>We have accepted "temporary registration" of account information.<br>Please complete the main registration from the link below.</p>2020-11-25T13: 50: 38.823807 + 00: 00 app [web.1]: [4fa6ddd5-11c9-4c58-b6c0-46f3f93d52d4] 13:
2020-11-25T13: 50: 38.823807 + 00: 00 app [web.1]: [4fa6ddd5-11c9-4c58-b6c0-46f3f93d52d4] 14:<p>[URL for main registration]<br>2020-11-25T13: 50: 38.823808 + 00: 00 app [web.1]: [4fa6ddd5-11c9-4c58-b6c0-46f3f93d52d4] 15:<p><% = link_to'Perform main registration', confirmation_url ( @resource, confirmation_token: @token)%><br>2020-11-25T13: 50: 38.823809 + 00: 00 app [web.1]: [4fa6ddd5-11c9-4c58-b6c0-46f3f93d52d4] 16: Click the above link to move to the login screen, so click the "SIGN IN" button as it is. Please press to enter the site</p><br>2020-11-25T13: 50: 38.823809 + 00: 00 app [web.1]: [4fa6ddd5-11c9-4c58-b6c0-46f3f93d52d4] 17:
2020-11-25T13: 50: 38.823810 + 00: 00 app [web.1]: [4fa6ddd5-11c9-4c58-b6c0-46f3f93d52d4] 18:<p>[Notes]<br>2020-11-25T13: 50: 38.823815 + 00: 00 app [web.1]: [4fa6ddd5-11c9-4c58-b6c0-46f3f93d52d4]
2020-11-25T13: 50: 38.823842 + 00: 00 app [web.1]: [4fa6ddd5-11c9-4c58-b6c0-46f3f93d52d4] app/views/devise/mailer/confirmation_instructions.html.erb: 15: in `_app_views_devise_mailer_confirmation_ '
2020-11-25T13: 50: 38.823843 + 00: 00 app [web.1]: [4fa6ddd5-11c9-4c58-b6c0-46f3f93d52d4] app/mailers/users/mailer.rb: 14: in `confirmation_instructions'
2020-11-25T13: 50: 38.825807 + 00: 00 heroku [router]: at = info method = POST path = "/ users/confirmation" host = toreka.herokuapp.com request_id = 4fa6ddd5-11c9-4c58-b6c0-46f3f93d52d4 fwd = "175.132.104.83" dyno = web.1 connect = 2ms service = 141ms status = 500 bytes = 1827 protocol = https
Supplementary information (FW/tool version, etc.)

Rails 5.2.4.4
ruby 2.5.1

If i know the solution, I would appreciate it if you could teach me.
Please let us know if you have any necessary code

  • Answer # 1

    Isn't it an error?
    app/views/devise/mailer/confirmation_instructions.html.erb: 15: app/mailers/users/mailer.rb: 14:
    Around here.
    I have to look from the top of the log.
    It can be inferred from this that the mail-related settings in production mode are incorrect.