I will often force compilation of the code with jruby.compile.mode=FORCE
, as the compiled code will have the Ruby names and line numbers in the stack traces. This makes things generally slower, so I don't leave it on all the time.
As of JRuby 1.7.10, try setting jruby.rewrite.java.trace
to true.
EDIT
From that same Twitter discussion, another idea is to use
rescue NativeException
raise
end
Which might also help. Of course, you have to know about where the exception occurs, but it should help in a pinch.