Rails will not start under JRuby with Java 8 unless you either download and add some JARs from a ZIP (from Oracle) file or add the following initializer:
ifRUBY_PLATFORM == 'java'# Allows the application to work with other Rubies if not JRubyrequire'java'java_import'java.lang.ClassNotFoundException'beginsecurity_class=java.lang.Class.for_name('javax.crypto.JceSecurity')restricted_field=security_class.get_declared_field('isRestricted')restricted_field.accessible=truerestricted_field.setnil,falserescueClassNotFoundException=>e# Handle Mac Java, etc not having this configuration setting
$stderr.print"Java told me: #{e}n"endend
Adding the initializer should be done by the JRuby Rails template.
The text was updated successfully, but these errors were encountered:
I personally would love to do this in JRuby's own bootstrap code, but I have to wonder what sort of trouble we'd get into explicitly routing around the crypto restrictions. DMCA?
Rails will not start under JRuby with Java 8 unless you either download and add some JARs from a ZIP (from Oracle) file or add the following initializer:
Adding the initializer should be done by the JRuby Rails template.
The text was updated successfully, but these errors were encountered: