tomcatjrubypadrinowarbler

NoMethod Error "join" on JRuby Padrino application on Tomcat 8


This one is really confounding me. I have a web application, written in JRuby, and compiled with Warbler. When I try to host the Warbled file in Tomcat, I constantly get a 500 Internal Server Error for

(NoMethodError) undefined method `join' for #<String:0x2bb320a>

When I run the native Padrino web server on the source code, the application boots and operates perfectly. Tomcat logs are giving literally nothing, the Error 500s aren't even showing up.

My Gemfile is :

# source
source 'https://rubygems.org'
source 'http://gems.github.com'

# ruby
ruby '1.9.3', engine: 'jruby', engine_version: '1.7.18'

# gems
gem 'padrino'
gem 'padrino-flash'
gem 'dbi'
gem 'haml'
gem 'sass'
gem 'tilt'
gem 'rake'
gem 'rubyzip', '<1.0.0'
gem 'dberkom-sinatra-prawn'
gem 'sinatra-flash', require: 'sinatra/flash'
gem 'jruby-openssl'
gem 'jruby-rack'
gem 'jdbc-jtds', '~> 1.3.0.1'
gem 'dbd-jdbc', '~> 0.1.6'
gem 'bcrypt'
gem 'iso_country_codes'
gem 'prawn', '~> 1.2.1'
gem 'prawn-table', '~> 0.1.0'
gem 'jruby-jars', '1.7.18'

group :development do
  gem 'guard'
  gem 'guard-livereload'
end

I have an old WAR, built on an older version of Jruby that does work, so I think it may be a bug, due to one of the gems no longer playing nice.


Solution

  • This is an issue with Rack. Version 1.6.0 at the time of writing is causing errors with Sinatra based applications. Use an older gem until this is confirmed resolved.