Forum: JRuby NameError: uninitialized constant Krypt::Provider::JDK

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C56d14d32eddc6e2bd6364bc2ebbf542?d=identicon&s=25 Andy Joel (f2andy)
on 2015-01-09 09:12
Last night I had to restart my server (Windows Server 2011 SBS), and my
Rails application failed to start up. In the logs I found this error:

NameError: uninitialized constant Krypt::Provider::JDK

What is odd here is that I last restarted the server on December 18th,
and the Rails application started up fine. I have done nothing to it in
between times. It was the same .war file, with the same gems packaged
with it (also same database and Tomcat). As far as I know, everything
was identical (it is possible Java updated in that time, but I do not
think so).

The issue apparently is that two vital gems are no longer included in
JRuby (if they are vital, why are they not included?). I am using
jruby-jars version 1.7.13 by the way. For anyone else who has this
issue, I fixed the problem like this:

In my gem file:

gem 'krypt-core'
gem 'krypt-provider-jdk'


Then do:

gem install krypt-core
gem install krypt-provider-jdk
bundle install
warble

This may be common knowledge, but I found precious little when Googling.
B05d3cbc64b0031a24c2887fb6ddc173?d=identicon&s=25 christian (Guest)
on 2015-01-09 11:41
(Received via mailing list)
hmm, those krypt gems are part of jruby-jars. sounds more like jruby
does
not find the embedded gems from jruby. since most likely we switch to
jruby-openssl-0.9.6 for the next jruby release those krypt gems are not
needed anymore.

in case you want to debug the loading of those gems the system property
jruby.debug.loadService=true will help to see what is failing.

-christian
This topic is locked and can not be replied to.