Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DirectJRubyEmbedding OpenSSL does not load #493

Closed
venkatrangan opened this issue Jan 12, 2013 · 3 comments
Closed

DirectJRubyEmbedding OpenSSL does not load #493

venkatrangan opened this issue Jan 12, 2013 · 3 comments

Comments

@venkatrangan
Copy link

I'm attempting to use DirectJRubyEmbedding and one of the required ruby modules is active_support. It loads 'securerandom' which then loads 'openssl'

Within openssl, digest.rb has a rederence to this.

Attempting to use OpenSSL gem causes the following error:

uninitialized constant OpenSSL::Digest::OPENSSL_VERSION_NUMBER

at org.jruby.RubyModule.const_missing(org/jruby/RubyModule.java:2677)
at RUBY.Digest(/Users/v/.rvm/gems/ruby-1.9.3-p125/gems/jruby-openssl-0.8.2/lib/1.9/openssl/digest.rb:24)
at RUBY.OpenSSL(/Users/v/.rvm/gems/ruby-1.9.3-p125/gems/jruby-openssl-0.8.2/lib/1.9/openssl/digest.rb:22)
at RUBY.(root)(/Users/v/.rvm/gems/ruby-1.9.3-p125/gems/jruby-openssl-0.8.2/lib/1.9/openssl/digest.rb:21)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at RUBY.(root)(/Users/v/.rvm/gems/ruby-1.9.3-p125/gems/jruby-openssl-0.8.2/lib/1.9/openssl.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at RUBY.(root)(/Users/v/.rvm/gems/ruby-1.9.3-p125/gems/jruby-openssl-0.8.2/lib/1.9/openssl.rb:20)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at RUBY.(root)(/Users/v/.rvm/rubies/jruby-1.6.7.2/lib/ruby/1.9/securerandom.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at RUBY.(root)(/Users/v/.rvm/rubies/jruby-1.6.7.2/lib/ruby/1.9/securerandom.rb:37)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at RUBY.(root)(/Users/v/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.9/lib/active_support.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at RUBY.(root)(/Users/v/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.9/lib/active_support.rb:24)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at RUBY.(root)(/Users/v/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.9/lib/active_support/all.rb:1)

I am using Ruby 1.9.3-p125 with openssl 0.8.2 as seen in the following gem load.

.rvm/gems/ruby-1.9.3-p125/gems/jruby-openssl-0.8.2/lib/1.9

I noticed that the jirb shows:

1.9.3-p125 :004 > OpenSSL::OPENSSL_VERSION_NUMBER
=> 9469999

So, it looks like the java compiled classes in JRuby.jar defines it in the OpenSSL module, but the code in .rb file is unable to find it.

Any help would be much appreciated.

Thanks

@mkristian
Copy link
Member

without any jruby and jruby-openssl I get the following:

$ ruby -ropenssl -e "p OpenSSL::OPENSSL_VERSION_NUMBER"
268435551
$ ruby -ropenssl -e "p OpenSSL::Digest::OPENSSL_VERSION_NUMBER"
-e:1:in `

': uninitialized constant
OpenSSL::Digest::OPENSSL_VERSION_NUMBER (NameError)
$ ruby --version
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]

so I only see that some library tries to load some constant which does not
exists. maybe I miss something or you miss a gem or so.

  • Christian

@BanzaiMan
Copy link
Member

@yokolet can correct me if I'm wrong, but I don't think we are supporting DirectJRubyEmbedding for embedding any more. Please use RedBridge (https://github.com/jruby/jruby/wiki/RedBridge) instead.

@kares
Copy link
Member

kares commented Mar 20, 2015

this bug is obsolete with recent JRuby >= 1.7.16 and jruby-openssl ... correct me otherwise

@kares kares closed this as completed Mar 20, 2015
@enebo enebo added this to the Invalid or Duplicate milestone Apr 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants