I just upgraded to Rails 3.2.8and updated all my gems. I wanted to test my site, so I started by registering, but when I clicked the connect button, it gave me an error:
OpenSSL::SSL::SSLError in RegistrationsController
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
app/models/user.rb:28:in `send_welcome_email'
I am using Devise 2.1.2and this is my user model:
class User < ActiveRecord::Base
attr_accessible :email, :password, :remember_me
attr_accessor :accessible
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable,
:validatable, :email_regexp => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
after_create :send_welcome_email
private
def send_welcome_email
UserMailer.welcome_email(self).deliver
end
end
I assume this has something to do with my email settings in my 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 => 'support@app.com',
:password => '******'
}
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
How can I fix this problem? I just started getting it when I went to 3.2.8. I'm on windows 7 if that helps.
source
share