views:

109

answers:

1

Hi again,

I've been reading through the warbler source code, and I can't figure out how the jruby-jars and jruby-rack jars are meant to end up on the servlet classpath?

It seems warbler is copying them into web-inf/gems/gems/<gemname>/lib/<jarname>.jar but they are not on the classpath.

I'm guessing that if I put them in my ruby apps lib/ folder they would be copied to web-inf/lib and all would be well, however, it seems odd to have 2 copies of the jar in the war file, is that what I am meant to do?

Ben

A: 

They should be copied into WEB-INF/lib/.jar. The code for locating the jars is here:

http://github.com/nicksieger/warbler/blob/master/lib/warbler/config.rb#L216-220

And the code that copies them into WEB-INF/lib is here:

http://github.com/nicksieger/warbler/blob/master/lib/warbler/war.rb#L68-70

If you're seeing something else, then it's a bug. Also, you shouldn't have to explicitly state dependencies on the JRuby jar file gems.

Nick Sieger
Right you are! I found my mistake, I had copied the warble.rb file from an example for GHS deployment and the very last line was clearing java_libs, thus no libs in lib/ :-) Thanks for your help!The broken example was here http://gist.github.com/91801#file_warble.rb
Ben Hogan