gpt4 book ai didi

ruby-on-rails - 使用 JRuby 进行 Rack 初始化时出错

转载 作者:太空宇宙 更新时间:2023-11-03 18:27:55 25 4
gpt4 key购买 nike

当我使用 warbler 构建的应用程序启动 JBoss 时出现此错误:

Error: unable to initialize application 
org.jruby.rack.RackInitializationException: wrong number of arguments (1 for 0)

调用堆栈:

gems/gems/actionpack-3.0.9/lib/action_controller/railtie.rb:54:in `Railtie'
gems/gems/activesupport-3.0.9/lib/active_support/ordered_hash.rb:139:in `each'
org/jruby/RubyArray.java:1612:in `each'
gems/gems/activesupport-3.0.9/lib/active_support/ordered_hash.rb:139:in `each'
gems/gems/actionpack-3.0.9/lib/action_controller/railtie.rb:54:in `Railtie'
org/jruby/RubyKernel.java:2062:in `instance_eval'
gems/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
gems/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:43:in `run_load_hooks'
org/jruby/RubyArray.java:1612:in `each'
gems/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
gems/gems/actionpack-3.0.9/lib/action_controller/base.rb:232:in `Base'
gems/gems/actionpack-3.0.9/lib/action_controller/base.rb:169:in `ActionController'
gems/gems/actionpack-3.0.9/lib/action_controller/base.rb:3:in `(root)'
gems/gems/actionpack-3.0.9/lib/action_controller/base.rb:48:in `Railtie'
org/jruby/RubyKernel.java:2079:in `instance_exec'
gems/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `run'
gems/gems/railties-3.0.9/lib/rails/initializable.rb:50:in `run_initializers'
org/jruby/RubyArray.java:1612:in `each'
gems/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `run_initializers'
gems/gems/railties-3.0.9/lib/rails/application.rb:134:in `initialize!'
org/jruby/RubyKernel.java:2093:in `send'
gems/gems/railties-3.0.9/lib/rails/application.rb:77:in `method_missing'
config/environment.rb:5:in `(root)'
org/jruby/RubyKernel.java:1038:in `require'
config/environment.rb:167:in `load_environment'
classpath:/./jruby/rack/rails.rb:172:in `to_app'
classpath:/./jruby/rack/rails.rb:192:in `new'
<web.xml>:1:in `(root)'
org/jruby/RubyKernel.java:2062:in `instance_eval'
classpath:/./vendor/rack-1.3.5/rack/builder.rb:51:in `initialize'
<web.xml>:1:in `(root)'

有什么想法吗?

最佳答案

我们在 Rails 3.0.11/JBoss 5 和最新的 jruby-rack 上遇到了同样的问题。为了解决这个问题,我们必须使用 jruby-rack 1.0.10

请尝试将此行放入您的 Gemfile 中:

gem 'jruby-rack', '1.0.10'

关于ruby-on-rails - 使用 JRuby 进行 Rack 初始化时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8270213/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com