jruby/jruby-debug

binding.pry or debugger call from rails contoller leads to .IncompatibleClassChangeError

dre-hh opened this issue · 2 comments

When using a simply script ...

require 'rubygems'
require 'pry'

x = true
binding.pry

... everything works fine and you enter a pry session. But when calling the same from
a rails controller, following error occurs.

java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
at jline.TerminalFactory.create(TerminalFactory.java:101)

jruby -v
jruby 1.7.6 (1.9.3p392) 2013-10-22 6004147 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_45-b18 [darwin-x86_64]

This is due to some library (perhaps pry) shipping its own out-of-date copy of jline. We can't fix this in jruby-debug.

Thanks for pointing that out. Seems to be, as if the problem is caused by the neo4j.rb gem, which is bundling the neo4j database, which is using jline for a commandline access in turn.

If you have any suggestions how to include the default jruby version after requiring that gem, i will be glad to hear them.