JRuby OpenSSL 错误
我在配置 JRuby 使其与 OpenSSL 一起正常工作时遇到问题。谷歌搜索显示这是一种非常常见的情况,但我读过的解决方案都不适合我。这是我的设置:
- Ubuntu 9.10
- jruby 1.5.1
- jruby-openssl (0.7)
这是错误:
irb(main):001:0> require 'jruby/openssl/gem_only'
=> true
irb(main):002:0> require 'openssl'
=> true
irb(main):003:0> OpenSSL::Digest::OPENSSL_VERSION_NUMBER
NameError: uninitialized constant OpenSSL::Digest::OPENSSL_VERSION_NUMBER
有趣的是,即使我没有安装 jruby-openssl gem, require 'openssl'
返回 true 。根据 此链接,这不应该发生吗?
尝试使用 require 'rubygems'
和 gem 'jruby-openssl'
显式加载 gem 没有帮助。
I am having problems configuring JRuby to work properly with OpenSSL. Googling has revealed that this is a pretty common occurence, but none of the solutions I've read have worked for me. Here is my setup:
- Ubuntu 9.10
- jruby 1.5.1
- jruby-openssl (0.7)
Here is the error:
irb(main):001:0> require 'jruby/openssl/gem_only'
=> true
irb(main):002:0> require 'openssl'
=> true
irb(main):003:0> OpenSSL::Digest::OPENSSL_VERSION_NUMBER
NameError: uninitialized constant OpenSSL::Digest::OPENSSL_VERSION_NUMBER
Interestingly, require 'openssl'
returns true even if I don't have the jruby-openssl gem installed. According to this link, that shouldn't happen?
Trying to load the gem explictly with require 'rubygems'
and gem 'jruby-openssl'
doesn't help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您确定您正在寻找正确的常数吗?
Are you sure you are looking at the right constant?