rails 初心者です。
Ruby on Railsチュートリアル第11章 11.4「本番環境でのメール送信」で困っています。
SendGridからのメールは届く状態です。
メール内のActivateからのリンク先に接続した時、
このサイトにアクセスできません ..herokuapp.com のサーバーの IP アドレスが見つかりませんでした。 DNS_PROBE_FINISHED_NXDOMAIN
の様に表示されます。
- 試したこと
以下の記事を参考にしました。
https://teratail.com/questions/112723
(host = '<your heroku app>.herokuapp.com'は自分の環境に変更しています)
production.rb
config.action_mailer.raise_delivery_errors = true config.action_mailer.delivery_method = :smtp host = '<your heroku app>.herokuapp.com' config.action_mailer.default_url_options = { host: host } ActionMailer::Base.smtp_settings = { :address => 'smtp.sendgrid.net', :port => '587', :authentication => :plain, :user_name => ENV['SENDGRID_USERNAME'], :password => ENV['SENDGRID_PASSWORD'], :domain => 'heroku.com', :enable_starttls_auto => true }
SENDGRID_USERNAME, SENDGRID_PASSWORDの部分を
$ heroku config:get SENDGRID_USERNAME
$ heroku config:get SENDGRID_PASSWORD
で表示した、user_name password をあてはめましたが、別のエラーが出たため直しました。
* https://teratail.com/questions/74492を参考しました。
account_activation.text
Hi <%= @user.name %>, Welcome to the Sample App! Click on the link below to activate your account: <%= edit_account_activation_url(@user.activation_token, email: @user.email) %>
heroku logs の結果に、
Process exited with status 127 ... Stopping all processes with SIGTERM ... Process exited with status 143
と赤文字で表示された部分3箇所あったのですがこれが関係しているのでしょうか?
どういったエラーなのかわからず困っています。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。