Emacs inf-ruby证书验证失败

时间:2015-02-08 05:00:17

标签: ruby emacs

我尝试执行HTTPS请求,但在Emacs inf-ruby模式下失败。但它适用于bash命令行。

irb(main):001:0> load ('./get-email-request.rb')
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
    from /usr/lib/ruby/1.9.1/net/http.rb:800:in `connect'
    from /usr/lib/ruby/1.9.1/net/http.rb:800:in `block in connect'
    from /usr/lib/ruby/1.9.1/timeout.rb:55:in `timeout'
    from /usr/lib/ruby/1.9.1/timeout.rb:100:in `timeout'
    from /usr/lib/ruby/1.9.1/net/http.rb:800:in `connect'
    from /usr/lib/ruby/1.9.1/net/http.rb:756:in `do_start'
    from /usr/lib/ruby/1.9.1/net/http.rb:745:in `start'
    from /usr/lib/ruby/1.9.1/net/http.rb:1285:in `request'
    from /home/jyuan/projects/opensources/eloqua-ruby-request/eloqua-ruby-request.rb:52:in `request'
    from /home/jyuan/projects/opensources/eloqua-ruby-request/eloqua-ruby-request.rb:31:in `get'
    from /home/jyuan/projects/opensources/eloqua-ruby-request/examples/get-email-request.rb:10:in `<top (required)>'
    from (irb):9:in `load'
    from (irb):9
    from /usr/bin/irb:12:in `<main>'

ruby​​配置为https://github.com/bbatsov/prelude/blob/master/modules/prelude-ruby.el

之前有人遇到过这个吗?

1 个答案:

答案 0 :(得分:0)

添加此代码后效果很好。 https://github.com/senny/rvm.el