java.lang.Thread.currentThread.setContextClassLoader( JRuby.runtime.jruby_classloader )
This works but since we have had 2-3 issues opened and we need to give a fairly complex snippet of code (above snippet) I think we should try and add something simpler to use:
require 'jruby'
JRuby.use_jruby_classloader
where:
def self.use_jruby_classloader(thread=java.lang.Thread.currentThread)
end
I spent about 10 seconds coming up with this so it is mostly just an attempt at getting people to think how we can make this simpler. Also do we need to care about more than context classloaders?