I’m hoping someone can help resolve an issue I’m having with deploying a
warble made jar file. I have a jar file that when I deploy it, it is
having
problems find rack. I’m using Rails 3.0.3 with Warbler 1.2.1,
jruby-rack
1.0.4, JRuby 1.5.6. Rack 1.2.1 has been bundled in and is sitting in
the
default packaged path of WEB-INF/gems (with gems & specifications as sub
directories of that).
I’ve tried the following:
Setting both GEM_PATH and GEM_HOME before deployment (OS X 10.5
Server)
Tried setting gem.path in WEB-INF/web.xml (both with and without the
adding the public.root path as a prefix to it… /WEB-INF/gems versus
WEB-INF/gems)
Tried setting the full path
Creating .bundle/config and setting it so it’s pointing at
WEB-INF/gems
I don’t know what else I can do, does any one have any suggestions?
This
happens with both a web application I’ve been working on and a freshly
generated rails. If any more information is required, please let me
know.
Caused by: org.jruby.exceptions.
RaiseException: no such file to load – rack
at
(unknown).new(file:/PATH_TO_TOMCAT_WEBAPP_DIR/WEB-INF/lib/jruby-rack-1.0.4.jar!/vendor/rack.rb:7)
at
Kernel.require(file:/PATH_TO_TOMCAT_WEBAPP_DIR/WEB-INF/lib/jruby-rack-1.0.4.jar!/vendor/rack.rb:7)
at
(unknown).(unknown)(file:/PATH_TO_TOMCAT_WEBAPP_DIR/WEB-INF/lib/jruby-rack-1.0.4.jar!/vendor/rack.rb:28)
at
Kernel.require(file:/PATH_TO_TOMCAT_WEBAPP_DIR/WEB-INF/lib/jruby-rack-1.0.4.jar!/jruby/rack/booter.rb:28)
at
JRuby::Rack::Booter.boot!(file:/PATH_TO_TOMCAT_WEBAPP_DIR/WEB-INF/lib/jruby-rack-1.0.4.jar!/jruby/rack/rails.rb:20)
at
JRuby::Rack::RailsBooter.boot!(file:/PATH_TO_TOMCAT_WEBAPP_DIR/WEB-INF/lib/jruby-rack-1.0.4.jar!/jruby/rack/boot/rack.rb:10)
at
(unknown).(unknown)(file:/PATH_TO_TOMCAT_WEBAPP_DIR/WEB-INF/lib/jruby-rack-1.0.4.jar!/jruby/rack/boot/rack.rb:1)
at
(unknown).(unknown)(file:/PATH_TO_TOMCAT_WEBAPP_DIR/WEB-INF/lib/jruby-rack-1.0.4.jar!/jruby/rack/boot/rack.rb:1)
at Kernel.load(:1)
at (unknown).(unknown)(:1)
`–> gem update
Updating installed gems
Nothing to update
FWIW, my gems get bundled under WEB-INF/gems/gems,
but the simplest fix is probably just to use a top-level Gemfile
and let warbler handle the packaging.
Sounds like everything should be working. Can you set
“jruby.rack.debug.load” as a context parameter inside web.xml? That
should give more details on the error, including dumping out the load
path at the point where the error occurs.
I apologize for the lack of writing back, being sick and vacation will
cause
that from time to time.
I have set the param as Nick asked:
jruby.rack.debug.load
true
It appears I’m now getting the same message as shown here: Issues · nicksieger/jruby-rack · GitHub (Same
exact
error, line numbers and all)
I’ve also switched back to Jruby 1.5.5 as I have spaces in my file name
(and
unfortunately can’t change this).
Using Jruby 1.5.5, if I don’t enable jruby.rack.debug.load, it complains
about not being able to find erb. Enabling it and it complains about
not
finding logger. The load path is:
file:/PATH_TO_TOMCAT_WEBAPP_DIR/WEB-INF/lib/jruby-stdlib-1.5.5.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8
file:/PATH_TO_TOMCAT_WEBAPP_DIR/WEB-INF/lib/jruby-stdlib-1.5.5.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared
file:/PATH_TO_TOMCAT_WEBAPP_DIR/WEB-INF/lib/jruby-stdlib-1.5.5.jar!/META-INF/jruby.home/lib/ruby/1.8
.
Everything appears to be proper. I even went as far as to unzip
jruby-stdlib-1.5.5.jar and saw that the files (erb.rb and logger.rb) are
within the load path. Switching back to Jruby 1.5.6 and it complains
about
not being able to find rack (as before). With the jruby.rack.debug.load
param set to true, it about finding logger (as with jruby 1.5.5). The
only
difference in the load path is that it points to 1.5.6 instead of 1.5.5
and
it uses %20 for a space instead of just a space (as with 1.5.5).
Anything else I can test/attempt? All help is appreciated.
Dec 27, 2010 5:51:29 PM org.apache.catalina.core.ApplicationContext log
The ticket, http://jira.codehaus.org/browse/JRUBY-5281 is showing that
it is
fixed but in my testing, the problem persists. Has anyone had any luck
testing this out and showing that it is actually fixed? I tried with
1.6.0.RC2, verified jruby-jars was at 1.6.0.RC2 as well. I’ve also
tried
jruby-rack 1.0.6.RC1 and compiled it from the latest source. All
continued
to show the same problem.