www.nico.schottelius.org/blog/ruby-on-rails-fix-hostname-does-not-match-the-server-certificate.mdwn
Nico Schottelius 44e09b93d6 +fix ssl error
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2014-05-30 18:47:27 +03:00

23 lines
795 B
Markdown

[[!meta title="Ruby on Rails: Fix the hostname does not match the server certificate error"]]
## The problem
If you encounter this problem when running Ruby on Rails:
OpenSSL::SSL::SSLError (hostname "localhost" does not match the server certificate)
it is likely due to
[ActionMailer](http://api.rubyonrails.org/classes/ActionMailer/Base.html)
using the **smtp** as the ***delivery_method*** and
your local mail server supporting TLS/SSL,
but not having a correct/valid certificate.
## The solution
You can add a valid certificate, but if the server is just used
for sending out mails, this may not be suited.
In that case, you can change the ***delivery_method*** to
**sendmail**, which makes ActionMailer use the sendmail
binary directly.
[[!tag net unix foss ungleich rails]]