NameError: uninitialized constant Krypt::Provider::JDK

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.

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