ruby-on-railsbest-in-place

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


I recently upgraded Rails app 4.1 to 6.1 and I got this error shown below:

 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)

when I comment the gem best_in_place error goes out but this gem is used in the app that why it gives an error at localhost 3000 that why I comment out, again and again, same error occurs if any one have solution so give answers otherwise answer mail to santu.essence@gmail.com


Solution

  • From best_in_placce github page:

    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"