1
0

More than 1 year has passed since last update.

Rails メール送信でLoadError (cannot load such file -- net/smtp)の対処法

Posted at

RailsのMailerで問い合わせ機能を実装していたところ、
このようなエラーが表示された。
Image from Gyazo

メールの送信先はGmailを使用している。
問い合わせの確認画面で送信ボタンを押すとエラーが表示された。

原因

config/environments/development.rbに設定している
メーラー情報のpasswordを以前作成したアプリのものをそのまま使っていたからだった。

対処法

Googleアカウントの管理画面より、
左にあるセキュリティを選択
Image from Gyazo

下の方にあるGoogleへのログインのアプリパスワードから新しいアプリのパスワードを新規作成
Image from Gyazo

config/environments/development.rbでpasswordを新規作成したパスワードに差し替えれば完了

1
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
1
0