gpt4 book ai didi

ruby-on-rails - 参数错误 : Wrong Number of Arguments Errors when upgrading Rails 6. 1.3

转载 作者:行者123 更新时间:2023-12-02 16:14:37 25 4
gpt4 key购买 nike

在 mimemagic 惨败之后,我最近将一个 Rails 6.0.3.5 应用程序升级到了 6.1.3。

现在,我看到在呈现 View 后发生了这个有趣的问题,这很奇怪。我该如何调试?该应用程序使用 Ruby 2.7.1

这是完整的堆栈跟踪

[31a95c67-7597-4856-9dfc-e813bb0d760a]   Rendered layout layouts/application.html.erb (Duration: 5001.5ms | Allocations: 119937)
[31a95c67-7597-4856-9dfc-e813bb0d760a] Completed 200 OK in 5572ms (Views: 5005.9ms | ActiveRecord: 23.5ms | Allocations: 196152)
[31a95c67-7597-4856-9dfc-e813bb0d760a]
ArgumentError: wrong number of arguments (given 2, expected 3)
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/actionview-6.1.3.1/lib/action_view/base.rb:230:in `initialize'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/web-console-3.7.0/lib/web_console/template.rb:21:in `new'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/web-console-3.7.0/lib/web_console/template.rb:21:in `render'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/web-console-3.7.0/lib/web_console/middleware.rb:37:in `block in call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/web-console-3.7.0/lib/web_console/middleware.rb:20:in `catch'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/web-console-3.7.0/lib/web_console/middleware.rb:20:in `call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/actionpack-6.1.3.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/railties-6.1.3.1/lib/rails/rack/logger.rb:37:in `call_app'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/railties-6.1.3.1/lib/rails/rack/logger.rb:26:in `block in call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/activesupport-6.1.3.1/lib/active_support/tagged_logging.rb:99:in `block in tagged'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/activesupport-6.1.3.1/lib/active_support/tagged_logging.rb:37:in `tagged'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/activesupport-6.1.3.1/lib/active_support/tagged_logging.rb:99:in `tagged'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/railties-6.1.3.1/lib/rails/rack/logger.rb:26:in `call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/actionpack-6.1.3.1/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/actionpack-6.1.3.1/lib/action_dispatch/middleware/request_id.rb:26:in `call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/activesupport-6.1.3.1/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/actionpack-6.1.3.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/actionpack-6.1.3.1/lib/action_dispatch/middleware/static.rb:24:in `call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/actionpack-6.1.3.1/lib/action_dispatch/middleware/host_authorization.rb:98:in `call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/webpacker-5.2.1/lib/webpacker/dev_server_proxy.rb:25:in `perform_request'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/rack-proxy-0.6.5/lib/rack/proxy.rb:57:in `call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/railties-6.1.3.1/lib/rails/engine.rb:539:in `call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/puma-5.2.1/lib/puma/configuration.rb:247:in `call'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/puma-5.2.1/lib/puma/request.rb:76:in `block in handle_request'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/puma-5.2.1/lib/puma/thread_pool.rb:337:in `with_force_shutdown'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/puma-5.2.1/lib/puma/request.rb:75:in `handle_request'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/puma-5.2.1/lib/puma/server.rb:431:in `process_client'
from /Users/aurs/.rvm/gems/ruby-2.7.1/gems/puma-5.2.1/lib/puma/thread_pool.rb:145:in `block in spawn_thread'

最佳答案

web-console gem 与 Rails 6.1 不兼容,升级到 4.1.0 修复了错误。

关于ruby-on-rails - 参数错误 : Wrong Number of Arguments Errors when upgrading Rails 6. 1.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67083202/

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