Не понимаю почему не работает восстановление пароля. У меня пока что туго с настройкой почты на ruby on rails, поэтому не понимаю куда надо копать.
В общем сделал в produciton.rb как сказано в документации: config.action_mailer.default_url_options = { :host => 'mysite.ru' }
Залил на сервер, отправляю, выдает такую ошибку. Вот логи:
App 1153 stderr: Started POST "/users/password" for 109.172.53.212 at 2016-04-28 11:38:09 +0300
App 1153 stderr: Processing by Devise::PasswordsController#create as HTML
App 1153 stderr: Parameters: {"utf8"=>"✓", "authenticity_token"=>"ZMzSTdUwK+KbGJXt7SCRZOb+hDEIevPtwrwy5iWmcCgZOGPEmz3f3VZniFxfMsjU4Nlz4OejDwvNuNdp3ahrCw==", "user"=>{"email"=>"petrov_smile@list.ru"}, "commit"=>"Send me reset password instructions"}
App 1153 stderr: [1m[36mUser Load (0.4ms)[0m [1mSELECT `users`.* FROM `users` WHERE `users`.`email` = 'petrov_smile@list.ru' ORDER BY `users`.`id` ASC LIMIT 1[0m
App 1153 stderr: [1m[35mUser Load (0.4ms)[0m SELECT `users`.* FROM `users` WHERE `users`.`reset_password_token` = 'e71c32cd9f651c74210021e341943f3c18fd5cea5c1a2ea53f2dc907385636d5' ORDER BY `users`.`id` ASC LIMIT 1
App 1153 stderr: [1m[36m (0.1ms)[0m [1mBEGIN[0m
App 1153 stderr: [1m[35mSQL (0.5ms)[0m UPDATE `users` SET `reset_password_token` = 'e71c32cd9f651c74210021e341943f3c18fd5cea5c1a2ea53f2dc907385636d5', `reset_password_sent_at` = '2016-04-28 08:38:11', `updated_at` = '2016-04-28 08:38:11' WHERE `users`.`id` = 0
App 1153 stderr: [1m[36m (6.9ms)[0m [1mCOMMIT[0m
App 1153 stderr: Rendered devise/mailer/reset_password_instructions.html.haml (8.8ms)
App 1153 stderr:
App 1153 stderr: Devise::Mailer#reset_password_instructions: processed outbound mail in 620.7ms
App 1153 stderr:
App 1153 stderr: Sent mail to petrov_smile@list.ru (82.0ms)
App 1153 stderr: Date: Thu, 28 Apr 2016 11:38:12 +0300
App 1153 stderr: From: please-change-me-at-config-initializers-devise@example.com
App 1153 stderr: Reply-To: please-change-me-at-config-initializers-devise@example.com
App 1153 stderr: To: petrov_smile@list.ru
App 1153 stderr: Message-ID: <5721cbf42b864_49b656a792479b1@p6307.mail>
App 1153 stderr: Subject: Reset password instructions
App 1153 stderr: Mime-Version: 1.0
App 1153 stderr: Content-Type: text/html;
App 1153 stderr: charset=UTF-8
App 1153 stderr: Content-Transfer-Encoding: 7bit
App 1153 stderr:
App 1153 stderr:
App 1153 stderr: Hello petrov_smile@list.ru!
App 1153 stderr:
App 1153 stderr: Someone has requested a link to change your password. You can do this through the link below.
App 1153 stderr:
Change my password
App 1153 stderr: If you didn't request this, please ignore this email.
App 1153 stderr: Your password won't change until you access the link above and create a new one.
App 1153 stderr:
App 1153 stderr: Completed 500 Internal Server Error in 2613ms (ActiveRecord: 9.7ms)
App 1153 stderr:
App 1153 stderr: OpenSSL::SSL::SSLError (hostname "localhost" does not match the server certificate):
App 1153 stderr: /usr/local/rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/openssl/ssl.rb:178:in `post_connection_check'
App 1153 stderr: /usr/local/rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/smtp.rb:588:in `tlsconnect'
App 1153 stderr: /usr/local/rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/smtp.rb:563:in `do_start'
App 1153 stderr: /usr/local/rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/net/smtp.rb:520:in `start'
App 1153 stderr: mail (2.6.3) lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
App 1153 stderr: mail (2.6.3) lib/mail/message.rb:2141:in `do_delivery'
App 1153 stderr: mail (2.6.3) lib/mail/message.rb:236:in `block in deliver'
App 1153 stderr: actionmailer (4.2.5.1) lib/action_mailer/base.rb:543:in `block in deliver_mail'
App 1153 stderr: activesupport (4.2.5.1) lib/active_support/notifications.rb:164:in `block in instrument'
App 1153 stderr: activesupport (4.2.5.1) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
App 1153 stderr: activesupport (4.2.5.1) lib/active_support/notifications.rb:164:in `instrument'
App 1153 stderr: actionmailer (4.2.5.1) lib/action_mailer/base.rb:541:in `deliver_mail'
App 1153 stderr: mail (2.6.3) lib/mail/message.rb:236:in `deliver'
App 1153 stderr: actionmailer (4.2.5.1) lib/action_mailer/message_delivery.rb:85:in `deliver_now'
App 1153 stderr: devise (3.5.2) lib/devise/models/authenticatable.rb:170:in `send_devise_notification'
App 1153 stderr: devise (3.5.2) lib/devise/models/recoverable.rb:111:in `send_reset_password_instructions_notification'
App 1153 stderr: devise (3.5.2) lib/devise/models/recoverable.rb:64:in `send_reset_password_instructions'
App 1153 stderr: devise (3.5.2) lib/devise/models/recoverable.rb:128:in `send_reset_password_instructions'
App 1153 stderr: devise (3.5.2) app/controllers/devise/passwords_controller.rb:13:in `create'
App 1153 stderr: actionpack (4.2.5.1) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
App 1153 stderr: actionpack (4.2.5.1) lib/abstract_controller/base.rb:198:in `process_action'
App 1153 stderr: actionpack (4.2.5.1) lib/action_controller/metal/rendering.rb:10:in `process_action'