Skip to content

Instantly share code, notes, and snippets.

@napcs
Created June 10, 2011 02:51
Show Gist options
  • Save napcs/1018160 to your computer and use it in GitHub Desktop.
Save napcs/1018160 to your computer and use it in GitHub Desktop.
warbler + sinatra problem
reproducable warbler issue. Change the public directory in lib/server.rb to someplace with jquery.min.js in it and serve it.
Under JRuby with
rackup config.ru
everything works great.
But with
jruby -S warble executable war
and then running with java -jar warname.war
when I visit http://localhost:8080/jquery.min.js
It truncates for me with safari, ff, chrome, and curl. I'm extremely lost.
require 'rubygems'
require 'lib/server'
set :run, false
run Sinatra::Application
source :rubygems
gem 'sinatra', '1.2.3'
gem 'tilt', "1.3"
gem 'rack', "1.2.2"
gem 'sinatra-respond_to', '0.7.0'
## THIS MUST BE IN lib/server.rb BUT GIST WON'T LET ME PUT IT THERE!
require 'bundler/setup'
require 'fileutils'
require 'sinatra'
#Sinatra::Application.register Sinatra::RespondTo
set :public, "/Users/brianhogan/oss/files"
get "/" do
puts "hai there."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment