Rails: Open HTTP URL From HTTPS site
Posted
by Imran
on Stack Overflow
See other posts from Stack Overflow
or by Imran
Published on 2010-04-26T16:31:31Z
Indexed on
2010/04/26
16:33 UTC
Read the original article
Hit count: 610
I have a rails application running on SSL. I also have setup Piwik (for analytics) and it is running non-secure i.e. HTTP. When I try to make a call to Piwik API from my ruby code (the application running on SSL) it gives me the following error:
SocketError (getaddrinfo: Name or service not known):
/usr/lib/ruby/1.8/net/http.rb:560:in initialize'
/usr/lib/ruby/1.8/net/http.rb:560:in
open'
/usr/lib/ruby/1.8/net/http.rb:560:in connect'
/usr/lib/ruby/1.8/timeout.rb:53:in
timeout'
/usr/lib/ruby/1.8/timeout.rb:93:in timeout'
/usr/lib/ruby/1.8/net/http.rb:560:in
connect'
/usr/lib/ruby/1.8/net/http.rb:553:in do_start'
/usr/lib/ruby/1.8/net/http.rb:542:in
start'
/usr/lib/ruby/1.8/net/http.rb:379:in get_response'
app/controllers/piwik_charts_controller.rb:195:in
make_graph'
It works perfect when I make call from an application running on HTTP.
Please advise.
Thanks, Imran
© Stack Overflow or respective owner