最佳位置:参数数量错误(给定 0,预期 3)(ArgumentError)Action_view ' Initialize '

Best In Place: wrong number of arguments (given 0, expected 3) (ArgumentError) with Action_view ' Initialize '

我最近将 Rails 应用程序 4.1 升级到 6.1,但出现如下所示的错误:

 rake aborted!
 ArgumentError: wrong number of arguments (given 0, expected 3)
 /usr/local/bundle/gems/actionview-6.1.4.1/lib/action_view/base.rb:230:in `initialize'
 /usr/local/bundle/gems/best_in_place-3.1.1/lib/best_in_place/railtie.rb:7:in `new'
 /usr/local/bundle/gems/best_in_place-3.1.1/lib/best_in_place/railtie.rb:7:in `block in 
 <class:Railtie>'
 /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:68:in 
 `block in execute_hook'
 /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:61:in 
 `with_execution_control'
 /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:66:in 
 `execute_hook'
 /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:52:in 
 `block in run_load_hooks'
 /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:51:in 
 `each'
 /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/lazy_load_hooks.rb:51:in 
 `run_load_hooks'
 /usr/local/bundle/gems/railties-6.1.4.1/lib/rails/application/finisher.rb:140:in `block 
 in <module:Finisher>'
 /usr/local/bundle/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in `instance_exec'
 /usr/local/bundle/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in `run'
 /usr/local/bundle/gems/railties-6.1.4.1/lib/rails/initializable.rb:61:in `block in 
 run_initializers'
 /usr/local/bundle/gems/railties-6.1.4.1/lib/rails/initializable.rb:60:in 
 `run_initializers'
 /usr/local/bundle/gems/railties-6.1.4.1/lib/rails/application.rb:391:in `initialize!'
 /usr/src/app/config/environment.rb:4:in `<top (required)>'
 /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
 /usr/local/bundle/gems/zeitwerk-2.5.1/lib/zeitwerk/kernel.rb:35:in `require'
 /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in 
 `block in require'
 /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in 
 `load_dependency'
 /usr/local/bundle/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in 
 `require'
 /usr/local/bundle/gems/railties-6.1.4.1/lib/rails/application.rb:367:in 
 `require_environment!'
 /usr/local/bundle/gems/railties-6.1.4.1/lib/rails/application.rb:533:in `block in 
 run_tasks_blocks'
 /usr/local/bundle/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
 Tasks: TOP => resque:work => resque:preload => resque:setup => environment
  (See full trace by running task with --trace)

当我评论 gem best_in_place 错误时,这个 gem 在应用程序中使用,为什么它在 localhost 3000 给出错误,这就是为什么我再次评论同样,如果有人有解决方案,也会出现同样的错误,所以请给出答案,否则请回复邮件至 santu.essence@gmail.com

来自 best_in_placce github 页面:

NB: For Rails >= 6.1 you can install the gem from this repository with:

gem "best_in_place", git: "https://github.com/mmotherwell/best_in_place"