I am using jruby 1.1.4 and installed warbler 0.9.11 in Windows XP. When
I run jruby -S warble war, I always get this. It fails when rake
reaches the target war:jar. I checked my JAVA_HOME and I can run jar
command in a command line.
I think I have solve the problem with conflicting rake versions. I can
build the war now, but when deployed in Tomcat, it is asking for
RAILS_GEM_VERSION.
Missing the Rails 2.1.1 gem. Please gem install -v=2.1.1 rails, update
your RA
ILS_GEM_VERSION setting in config/environment.rb for the Rails version
you do ha
ve installed, or comment out RAILS_GEM_VERSION to use the latest version
install
ed.
Can you check if the Rails gem was included in your war file by doing
“jar tf myapp.war | grep rails” or similar? Also, feel free to stop by
the jruby lists to troubleshoot the problem further.
I think I have solve the problem with conflicting rake versions. I can
build the war now, but when deployed in Tomcat, it is asking for
RAILS_GEM_VERSION.
This is what I get when I run Tomcat. My app was running in Mongrel and
I’m sure I’m using Rails 2.1.1.
Missing the Rails 2.1.1 gem. Please gem install -v=2.1.1 rails, update
your RA
ILS_GEM_VERSION setting in config/environment.rb for the Rails version
you do ha
ve installed, or comment out RAILS_GEM_VERSION to use the latest version
install
ed.
Missing the Rails 2.1.1 gem. Please gem install -v=2.1.1 rails, update
your RA
ILS_GEM_VERSION setting in config/environment.rb for the Rails version
you do ha
ve installed, or comment out RAILS_GEM_VERSION to use the latest version
install
ed.
Can you check if the Rails gem was included in your war file by doing
“jar tf myapp.war | grep rails” or similar? Also, feel free to stop by
the jruby lists to troubleshoot the problem further.
Regards,
/Nick
Nick, thanks for the reply.
I tried that command, this is what I got.
$ jar tf shoplet.war | grep rails
images/rails.png
WEB-INF/config/initializers/new_rails_defaults.rb
I create my war using jruby -S warble war command.
SEVERE: Exception caught
org.jruby.rack.RackInitializationException: exit
from d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:38:in run' from file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails_boot.rb:20:in run’
from d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:11:in boot!' from d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:109 from d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:11:in require’
from d:/tomcat/webapps/shoplet/WEB-INF/config/environment.rb:11
from d:/tomcat/webapps/shoplet/WEB-INF/config/environment.rb:29:in load' from file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:29:in load_environment’
from
file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:152:in new' from <script>:3 from file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/rack/builder.rb:22:in instance_eval’
from
file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/rack/builder.rb:22:in
`initialize’
from :3
at
org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:154)
at
org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:53)
at
org.jruby.rack.PoolingRackApplicationFactory.getApplication(PoolingRackApplicationFactory.java:92)
at
org.jruby.rack.DefaultRackDispatcher.process(DefaultRackDispatcher.java:31)
at org.jruby.rack.RackFilter.doFilter(RackFilter.java:51)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.jruby.exceptions.RaiseException
at
Rails::GemBoot.load_rails_gem(d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:53)
at
Rails::GemBoot.load_initializer(d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:38)
at
Rails::Boot.run(file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails_boot.rb:20)
at
Rails::BootHook.run(d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:11)
at
#Class:01x18a2977.boot!(d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:109)
at
(unknown).(unknown)(d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:11)
at
Kernel.require(d:/tomcat/webapps/shoplet/WEB-INF/config/environment.rb:11)
at
(unknown).(unknown)(d:/tomcat/webapps/shoplet/WEB-INF/config/environment.rb:29)
at
Kernel.load(file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:29)
at
JRuby::Rack::RailsServletHelper.load_environment(file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:152)
at #Class:01x46136.new(:3)
at
(unknown).(unknown)(file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/rack/builder.rb:22)
at
Kernel.instance_eval(file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/rack/builder.rb:22)
at
Kernel.instance_eval(file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/rack/builder.rb:22)
at Rack::Builder.initialize(:3)
at (unknown).(unknown)(:1)
Oct 17, 2008 1:45:08 AM org.apache.catalina.core.ApplicationContext log
SEVERE: Exception caught
org.jruby.rack.RackInitializationException: exit
from d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:38:in run' from file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails_boot.rb:20:in run’
from d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:11:in boot!' from d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:109 from d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:11:in require’
from d:/tomcat/webapps/shoplet/WEB-INF/config/environment.rb:11
from d:/tomcat/webapps/shoplet/WEB-INF/config/environment.rb:29:in load' from file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:29:in load_environment’
from
file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:152:in new' from <script>:3 from file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/rack/builder.rb:22:in instance_eval’
from
file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/rack/builder.rb:22:in
`initialize’
from :3
at
org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:154)
at
org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:53)
at
org.jruby.rack.PoolingRackApplicationFactory.getApplication(PoolingRackApplicationFactory.java:92)
at
org.jruby.rack.DefaultRackDispatcher.process(DefaultRackDispatcher.java:31)
at org.jruby.rack.RackFilter.doFilter(RackFilter.java:51)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.jruby.exceptions.RaiseException
at
Rails::GemBoot.load_rails_gem(d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:53)
at
Rails::GemBoot.load_initializer(d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:38)
at
Rails::Boot.run(file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails_boot.rb:20)
at
Rails::BootHook.run(d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:11)
at
#Class:01x7ab89d.boot!(d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:109)
at
(unknown).(unknown)(d:/tomcat/webapps/shoplet/WEB-INF/config/boot.rb:11)
at
Kernel.require(d:/tomcat/webapps/shoplet/WEB-INF/config/environment.rb:11)
at
(unknown).(unknown)(d:/tomcat/webapps/shoplet/WEB-INF/config/environment.rb:29)
at
Kernel.load(file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:29)
at
JRuby::Rack::RailsServletHelper.load_environment(file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:152)
at #Class:01xfe8c4.new(:3)
at
(unknown).(unknown)(file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/rack/builder.rb:22)
at
Kernel.instance_eval(file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/rack/builder.rb:22)
at
Kernel.instance_eval(file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/rack/builder.rb:22)
at Rack::Builder.initialize(:3)
at (unknown).(unknown)(:1)
Ok I think I was to sort it out after all. I tried freezing rails and
it was included now in the war file. I was able to see the application
running in Tomcat at last! However, I have encountered some issues when
I clicked on About your environment link
(http://localhost:8080/shoplet/rails/info/properties). I got the ff:
exception.