保存设备用户时出现 Rails EOFError(到达文件末尾)
我在尝试创建用户时在生产中遇到此错误(我正在使用设计 gem).
I'm getting this error in production when trying to create a user (i'm using the devise gem).
EOFError (end of file reached):
我之前遇到过这个问题,这是由于我使用 zoho 邮件的 smtp 设置造成的.
I hit this problem before and it was due to my smtp settings using zoho mail.
我相信我的以下配置可以解决问题:
I believe my configuration below is what fixed the problem:
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "smtp.zoho.com",
:port => 465,
:domain => 'example.com',
:user_name => 'user@example.com',
:password => 'password',
:authentication => :login,
:ssl => true,
:tls => true,
:enable_starttls_auto => true
}
现在我们已经向站点添加了 SSL,我相信这就是导致现在发生此错误的原因.
Now we've added SSL to the site and I believe that is what is causing this error to occur now.
是否有人对此错误或使用 SSL 的 zoho 邮件 smtp 设置有任何见解?
Does anyone have any insight into this error or zoho mail smtp settings with SSL?
这个错误是因为我的 config/initializers/devise.rb 没有为 config.mailer_sender
指定正确的电子邮件地址.
This error was caused by not having my config/initializers/devise.rb specifying the correct email address for config.mailer_sender
.