I am trying to create a simple executable war file using sinatra and warble. I have a simple lib/app.rb file with:
require 'rubygems'
require 'sinatra'
class Hiwar < Sinatra::Application
get '/' do
body "Hi!"
end
end
a config.ru file with:
require 'rubygems'
require 'lib/app'
run Hiwar.new
and a config/warble.rb file with:
Warbler::Config.new do |config|
config.dirs = %w(config lib)
config.gems += ["sinatra","rack","rack-protection","tilt","jruby-openssl"]
end
When I execute:
$ warble executable war
I obtain:
warble aborted!
Zip end of central directory signature not found
Tasks: TOP => war:files
(See full trace by running task with --trace)
I have seen that if I remove the gem "jruby-openssl" from the list, it does not complain and creates the war file, but when I execute it, it raises a 500 error:
undefined method `ssl?' for class `Sinatra::Request'
Is there a simpler way to generate an executable jar with sinatra?