gpt4 book ai didi

ruby-on-rails - 使用 Evernote API(Mac、El Capitan)的 Ruby SSL 错误

转载 作者:太空宇宙 更新时间:2023-11-03 14:49:35 25 4
gpt4 key购买 nike

试图获得 the basic ruby Evernote client app工作。

我得到了 my developer token并遵循示例应用中的自述文件。

  1. Open sample/client/EDAMTest.rb

  2. Scroll down and fill in your Evernote developer token.

  3. On the command line, run the following command to execute the script:

    ruby EDAMTest.rb

简单。但是我收到了这个 SSL 错误。

/Users/james/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/net/http.rb:923:in `connect': SSL_connect returned=1 errno=0 state=SSLv3读取服务器证书 B:证书验证失败(OpenSSL::SSL::SSLError)

用 brew 和 rvm 尝试了一些东西。

$ rvm osx-ssl-certs status all                
> Certificates for /usr/local/etc/openssl/cert.pem: Up to date.
> Certificates for /etc/openssl/cert.pem: Up to date.

完整跟踪。

/Users/james/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/net/http.rb:923:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
from /Users/james/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/net/http.rb:923:in `block in connect'
from /Users/james/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/timeout.rb:73:in `timeout'
from /Users/james/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/net/http.rb:923:in `connect'
from /Users/james/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/net/http.rb:863:in `do_start'
from /Users/james/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/net/http.rb:852:in `start'
from /Users/james/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/net/http.rb:1375:in `request'
from /Users/james/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/net/http.rb:1398:in `send_entity'
from /Users/james/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/net/http.rb:1186:in `post'
from /Users/james/.rvm/gems/ruby-2.2.3/gems/evernote-thrift-1.25.1/lib/thrift/transport/http_client_transport.rb:58:in `flush'
from /Users/james/.rvm/gems/ruby-2.2.3/gems/evernote-thrift-1.25.1/lib/thrift/client.rb:41:in `send_message'
from /Users/james/.rvm/gems/ruby-2.2.3/gems/evernote-thrift-1.25.1/lib/Evernote/EDAM/user_store.rb:23:in `send_checkVersion'
from /Users/james/.rvm/gems/ruby-2.2.3/gems/evernote-thrift-1.25.1/lib/Evernote/EDAM/user_store.rb:18:in `checkVersion'
from sample/client/EDAMTest.rb:39:in `<main>'

最佳答案

我最终通过关闭验证来修补它。

OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE

仍然愿意接受任何更好的想法。

关于ruby-on-rails - 使用 Evernote API(Mac、El Capitan)的 Ruby SSL 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35678356/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com