Ruby throws SSL Certificate error


#1

Been three days since I am struggling with this. I was trying to implement PushPlugin into my Ionic cordova project. Everytime I run ruby pushGCM.rb, I get the following SSL certificate error

I have been using PushPlugin github repo for a sample push notification example using ionic cordova framework. Everytime I call

ruby pushGCM.rb, I get the following error

C:\NewP\plugins\com.phonegap.plugins.PushPlugin\Example\server>ruby pushGCM.rb
C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:918:in connect': SSL_connect returned=1 errno=0 state=SSL v3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError) from C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:918:inblock in connect’
from C:/Ruby200-x64/lib/ruby/2.0.0/timeout.rb:52:in timeout' from C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:918:inconnect’
from C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:862:in do_start' from C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:851:instart’
from C:/Ruby200-x64/lib/ruby/2.0.0/net/http.rb:1367:in request' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/httparty-0.13.1/lib/httparty/request.rb:93:in
perform’
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/httparty-0.13.1/lib/httparty.rb:521:in perform _request' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/httparty-0.13.1/lib/httparty.rb:473:inpost’
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/pushmeup-0.2.0/lib/pushmeup/gcm/core.rb:95:in send_to_server' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/pushmeup-0.2.0/lib/pushmeup/gcm/core.rb:80:in
send_push_as_json’
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/pushmeup-0.2.0/lib/pushmeup/gcm/core.rb:60:in prepare_and_send' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/pushmeup-0.2.0/lib/pushmeup/gcm/core.rb:41:in
block in send_notifications’
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/pushmeup-0.2.0/lib/pushmeup/gcm/core.rb:40:in each' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/pushmeup-0.2.0/lib/pushmeup/gcm/core.rb:40:in
send_notifications’
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/pushmeup-0.2.0/lib/pushmeup/gcm/core.rb:35:in send_notification' from pushGCM.rb:9:in

I have checked the path, installed what not in my system, most posts said rvm is the solution but I cant get to work with this on Windows.


#2

Hey,

sounds like a real problem, but I don’t think it is related to Ionic.
Sounds more like a problem for either the server that sends the pushes or Cordova, which receives the notifications.

Maby looking for this error in relation to the plugin will yield a bigger success. And maby looking at implementing SSL on the local server could help aswell.

Good luck!


#3

Thanks for stopping by. Yeah I did research on the issue. Its not specific to Ionic.Its more of a ruby issue. I have installed pik, ruby, gem, cygwin what not. But Cannot get out of this error. I have even installed a proxy bypass software just to ensure my company proxy isnt allowing the certification of SSL. But all seem to be vain.