devise - SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol error in rails 4 -



devise - SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol error in rails 4 -

i implementing devise mailers application have done next steps:

in model:

class user < activerecord::base # include default devise modules. others available are: # :lockable, :timeoutable , :omniauthable devise :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable, :trackable, :validatable end

and added migrations of confirmation_token, confirmed_at, confirmation_sent_at

in devise.rb, added:

config.mailer_sender = 'example@gmail.com'

in development.rb:

config.assets.raise_runtime_errors = true config.action_mailer.default_url_options = { :host => 'localhost:3000' } config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :enable_starttls_auto => true, :address => 'smtp.gmail.com', :port => 587, :tls => 'true', :domain => 'gmail.com', :authentication => :plain, :user_name => 'example@gmail.com', :password => '326272814example' }

when click on forget password, getting error as:

openssl::ssl::sslerror in devise::passwordscontroller#create

ssl_connect returned=1 errno=0 state=sslv2/v3 read server hello a: unknown protocol

through links, added:

:enable_starttls_auto => false, :openssl_verify_mode => 'none'

to development.rb, didin't helped me. please help me out

i think of smtp_settings wrong gmail. try

config.action_mailer.smtp_settings = { address: 'smtp.gmail.com', port: 587, domain: 'example.com', user_name: '<username>', password: '<password>', authentication: 'plain', enable_starttls_auto: true }

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

ruby-on-rails devise

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -