neo4jrb / neo4j-community

7 stars 9 forks source link

debugger or binding.pry call leads to IncompatibleClassChangeError on jruby > 1.7.4 #10

Open dre-hh opened 10 years ago

dre-hh commented 10 years ago

Pry and Debugger do work, when calling a simple Ruby script. Also can enter pry from rails console and if pry-rails installed rails console boots into pry session by default. But when calling binding.pry or debugger call from rails contoller, following error occurs:

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

After further investigations and asking on the jruby issue list, it seems to be that the problem is caused by neo4j using another version of jline as provided with default jruby. I suppose, it's the neo4j.shell-1.9.3.jar.

So the question is, can we remove the shell fuctionality out of the neo4j.rb gem. A rubyist does already have his irb or pry and neo4j.rb provides already all the api's to query the database on that low level.

Jruby Version: 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]

rails (4.0.0) pry (0.9.12.2) pry-rails (0.3.2) ruby-debug (0.10.4) ruby-debug-base (0.10.4 java) neo4j (2.3.0) from git://github.com/andreasronge/neo4j.git (at rails4)

andreasronge commented 10 years ago

Yes, I think it sounds like a good idea to remove the neo4j shell jar. Maybe there is not even an alternative if we want to get it working.