Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Problem building a war of a new project using JRuby 1.7.0 complete jar #121

marktriggs opened this Issue · 3 comments

2 participants


Hi there,

I'm having a bit of trouble creating a war file for a simple Sinatra-based webapp. I'm using the jruby-complete 1.7.0 jar, and my issue seems to relate to the JRuby jar shipping with rake. This seems to prevent bundler from unpacking the rake gem, which causes Warbler to bomb out when building its .war file.

Here's my self-contained test that reproduces what I'm seeing:

 (mst@thweeble) ~$ mkdir warbler-test

 (mst@thweeble) ~$ cd warbler-test

 (mst@thweeble) ~/warbler-test$ wget                                                 --2012-11-08 15:42:26--
 Connecting to||:80... connected.
 HTTP request sent, awaiting response... 200 OK
 Length: 18833620 (18M) [application/java-archive]
 Saving to: `jruby-complete-1.7.0.jar'

 100%[=====================================================================================================================>] 18,833,620   713K/s   in 28s

 2012-11-08 15:42:55 (661 KB/s) - `jruby-complete-1.7.0.jar' saved [18833620/18833620]

 (mst@thweeble) ~/warbler-test$ export GEM_HOME=$PWD/local_gems

 (mst@thweeble) ~/warbler-test$ java -cp 'jruby-complete-1.7.0.jar' org.jruby.Main --1.9 -S gem install bundler
 Fetching: bundler-1.2.1.gem (100%)
 Successfully installed bundler-1.2.1
 1 gem installed
 (mst@thweeble) ~/warbler-test$ cat > Gemfile
 source ""

 gem "warbler"

 (mst@thweeble) ~/warbler-test$ java -cp 'jruby-complete-1.7.0.jar' org.jruby.Main --1.9 local_gems/bin/bundle install
 Fetching gem metadata from
 Using rake (
 Installing jruby-jars (1.7.0)
 Installing jruby-rack (1.1.10)
 Installing rubyzip (0.9.9)
 Installing warbler (1.3.6)
 Using bundler (1.2.1)
 Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

 (mst@thweeble) ~/warbler-test$ touch                                                                   

 (mst@thweeble) ~/warbler-test$ java -cp 'jruby-complete-1.7.0.jar' org.jruby.Main --1.9 local_gems/bin/warble war
 rm -f warbler-test.war
 Creating warbler-test.war
 warble aborted!
 entry 'META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-' not found in

 Tasks: TOP => war:jar
 (See full trace by running task with --trace)

Am I misunderstanding how this should work? Let me know if I can provide any further information.

Many thanks,



Ah, a little more digging suggests that this might just be an issue with the trailing slash. It's looking for the string:


but the call to getName in entryInJar returns:


Stripping off that slash before doing the comparison does the trick for me. Happy to send a pull request if that sounds right.




@marktriggs please send a PR and I will review it :+1:


Sent as #122. Thanks Guillermo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.