Your opinion matters! Please fill in the InfoQ Survey!

JRuby ports of Ruby/LDAP, ruby-debug

| by Werner Schuster Follow 4 Followers on Oct 10, 2007. Estimated reading time: 1 minute |

A note to our readers: As per your request we have developed a set of features that allow you to reduce the noise, while not losing sight of anything that is important. Get email and web notifications by choosing the topics you are interested in.

Many Ruby libraries, implemented using native extensions, are not usable with JRuby since it doesn't support native extensions. In the jruby-extras project, JRuby ports of these libraries are collected.

Ola Bini just added another port of Ruby/LDAP called JRuby/LDAP. The JRuby version is built using the LDAP libraries shipped with Java and can be configured with the properties of Java LDAP. Installation is simple by using the Ruby Gems package system:
jruby -S gem install jruby-ldap 

Another of JRuby's missing pieces is being worked on right now: fast debugging. Other Ruby implementations already have this in various states of completeness. Ruby 1.8.x has ruby-debug, which uses native extensions to speed up debugging. An alternative is Sapphire Steel's Cylon debugger. Rubinius has fast debugging using special bytecodes at runtime.

JRuby currently only uses the set_trace_func method of debugging. set_trace_func allows to set Ruby callback function or Proc, which is invoked every time a line of Ruby code is executed. This obviously slows down execution of code during debugging.

Now, a JRuby version of ruby-debug is in the works. Recently a milestone was reached: a first running version was packaged as a Ruby Gem; the project is hosted in the debug-commons project at RubyForge.  Currently debugging in JRuby means using a set_trace_func based implementation written in Ruby.  jruby-debug uses a similar approach, but the code is written in Java, which should improve performance significantly by avoiding the execution of multiple lines of Ruby debugger code for every line of debugged Ruby code.

It's important to note, that at this time, the project is at an early state and not complete at all, but this is a promising start.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread


Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you