RoR error: can't convert Warbler::WebxmlOpenStruct to Array
I installed the Warbler gem for creating .war
file. I have tried creating a .war file using the warble command but I get following error each time I try:
warble aborted!
can't convert Warbler::WebxmlOpenStruct to Array (Warbler::WebxmlOpenStruct#to_a
gives Warbler::WebxmlOpenStruct)
C:/Ruby192/lib/ruby/gems/1.9.1/gems/warbler-1.2.1/lib/warbler/config.rb:352:in `
block in context_params'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/warbler-1.2.1/lib/warbler/config.rb:352:in `
delete_if'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/warbler-1.2.1/lib/warbler/config.rb:352:in `
context_params'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/warbler-1.2.1/lib/warbler/config.rb:344:in `
block in context_params'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/warbler-1.2.1/lib/warbler/config.rb:341:in `
each'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/warbler-1.2.1/lib/warbler/config.rb:341:in `
context_params'
(erb):5:in `erb_binding'
C:/Ruby192/lib/ruby/1.9.1/erb.rb:753:in `eval'
C:/Ruby192/lib/ruby/1.9.1/erb.rb:753:in `result'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/warbler-1.2.1/lib/warbler/war.rb:200:in `exp
and_erb'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/warbler-1.2.1/lib/warbler/war.rb:77:in `bloc
k in add_webxml'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1270:in `each'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1270:in `block (2 levels) in <class:FileList>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/warbler-1.2.1/lib/warbler/war.rb:75:in `add_
webxml'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/warbler-1.2.1/lib/warbler/war.rb:52:in `appl
y'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/warbler-1.2.1/lib/warbler/task.rb:111:in `bl
ock in define_files_task'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in `call'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in `each'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in `execute'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:581:in `invoke'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/warbler-1.2.1/lib/warbler/task.rb:90:in `blo
ck (2 levels) in define_main_task'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/warbler-1.2.1/lib/warbler/task.rb:89:in `eac
h'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/warbler-1.2.1/lib/warbler/task.rb:89:in `blo
ck in define_main_task'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in `call'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in `each'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in `execute'
C:/Ruby192/li开发者_StackOverflow社区b/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:605:in `block in invoke_prerequisites'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:602:in `each'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:602:in `invoke_prerequisites'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:594:in `block in invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:581:in `invoke'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `each'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2013:in `top_level'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1992:in `run'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/warbler-1.2.1/lib/warbler/application.rb:68:
in `run'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/warbler-1.2.1/bin/warble:11:in `<top (requir
ed)>'
C:/Ruby192/bin/warble:19:in `load'
C:/Ruby192/bin/warble:19:in `<main>'
How to resolve it?
I haven't tested Warbler with 1.9.2 yet, and I'm guessing this is a bug. I'd suggest using JRuby to run it for best results until the issue has been resolved. Would you mind filing this over at https://github.com/nicksieger/warbler/issues? Include contents of config/warble.rb, if any. Thanks!
精彩评论