I have created an app using Sinatra (JRuby 1.7.13, Ruby-1.9). The application is rack-based, and using MySQL in backend.
I used warbler to make a war file and deployed successfully on my local tomcat. Everyhting works fine !
But when I pushed that war file to openshift ( following all the procedure told in openshift knowledge-base ). But the tomcat shows 404 error. I looked into the logfile. I am attaching a gyst of that huge file in here -
--- Backtrace
LoadError: no such file to load -- sinatra
require at org/jruby/RubyKernel.java:1065
require at file:/var/lib/openshift/53a807dfe0b8cd33450000c4/jbossews/work/Catalina
/localhost/_/WEB-INF/lib/jruby-stdlib-complete-1.7.13.jar!/META-INF/jruby.home/lib/ruby
/shared/rubygems/core_ext/kernel_require.rb:55
(root) at /localhost/WEB-INF/config.ru:2
instance_eval at org/jruby/RubyBasicObject.java:1533
initialize at file:/var/lib/openshift/53a807dfe0b8cd33450000c4/jbossews/work/Catalina/localhost/_/WEB-INF/lib/jruby-rack-1.1.14.jar!/vendor/rack-1.4.5/rack/builder.rb:51
(root) at /localhost/WEB-INF/config.ru:1
...
SEVERE: ERROR: initialization failed
org.jruby.rack.RackInitializationException: no such file to load -- sinatra
from org/jruby/RubyKernel.java:1065:in `require'
from file:/var/lib/openshift/53a807dfe0b8cd33450000c4/jbossews/work/Catalina/localhost/_/WEB-INF/lib/jruby-stdlib-complete-1.7.13.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
from /localhost/WEB-INF/config.ru:2:in `(root)'
from org/jruby/RubyBasicObject.java:1533:in `instance_eval'
from file:/var/lib/openshift/53a807dfe0b8cd33450000c4/jbossews/work/Catalina/localhost/_/WEB-INF/lib/jruby-rack-1.1.14.jar!/vendor/rack-1.4.5/rack/builder.rb:51:in `initialize'
from /localhost/WEB-INF/config.ru:1:in `(root)'
at org.jruby.rack.RackInitializationException.wrap(RackInitializationException.java:29)
at org.jruby.rack.RackApplicationFactoryDecorator.init(RackApplicationFactoryDecorator.java:104)
at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:50)
.... and ....
Caused by: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- sinatra
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1065)
at RUBY.require(file:/var/lib/openshift/53a807dfe0b8cd33450000c4/jbossews /work/Catalina/localhost/_/WEB-INF/lib/jruby-stdlib-complete-1.7.13.jar!/META-INF/jruby.home /lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55)
at RUBY.(root)(/localhost/WEB-INF/config.ru:2)
at org.jruby.RubyBasicObject.instance_eval(org/jruby/RubyBasicObject.java:1533)
at RUBY.initialize(file:/var/lib/openshift/53a807dfe0b8cd33450000c4/jbossews/work/Catalina/localhost/_/WEB-INF/lib/jruby-rack-1.1.14.jar!/vendor/rack-1.4.5/rack/builder.rb:51)
The question is that - What should I do to deploy a warber generated war file to deploy in tomcat in an openshift server ? That stuff is working nice in local tomcat.
Thanks a lot !