我在 ubuntu 上遇到错误,但在 mac 上工作
但是如果我在 ubuntu 上运行 curl 命令,它就可以工作。遏制是一个有缺陷的宝石吗?
2.1.0/gems/curb-0.8.6/lib/curl/easy.rb:72:in `perform': SSL peer certificate or SSH remote key was not OK (Curl::Err::SSLPeerCertificateError)
红宝石
resp = Curl::Easy.http_post(server_url, content_to_send) do |curl|
curl.ssl_verify_peer = false
curl.headers = header.clone
end
细节
/home/poc/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/curb-0.8.6/lib/curl/easy.rb:72:in `perform': SSL peer certificate or SSH remote key was not OK (Curl::Err::SSLPeerCertificateError)
from /home/poc/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/curb-0.8.6/lib/curl/easy.rb:398:in `http_post'
from /home/poc/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/curb-0.8.6/lib/curl/easy.rb:398:in `http_post'
from curb.rb:12:in `curl_query'
from curb.rb:21:in `<main>'