這裏是我的代碼:Ruby on Rails的網:: HTTP USE_SSL拋出 '未定義的方法'
sock = Net::HTTP.new(url.host, url.port)
sock.use_ssl = true
response = sock.start {|http| http.request(req)}
這裏的錯誤:
undefined method `use_ssl=' for #<Net::HTTP www.paypal.com:443 open=false>
谷歌正在我什麼!
謝謝。
你對這個網絡的任何進一步的信息:: HTTPS包。唯一的信息我可以找到建議我的代碼實際上是正確的設置Net :: HTTP使用HTTPS ...例如。 http://perfectionlabstips.wordpress.com/2008/11/03/how-to-open-a-https-session-in-ruby/ – Chris 2010-09-26 01:21:48
@Chris - 我真的沒有更多的信息。如果你看看ruby-library文檔,他們會發現你正在閱讀的博客是不正確的。 – 2010-09-26 01:24:50
反正什麼是ssl?服務器如何需要它? – Jwan622 2017-02-27 17:05:43