Hi all,
I have spent most of my time lately moving a mri ruby rack app to jruby.
I
have produced a war manually (I could not use warbler because bundler
does
not support the “:path =>” option in gem instruction) with the following
web.xml file:
org.jruby.rack.RackServletContextListener
But when I start Tomcat, I get this error :
org.jruby.rack.RackInitializationException: can’t convert nil into
String
from
file:/var/lib/tomcat6/webapps/mtm_trainer/WEB-INF/lib/jruby-stdlib-1.6.5.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
require' from /var/lib/tomcat6/webapps/mtm_trainer/WEB-INF/./mtm_trainer.rb:3:in
(root)’
from org/jruby/RubyKernel.java:1047:in require' from file:/var/lib/tomcat6/webapps/mtm_trainer/WEB-INF/lib/jruby-stdlib-1.6.5.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
require’
from
/var/lib/tomcat6/webapps/mtm_trainer/WEB-INF/./mtm_trainer.rb:22:in
(root)' from org/jruby/RubyBasicObject.java:1720:in
instance_eval’
from
file:/var/lib/tomcat6/webapps/mtm_trainer/WEB-INF/lib/jruby-rack-1.0.10.jar!/vendor/rack-1.3.2/rack/builder.rb:51:in
initialize' from /var/lib/tomcat6/webapps/mtm_trainer/WEB-INF/config.ru:1:in
(root)’
at
org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:204)
at
org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:54)
at
org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:27)
… 25 more
Caused by: org.jruby.exceptions.RaiseException: (TypeError) can’t
convert
nil into String
According to the stack trace, I suspect that the 1.8 ruby interpeter is
loaded instead of the 1.9, but I don’t understand why. Am I doing
something
wrong ?
Thanks in advance for any help !
Damien