I’m trying to get jruby-rack and camping running together. My test
application lives in lib/demo.rb (named Demo). Setting the rackup script
to
“run Rack::Adapter::Camping.new(Demo)” raises an exception that Demo
cannot
be found. I suppose the file isn’t "require"d anywhere.
How to I configure warbler/jruby-rack to require my app file?
Actually it turns out that the require works in 0.9. I just wasn’t aware
of
being able to use require in the rackup script. This should definatly be
on
the wiki page.
I haven’t tested using the camping gem with the trunk version (no time
yet),
copying the gems to lib worked however. Also there seems to be a glitch
handling rack’s enviroment. See JRUBY-2859.
Right now everything seems to work using the patched camping adapter.
I’ll
investigate further after showing off camping on tomcat during my
presentation tomorrow
I’m trying to get jruby-rack and camping running together. My test
application lives in lib/demo.rb (named Demo). Setting the rackup script to
“run Rack::Adapter::Camping.new(Demo)” raises an exception that Demo cannot
be found. I suppose the file isn’t "require"d anywhere.
How to I configure warbler/jruby-rack to require my app file?
Hi Robert, I think you’re headed in the right direction, the problem
right now is that “lib” isn’t put on the load path. JRuby-Rack 0.9
unfortunately won’t help you, but I fixed an issue in the trunk
version that should be out soon that will allow you to assume that
WEB-INF is the current directory while you’re loading, so you could do
something like:
require ‘./lib/demo’
run Rack::Adapter::Camping.new(Demo)