I have tried deploying geminabox using jRuby interpreter and Puma webserver. My current lib contains about 50 gems. When bundler tries to fetch index (http://gemserver/specs.4.8.gz) I get following exception (http 500):
Gem::RemoteFetcher::FetchError: bad response Internal Server Error 500 (http://gemserver/specs.4.8.gz)
Java::JavaLang::ArrayIndexOutOfBoundsException at /specs.4.8.gz
file: org.jruby.util.IOInputStream.read(IOInputStream.java location: nil line: 128
I ran into the same thing, and it appears to be an issue with JRuby.
Upgrading to jruby-1.7.17 fixed it for me, so perhaps we can close this issue?
In jruby-1.7.17 they upgraded the zlib dependency as part of issue 2169, which includes a fix for an ArrayIndexOutOfBoundsException issue, so I'm guessing that's what resolved it.