0

I was checking this post: How do I set up email confirmation with Devise?

In hope to test email confirmation using mailcatcher. Unfortunately, I got this error, and I searched for several hours without being able to fix it.

SSL_connect returned=1 errno=0 state=unknown state: unknown protocol

Apparently, it is a Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/965371

Also, I tried this approach, creating mail_patch.rb: http://www.tagwith.com/question_1864741_opensslsslsslerror-in-devise/

My fear is that, if I disable mail sending errors (ignore them for now, as I'm on development mode), once I change to production (of course I wouldn't use mailcatcher), I would still not be able to send e-mails.

Community
  • 1
  • 1
Aleksandrus
  • 1,589
  • 2
  • 19
  • 31

1 Answers1

0

Somehow, following too many tutorials, editing my config files desperately trying to find an answer, I messed things up and ended up having this error.

For people that are trying to use mailcatcher with rails, I recommend THIS tutorial.

I had to remove every files that devise created, plus the devise.rb file in config/initializers/devise.rb and started from scratch. After trying the tutorial, it worked beautifully.

Also, I altered $HOME/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/net/smtp.rb, changing a method dco_start to start. I don't know if the original file has "dco_start" or if editted accidentally before, but now it works.

Aleksandrus
  • 1,589
  • 2
  • 19
  • 31