warbler icon indicating copy to clipboard operation
warbler copied to clipboard

war:compiled Error when config.compile_gems to true in the warble.rb

Open Ha-Sch opened this issue 7 years ago • 2 comments

Hello, I have a problem with Jruby 9.1.15 and warbler 2.0.4 on windows 10. I set the config.compile_gems to true in the warble.rb. (if I comment out the setting, then the warbler runs smoothly.) if i run warble then i get the following error:

warble aborted!
Compilation of .rb files failed (pid -1 exit 127)
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/jar.rb:78:in `block in sh_jrubyc'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/file_utils.rb:57:in `sh'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/jar.rb:77:in `sh_jrubyc'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/jar.rb:68:in `block in run_jrubyc'
org/jruby/RubyArray.java:1779:in `each_slice'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/jar.rb:60:in `run_jrubyc'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/jar.rb:46:in `compile'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/task.rb:109:in `block in define_compiled_task'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:251:in `block in execute'
org/jruby/RubyArray.java:1735:in `each'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:251:in `execute'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
C:/jruby-9.1.15.0/lib/ruby/stdlib/monitor.rb:214:in `mon_synchronize'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:181:in `invoke'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/task.rb:88:in `block in define_main_task'
org/jruby/RubyArray.java:1735:in `each'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/task.rb:82:in `block in define_main_task'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:251:in `block in execute'
org/jruby/RubyArray.java:1735:in `each'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:251:in `execute'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
C:/jruby-9.1.15.0/lib/ruby/stdlib/monitor.rb:214:in `mon_synchronize'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:217:in `block in invoke_prerequisites'
org/jruby/RubyArray.java:1735:in `each'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:215:in `invoke_prerequisites'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
C:/jruby-9.1.15.0/lib/ruby/stdlib/monitor.rb:214:in `mon_synchronize'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:181:in `invoke'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/application.rb:160:in `invoke_task'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/application.rb:116:in `block in top_level'
org/jruby/RubyArray.java:1735:in `each'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/application.rb:116:in `block in top_level'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/application.rb:125:in `run_with_threads'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/application.rb:110:in `top_level'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/application.rb:83:in `block in run'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/application.rb:186:in `standard_exception_handling'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/application.rb:80:in `run'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/application.rb:79:in `run'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/application.rb:74:in `run'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/bin/warble:11:in `<main>'
org/jruby/RubyKernel.java:973:in `load'
C:\jruby-9.1.15.0\bin\warble:23:in `<main>'

Caused by:
IOError: Cannot run program "cmd.exe" (in directory "C:\Hagen\apps\leaman"): CreateProcess error=206, Der Dateiname oder die Erweiterung ist zu lang
org/jruby/RubyKernel.java:1573:in `system'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/file_utils.rb:54:in `sh'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/jar.rb:77:in `sh_jrubyc'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/jar.rb:68:in `block in run_jrubyc'
org/jruby/RubyArray.java:1779:in `each_slice'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/jar.rb:60:in `run_jrubyc'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/jar.rb:46:in `compile'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/task.rb:109:in `block in define_compiled_task'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:251:in `block in execute'
org/jruby/RubyArray.java:1735:in `each'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:251:in `execute'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
C:/jruby-9.1.15.0/lib/ruby/stdlib/monitor.rb:214:in `mon_synchronize'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:181:in `invoke'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/task.rb:88:in `block in define_main_task'
org/jruby/RubyArray.java:1735:in `each'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/task.rb:82:in `block in define_main_task'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:251:in `block in execute'
org/jruby/RubyArray.java:1735:in `each'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:251:in `execute'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
C:/jruby-9.1.15.0/lib/ruby/stdlib/monitor.rb:214:in `mon_synchronize'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:217:in `block in invoke_prerequisites'
org/jruby/RubyArray.java:1735:in `each'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:215:in `invoke_prerequisites'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
C:/jruby-9.1.15.0/lib/ruby/stdlib/monitor.rb:214:in `mon_synchronize'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/task.rb:181:in `invoke'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/application.rb:160:in `invoke_task'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/application.rb:116:in `block in top_level'
org/jruby/RubyArray.java:1735:in `each'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/application.rb:116:in `block in top_level'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/application.rb:125:in `run_with_threads'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/application.rb:110:in `top_level'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/application.rb:83:in `block in run'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/application.rb:186:in `standard_exception_handling'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/rake-12.3.0/lib/rake/application.rb:80:in `run'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/application.rb:79:in `run'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/lib/warbler/application.rb:74:in `run'
C:/jruby-9.1.15.0/lib/ruby/gems/shared/gems/warbler-2.0.4/bin/warble:11:in `<main>'
org/jruby/RubyKernel.java:973:in `load'
C:\jruby-9.1.15.0\bin\warble:23:in `<main>'
Tasks: TOP => war:compiled

Ha-Sch avatar Feb 06 '18 12:02 Ha-Sch

seems like a windows issue - with all the parameters the command line might just over-flow, or what? IOError: Cannot run program "cmd.exe" (in directory "C:\Hagen\apps\leaman"): CreateProcess error=206, Der Dateiname oder die Erweiterung ist zu lang ... not sure we can fix that, maybe you should confirm its Windows specific (does work fine under Linux)

kares avatar Feb 06 '18 14:02 kares

Okay, I have now tried to build the same application on ubuntu with warbler. If I set config.compile_gems=false in the warble.rb , then the warbler will create a WAR file. But if I set to true, then I get the following error message: warble --trace ** Invoke default (first_time) ** Invoke war (first_time) ** Execute war ** Invoke war:compiled (first_time) ** Execute war:compiled warble aborted! Errno::EACCES: Permission denied - tmp/WEB-INF/gems/gems/minitest-5.11.1/design_rationale.rb org/jruby/RubyFile.java:368:in initialize' org/jruby/RubyIO.java:1139:in open' /usr/local/rvm/rubies/jruby-9.1.6.0/lib/ruby/stdlib/fileutils.rb:1403:in block in copy_file' org/jruby/RubyIO.java:1141:in open' /usr/local/rvm/rubies/jruby-9.1.6.0/lib/ruby/stdlib/fileutils.rb:1402:in copy_file' /usr/local/rvm/rubies/jruby-9.1.6.0/lib/ruby/stdlib/fileutils.rb:486:in copy_file' /usr/local/rvm/rubies/jruby-9.1.6.0/lib/ruby/stdlib/fileutils.rb:403:in block in cp' /usr/local/rvm/rubies/jruby-9.1.6.0/lib/ruby/stdlib/fileutils.rb:1581:in block in fu_each_src_dest' /usr/local/rvm/rubies/jruby-9.1.6.0/lib/ruby/stdlib/fileutils.rb:1597:in fu_each_src_dest0' /usr/local/rvm/rubies/jruby-9.1.6.0/lib/ruby/stdlib/fileutils.rb:1579:in fu_each_src_dest' /usr/local/rvm/rubies/jruby-9.1.6.0/lib/ruby/stdlib/fileutils.rb:402:in cp' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/warbler-2.0.4/lib/warbler/jar.rb:132:in block in gather_all_rb_files' org/jruby/RubyHash.java:1344:in each' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/warbler-2.0.4/lib/warbler/jar.rb:129:in gather_all_rb_files' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/warbler-2.0.4/lib/warbler/jar.rb:45:in compile' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/warbler-2.0.4/lib/warbler/task.rb:109:in block in define_compiled_task' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/task.rb:251:in block in execute' org/jruby/RubyArray.java:1734:in each' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/task.rb:251:in execute' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/task.rb:195:in block in invoke_with_call_chain' /usr/local/rvm/rubies/jruby-9.1.6.0/lib/ruby/stdlib/monitor.rb:214:in mon_synchronize' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/task.rb:188:in invoke_with_call_chain' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/task.rb:181:in invoke' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/warbler-2.0.4/lib/warbler/task.rb:88:in block in define_main_task' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/warbler-2.0.4/lib/warbler/task.rb:82:in block in define_main_task' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/task.rb:251:in block in execute' org/jruby/RubyArray.java:1734:in each' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/task.rb:251:in execute' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/task.rb:195:in block in invoke_with_call_chain' /usr/local/rvm/rubies/jruby-9.1.6.0/lib/ruby/stdlib/monitor.rb:214:in mon_synchronize' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/task.rb:188:in invoke_with_call_chain' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/task.rb:217:in block in invoke_prerequisites' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/task.rb:215:in invoke_prerequisites' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/task.rb:194:in block in invoke_with_call_chain' /usr/local/rvm/rubies/jruby-9.1.6.0/lib/ruby/stdlib/monitor.rb:214:in mon_synchronize' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/task.rb:188:in invoke_with_call_chain' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/task.rb:181:in invoke' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/application.rb:160:in invoke_task' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/application.rb:116:in block in top_level' org/jruby/RubyArray.java:1734:in each' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/application.rb:116:in block in top_level' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/application.rb:125:in run_with_threads' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/application.rb:110:in top_level' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/application.rb:83:in block in run' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/application.rb:186:in standard_exception_handling' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/rake-12.3.0/lib/rake/application.rb:80:in run' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/warbler-2.0.4/lib/warbler/application.rb:79:in run' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/warbler-2.0.4/lib/warbler/application.rb:74:in run' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/gems/warbler-2.0.4/bin/warble:11:in <main>' org/jruby/RubyKernel.java:977:in load' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/bin/warble:1:in <eval>' org/jruby/RubyKernel.java:998:in eval' /usr/local/rvm/gems/jruby-9.1.6.0@jruby-leaman/bin/jruby_executable_hooks:15:in `

' Tasks: TOP => war:compiled

Ha-Sch avatar Feb 16 '18 11:02 Ha-Sch