“坏点"在 OSX Mountain Lion 上安装新的 RVM Ruby 1.9.3 时出现 SSL 错误

“坏点

问题描述:

尝试使用 Ruby 1.9.3 &rest-client 发出 https 请求,例如:

Trying to use Ruby 1.9.3 & rest-client to make https requests like:

RestClient.get('https://google.com')

总是给我一个 SSL 错误,

always gives me a SSL error,

OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server key exchange B: bad ecpoint

我无法弄清楚.坏生态点?

我在 1.9.3 和 1.9.3 中提出相同的请求没有任何问题rest-client 在另一台 Mountain Lion 机器上.

I've had no trouble making the same request with 1.9.3 & rest-client on another Mountain Lion machine.

关于这台机器的注意事项:MacBook pro 安装了全新的 Mountain Lion,我最初在通过 XCode 命令行工具安装 gcc-4.2 时遇到了一些麻烦,但最终通过 homebrew/dupes.我已经卸载 &从那时起重新安装了 RVM 和 1.9.3.

Notes about this machine: MacBook pro with fresh Mountain Lion install, where I originally had some trouble installing gcc-4.2 via the XCode command line tools, but eventually got gcc-4.2 via homebrew/dupes. I've uninstalled & reinstalled RVM and 1.9.3 since then.

解释我的评论...

将 RVM 更新到最新的开发版本(但 stable 应该也可以):

Update RVM to latest development version (but stable should work too):

rvm get head

为 ruby​​ 安装所有必需的库(autolibs=4 用于完全自动化):

Install all required libraries for ruby (autolibs=4 is for full automation):

rvm --autolibs=4 --debug requirements

最后重新安装ruby:

Finally reinstall ruby:

rvm reinstall 1.9.3

您可以在 RVM 中为下一个命令启用完整的库自动化:

You can enable full library automation within RVM for next commands with:

rvm autolibs enable