Skip to content

Instantly share code, notes, and snippets.

Created March 6, 2014 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/9394738 to your computer and use it in GitHub Desktop.
Save anonymous/9394738 to your computer and use it in GitHub Desktop.
jruby openssl issue
NameError: uninitialized constant OpenSSL::Digest::OPENSSL_VERSION_NUMBER
const_missing at org/jruby/RubyModule.java:2690
Digest at /home/christian/install/jruby-1.7.11/lib/ruby/gems/shared/gems/jruby-openssl-0.9.3/lib/jopenssl19/openssl/digest.rb:25
OpenSSL at /home/christian/install/jruby-1.7.11/lib/ruby/gems/shared/gems/jruby-openssl-0.9.3/lib/jopenssl19/openssl/digest.rb:22
(root) at /home/christian/install/jruby-1.7.11/lib/ruby/gems/shared/gems/jruby-openssl-0.9.3/lib/jopenssl19/openssl/digest.rb:21
load at org/jruby/RubyKernel.java:1101
(root) at /home/christian/install/jruby-1.7.11/lib/ruby/gems/shared/gems/jruby-openssl-0.9.3/lib/openssl/digest.rb:1
require at org/jruby/RubyKernel.java:1085
(root) at /home/christian/install/jruby-1.7.11/lib/ruby/gems/shared/gems/jruby-openssl-0.9.3/lib/openssl/digest.rb:3
load at org/jruby/RubyKernel.java:1101
(root) at /home/christian/install/jruby-1.7.11/lib/ruby/gems/shared/gems/jruby-openssl-0.9.3/lib/jopenssl19/openssl.rb:1
(root) at /home/christian/install/jruby-1.7.11/lib/ruby/gems/shared/gems/jruby-openssl-0.9.3/lib/jopenssl19/openssl.rb:20
require at org/jruby/RubyKernel.java:1085
(root) at /home/christian/install/jruby-1.7.11/lib/ruby/gems/shared/gems/jruby-openssl-0.9.3/lib/openssl.rb:1
each at org/jruby/RubyArray.java:1613
(root) at /home/christian/install/jruby-1.7.11/lib/ruby/gems/shared/gems/jruby-openssl-0.9.3/lib/openssl.rb:20
each at org/jruby/RubyArray.java:1613
(root) at /home/christian/install/jruby-1.7.11/lib/ruby/gems/shared/gems/jruby-openssl-0.9.3/lib/jruby-openssl.rb:1
(root) at /home/christian/install/jruby-1.7.11/lib/ruby/gems/shared/gems/jruby-openssl-0.9.3/lib/jruby-openssl.rb:20
(root) at -e:1
source 'https://rubygems.org'
gem 'krypt'
gem 'jruby-openssl', '0.9.3'
gem 'bouncy-castle-java'
export GEM_HOME=rubygems
export GEM_PATH=rubygems
jruby -S gem install jruby-openssl -v '0.9.3'
jruby -S gem install krypt
jruby -S gem install bouncy-castle-java
jruby -S gem install bundler
# using the Gemfile see other file here
jruby -S bundle install
# works
jruby -S bundle exec jruby -e 'require "openssl";Bundler.require;require "openssl"'
# fails
jruby -S bundle exec jruby -e 'Bundler.require;require "openssl"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment