Problem with warbler

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.

** Execute war:jar
jar cf shoplet.war -C tmp/war .
/usr/bin/sh: call: command not found
rake aborted!
Command failed with status (127): [jar cf shoplet.war -C tmp/war ....]
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:971:in `sh'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:984:in
`call'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:984:in `sh'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1076:in
`sh'
D:/workspace/shoplet/vendor/plugins/warbler-0.9.11/tasks/../lib/warbler/task.rb:
174:in `define_jar_task'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in
`call'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in
`execute'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in
`each'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in
`execute'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in
`invoke_with
_call_chain'
D:/jruby-1.1.4/lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in
`invoke_with
_call_chain'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:588:in
`invoke_prer
equisites'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in
`each'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in
`invoke_prer
equisites'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:577:in
`invoke_with
_call_chain'
D:/jruby-1.1.4/lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in
`invoke_with
_call_chain'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in
`invoke'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in
`invoke_tas
k'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
`top_level'

D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
`each'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
`top_level'

D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in
`standard_e
xception_handling'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in
`top_level'

D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in
`run'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in
`standard_e
xception_handling'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in
`run'
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
D:/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:19:in `load'
d:\jruby-1.1.4\bin\rake:19

···

--
Posted via http://www.ruby-forum.com/.

Btw, I am using JDK 1.5.

···

--
Posted via http://www.ruby-forum.com/.

Bahaw Anyone wrote:

Btw, I am using JDK 1.5.

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.

···

--
Posted via http://www.ruby-forum.com/\.

Bahaw Anyone wrote:

Bahaw Anyone wrote:

Btw, I am using JDK 1.5.

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.

···

--
Posted via http://www.ruby-forum.com/\.

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

···

On Thu, Oct 16, 2008 at 12:20 PM, Bahaw Anyone <bahaw@yahoo.com> wrote:

Bahaw Anyone wrote:

Bahaw Anyone wrote:

Btw, I am using JDK 1.5.

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.

Nick Sieger wrote:

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.

Also, below what I got from my log file which I think is related to this
bug - http://www.nabble.com/Jruby-Tomcat-error-td17662084.html and
http://jira.codehaus.org/browse/JRUBY-2507

Appreciate the help.

···

On Thu, Oct 16, 2008 at 12:20 PM, Bahaw Anyone <bahaw@yahoo.com> wrote:

======================

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 <script>: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(<script>: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(<script>: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 <script>: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(<script>: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(<script>:3)
  at (unknown).(unknown)(:1)

--
Posted via http://www.ruby-forum.com/\.

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.

ActionController::RoutingError (No route matches
"/rails/info/properties" with {:method=>:get}):
    /vendor/rails/actionpack/lib/action_controller/routing/recognition_optimisation.rb:67:in
`recognize_path'
    /vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:384:in
`recognize'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:148:in
`handle_request'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:107:in
`dispatch'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in
`dispatch'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:120:in
`dispatch_cgi'
    /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:35:in
`dispatch'
    file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/rack/adapter/rails.rb:37:in
`serve_rails'
    file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/rack/adapter/rails.rb:44:in
`call'
    file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:145:in
`call'
    file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/rack/handler/servlet.rb:17:in
`call'
    <script>:3

···

--
Posted via http://www.ruby-forum.com/.

This is a known issue -- for some reason the /rails/info/properties
route is not getting set up from within the war environment.

/Nick

···

On Fri, Oct 17, 2008 at 5:53 AM, Bahaw Anyone <bahaw@yahoo.com> wrote:

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.

ActionController::RoutingError (No route matches
"/rails/info/properties" with {:method=>:get}):
   /vendor/rails/actionpack/lib/action_controller/routing/recognition_optimisation.rb:67:in
`recognize_path'
   /vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:384:in
`recognize'
   /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:148:in
`handle_request'
   /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:107:in
`dispatch'
   /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in
`dispatch'
   /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:120:in
`dispatch_cgi'
   /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:35:in
`dispatch'
   file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/rack/adapter/rails.rb:37:in
`serve_rails'
   file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/rack/adapter/rails.rb:44:in
`call'
   file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/rails.rb:145:in
`call'
   file:/D:/tomcat/webapps/shoplet/WEB-INF/lib/jruby-rack-0.9.2.jar!/rack/handler/servlet.rb:17:in
`call'
   <script>:3

--
Posted via http://www.ruby-forum.com/\.