Stdlib in JRuby

Hi all,

I’ve got JRuby installed via RVM and am trying to use some of the
in stdlib (specifically Ripper), but it’s failing like so:

rvm use jruby-1.6.7
Using /Users/bploetz/.rvm/gems/jruby-1.6.7

export JRUBY_OPTS=–1.9

jruby-1.6.7 :001 > RUBY_VERSION
=> “1.9.2”
jruby-1.6.7 :002 > require ‘ripper’
LoadError: no such file to load – ripper
from org/jruby/ require' from /Users/bploetz/.rvm/rubies/jruby-1.6.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in require’
(root)' from org/jruby/ require’
require' from /Users/bploetz/.rvm/rubies/jruby-1.6.7/lib/ruby/1.9/ripper.rb:1:in (root)’
from org/jruby/ require' from /Users/bploetz/.rvm/rubies/jruby-1.6.7/lib/ruby/1.9/ripper.rb:36:in require’
from (irb):2:in evaluate' from org/jruby/ eval’
from org/jruby/ loop' from org/jruby/ catch’
from org/jruby/ catch' from /Users/bploetz/.rvm/rubies/jruby-1.6.7/bin/irb:17:in (root)’

Note that there does appear to be ruby files for Ripper in the JRuby
install (/Users/bploetz/.rvm/rubies/jruby-1.6.7/lib/ruby/1.9/ripper.rb,
etc), but it’s failing on this line in ripper/core.rb:

require ‘’

I searched and couldn’t find this shared object anywhere. So my question
is, should Ripper in fact work in JRuby and the fact that this .so
exist is a symptom of something going wrong when installing JRuby via
(or perhaps there’s somthing else I need to install)? Or is Ripper not
supported on JRuby? I checked
Ruby1_9Support · jruby/jruby Wiki · GitHub and didn’t see any
mention of Ripper.


Ripper is an MRI syntax analyzer and it doesn’t work with JRuby.

Thanks Hirotsugu. Is there a JRuby-specific lexer/parser available that
could use instead? I stumbled upon this…

…but I can’t seem to find official documentation for the JRuby
module/class and how it works.