LoginSignup
0
0

More than 3 years have passed since last update.

rails tutorial 本番環境でアカウント有効化について

Last updated at Posted at 2020-09-05

はじめに

プログラミング初学者です。
rails tutorial 11章の本番環境でアカウント有効化できなかった際の自分の解決策を記載します。

環境

Ubuntu 18.04 LTS
ruby 2.7.1
Rails 6.0.3

問題点

rails tutorial 11章の本番環境でアカウント有効化ができない。
メールは届くのにリンクにアクセスできない。
届いたURLを見てみると、、、
https://XXXXXXXX-XXXXXXXXXX-XXXXX.herokuapp.com%3E.herokuapp.com/account_activations/LE2XcAU-C4szTXa7Yx4zWA/edit?email=(設定したメールアドレス).com
なぜかherokuapp.comが二回でている。。
%3Eとかでている。。。(%3EはURLエンコードでの > のこと)

解決策

production.rbに設定した

host = '<https://XXXXXXXX-XXXXXXXXXX-XXXXX.herokuapp.com>.herokuapp.com'

の部分を

host = 'https://XXXXXXXX-XXXXXXXXXX-XXXXX.herokuapp.com'

とすることで解決しました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0