Warbler's executable war in --1.9 mode excepts on startup

I’ve got a relatively simple sinatra app that I’m trying to package up
with warbler (1.2.1) as an executable war under jruby-1.5.6. I need some
1.9
language features, so I’ve set:

config.webxml.jruby.compat.version = "1.9"

However, when I try to run the app with java -jar <warname>.war, it
throws exceptions which make me wonder if something is getting left out:

org.jruby.rack.RackInitializationException: no such file to load --

erb
from
file:/tmp/winstone3460690740511003941webroot/sugarmod.war/WEB-INF/lib/jruby-rack-1.0.5.jar!/vendor/rack-1.2.1/rack/showstatus.rb:1
from
file:/tmp/winstone3460690740511003941webroot/sugarmod.war/WEB-INF/lib/jruby-rack-1.0.5.jar!/vendor/rack-1.2.1/rack/showstatus.rb:61:in
new' from file:/tmp/winstone3460690740511003941webroot/sugarmod.war/WEB-INF/lib/jruby-rack-1.0.5.jar!/vendor/rack-1.2.1/rack/builder.rb:46:ininstance_eval’
from
file:/tmp/winstone3460690740511003941webroot/sugarmod.war/WEB-INF/lib/jruby-rack-1.0.5.jar!/vendor/rack-1.2.1/rack/builder.rb:46:in
initialize' from file:/tmp/winstone3460690740511003941webroot/sugarmod.war/WEB-INF/lib/jruby-rack-1.0.5.jar!/jruby/rack/errors.rb:60:innew’
from
file:/tmp/winstone3460690740511003941webroot/sugarmod.war/WEB-INF/lib/jruby-rack-1.0.5.jar!/jruby/rack/errors.rb:60:in
`new’
from /WEB-INF/config.ru:1

and

Caused by: org.jruby.rack.RackInitializationException: no such file

to load – fileutils
from
/tmp/winstone3460690740511003941webroot/sugarmod.war/WEB-INF/lib/sugarmod.rb:1
from
/tmp/winstone3460690740511003941webroot/sugarmod.war/WEB-INF/lib/sugarmod.rb:5:in
`require’
from /WEB-INF/config.ru:5

I suspect that because warble executable war includes a
jruby-stdlib-1.5.6.jar which only includes a lib/1.8 tree, it’s not able
to find the basics.

What’s the correct way to fix this? My config/warble.rb is unmodified
from that generated by warble config other than the above change. I’ve
tried throwing jruby-complete.jar in lib/, but this doesn’t help.

If I leave jruby in 1.8 mode, the app starts fine - until it hits my
1.9-feature-required spot, of course.

Any clues?


Alex

On Wed, Jan 19, 2011 at 8:04 PM, Alex Y. [email protected]
wrote:

org.jruby.rack.RackInitializationException: no such file to load –

file:/tmp/winstone3460690740511003941webroot/sugarmod.war/WEB-INF/lib/jruby-rack-1.0.5.jar!/vendor/rack-1.2.1/rack/builder.rb:46:in

and

1.9-feature-required spot, of course.

Any clues?

I think you’ll be better off with JRuby 1.6 (currently 1.6.0.RC1). I
suspect the 1.5 series doesn’t have the 1.9 stdlib in the released jar
files.

/Nick