升级到Rails 3.2.0并使用Devise&tlsmail gem为Google Apps获取SSLError?

Lea*_*RoR 1 ruby ruby-on-rails devise ruby-on-rails-3

我刚刚升级到Rails 3.2.0并在注册后发送欢迎电子邮件时收到此错误消息:

OpenSSL::SSL::SSLError in Devise::RegistrationsController#create

SSL_connect returned=1 errno=0 state=SSLv3 read server..... 
certificate B: certificate verify failed
Run Code Online (Sandbox Code Playgroud)

我正在使用这些宝石(最相关的宝石):

gem 'rails', '3.2.0'
gem "pg", "0.12.0"
gem "devise", "1.5.3"
gem "thin", "1.3.1"
gem "eventmachine", "1.0.0.beta.4.1" # I'm on Windows 7 64x
gem "tlsmail", "0.0.1"
Run Code Online (Sandbox Code Playgroud)

然后获取Google Apps和邮件工作:

环境/ development.rb

require 'tlsmail'
  Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE)
  ActionMailer::Base.delivery_method = :smtp
  ActionMailer::Base.perform_deliveries = true
  ActionMailer::Base.raise_delivery_errors = true
  ActionMailer::Base.smtp_settings = {
    :enable_starttls_auto => true,
    :address            => 'smtp.gmail.com',
    :port               => 587,
    :tls                => true,
    :domain             => 'app.com',
    :authentication     => :plain,
    :user_name          => 'test@myapp.com',
    :password           => 'app'
  }

config.action_mailer.default_url_options = { :host => 'localhost:3000' }
Run Code Online (Sandbox Code Playgroud)

我现在没有使用任何类型的SSL/HTTPS.

其他人有这个问题或知道如何解决它?

更新2012年9月1日

你不再需要这个gem了,因为gmail现在可以使用Rails了.

http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration-for-gmail

eva*_*phy 10

显然,:tls => true选项ActionMailer::Base.smtp_settings在Rails 3.2中不起作用.尝试删除它,以便你留下:

ActionMailer::Base.smtp_settings = {
  :enable_starttls_auto => true,
  :address            => 'smtp.gmail.com',
  :port               => 587,
  :domain             => 'app.com',
  :authentication     => :plain,
  :user_name          => 'test@myapp.com',
  :password           => 'app'
}
Run Code Online (Sandbox Code Playgroud)

我遇到了同样的问题,这对我有用.我还没有找到任何官方文件; 正在四处搜寻,Dan Connor的博客文章让我失望.