Reputation: 3992
I use rpush
gem to push notification through Google Cloud Messaging
in rails application. When I set up the API_KEY
and device token
, and push the notification, a SSLError
occurred
[2016-02-11 12:14:46] [ERROR] OpenSSL::SSL::SSLError, SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
/Users/huangjun/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/net/http.rb:933:in `connect_nonblock'
/Users/huangjun/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/net/http.rb:933:in `connect'
/Users/huangjun/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/net/http.rb:863:in `do_start'
/Users/huangjun/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/net/http.rb:858:in `start'
What's the problem? Thanks!
My computer is Mac, the os system is OS X Yosemite 10.10.5
Upvotes: 1
Views: 270
Reputation: 7136
I've had this error a couple times while working on different machines. This is often do to your certificate files being outdated. The most helpful guide has been: OpenSSL Errors and Rails – Certificate Verify Failed.
Basically this is what you need to do:
$ rvm -v
$ rvm osx-ssl-certs status all
$ rvm osx-ssl-certs update all
( if you don't have RVM installed go to their website and follow the instructions)
Upvotes: 2