0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

herokuでのArgumentErrorの解決

Last updated at Posted at 2020-03-25

herokuでのArgumentErrorやErrno::ECONNREFUSED: Connection refused – connect(2) for action mailerの解決

メモ用に残しておく

ArgumentError in Users::Registrations#createというerrorが発生

こんな感じにconfig/environments/development.rbに書いてあった文をproduction.rbに移してサーバーを再起動するだけだった。

production.rb
config.action_mailer.default_url_options = { protocol: 'https', host: 'https://〇〇〇〇.com' }
config.action_mailer.raise_delivery_errors = true
config.action_mailer.smtp_settings = {
  port:                   XXX,
  address:               'smtp.gmail.com',
  domain:                'smtp.gmail.com',
  user_name:             'XXXXXXX@gmail.com',
  password:              XXXXXXX,
  authentication:        'login',
  enable_starttls_auto:  true
}
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?