I created a simple app to demonstrate my issue.
In this system, I updated the application.rb to allow me to update System properties by adding the lines
require 'java'
include Java
import Java::JavaLang::System
This has no impact when running typical rails tasks like rails server or rails console, but rake tasks fail.
rake java_system:test
results in
rake aborted!
can't convert Class into String
Any ideas on how to get rake working?
Pretty simple solution. Apparently rake defines its own import method which messes with import in jruby. Calling java_import instead fixes the issue!
source