@tomoyatomoya

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

ArgumentError wrong number of arguments (given 2, expected 0)でlocalhost:3000に接続できない

解決したいこと

Ruby on RailsでWebアプリをつくっています。
環境構築でlocalhost:3000に接続する際、エラーが出ており接続できません。
解決方法を教えて下さい。

バージョン

Ruby 5.0.3
Rails 2.7.6
sqlite3 1.3.13 (x64-mingw32)

発生している問題・エラー

ArgumentError wrong number of arguments (given 2, expected 0)
activerecord (5.0.7.2) lib/active_record/connection_adapters/sqlite3_adapter.rb:27:in `initialize'
activerecord (5.0.7.2) lib/active_record/connection_adapters/sqlite3_adapter.rb:27:in `new'
activerecord (5.0.7.2) lib/active_record/connection_adapters/sqlite3_adapter.rb:27:in `sqlite3_connection'
activerecord (5.0.7.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:729:in `new_connection'
activerecord (5.0.7.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:773:in `checkout_new_connection'
activerecord (5.0.7.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:752:in `try_to_checkout_new_connection'
activerecord (5.0.7.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:713:in `acquire_connection'
activerecord (5.0.7.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:490:in `checkout'
activerecord (5.0.7.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:364:in `connection'
activerecord (5.0.7.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:883:in `retrieve_connection'
activerecord (5.0.7.2) lib/active_record/connection_handling.rb:128:in `retrieve_connection'
activerecord (5.0.7.2) lib/active_record/connection_handling.rb:91:in `connection'
activerecord (5.0.7.2) lib/active_record/migration.rb:559:in `connection'
activerecord (5.0.7.2) lib/active_record/migration.rb:546:in `call'
actionpack (5.0.7.2) lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
activesupport (5.0.7.2) lib/active_support/callbacks.rb:97:in `__run_callbacks__'
activesupport (5.0.7.2) lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
activesupport (5.0.7.2) lib/active_support/callbacks.rb:90:in `run_callbacks'
actionpack (5.0.7.2) lib/action_dispatch/middleware/callbacks.rb:36:in `call'
actionpack (5.0.7.2) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.0.7.2) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
actionpack (5.0.7.2) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
web-console (3.7.0) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.7.0) lib/web_console/middleware.rb:30:in `block in call'
web-console (3.7.0) lib/web_console/middleware.rb:20:in `catch'
web-console (3.7.0) lib/web_console/middleware.rb:20:in `call'
actionpack (5.0.7.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.0.7.2) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.0.7.2) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.0.7.2) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.0.7.2) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.0.7.2) lib/active_support/tagged_logging.rb:69:in `tagged'
railties (5.0.7.2) lib/rails/rack/logger.rb:24:in `call'
sprockets-rails (3.2.2) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.0.7.2) lib/action_dispatch/middleware/request_id.rb:24:in `call'
rack (2.2.3) lib/rack/method_override.rb:24:in `call'
rack (2.2.3) lib/rack/runtime.rb:22:in `call'
activesupport (5.0.7.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
actionpack (5.0.7.2) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.0.7.2) lib/action_dispatch/middleware/static.rb:136:in `call'
rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
railties (5.0.7.2) lib/rails/engine.rb:522:in `call'
puma (3.12.6) lib/puma/configuration.rb:227:in `call'
puma (3.12.6) lib/puma/server.rb:706:in `handle_request'
puma (3.12.6) lib/puma/server.rb:476:in `process_client'
puma (3.12.6) lib/puma/server.rb:334:in `block in run'
puma (3.12.6) lib/puma/thread_pool.rb:135:in `block in spawn_thread'
  Rendering C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout
  Rendering C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb
  Rendered C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (3.0ms)
  Rendering C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
  Rendered C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.9ms)
  Rendering C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
  Rendered C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.6ms)
  Rendered C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (127.4ms)
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:27: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:729: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:773: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:752: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:713: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:490: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:364: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:883: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_handling.rb:128: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/connection_handling.rb:91: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:559: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:546: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/callbacks.rb:38: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb:97: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb:750: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/callbacks.rb:90: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/callbacks.rb:36: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/executor.rb:12: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/remote_ip.rb:79: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/debug_exceptions.rb:49: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/middleware.rb:135: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/middleware.rb:30: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/middleware.rb:20: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/show_exceptions.rb:31: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/railties-5.0.7.2/lib/rails/rack/logger.rb:36: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/railties-5.0.7.2/lib/rails/rack/logger.rb:24: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/tagged_logging.rb:69: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/tagged_logging.rb:26: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/tagged_logging.rb:69: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/railties-5.0.7.2/lib/rails/rack/logger.rb:24: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/sprockets-rails-3.2.2/lib/sprockets/rails/quiet_assets.rb:13: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/request_id.rb:24: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/method_override.rb:24: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/runtime.rb:22: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/activesupport-5.0.7.2/lib/active_support/cache/strategy/local_cache_middleware.rb:28: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/executor.rb:12: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/actionpack-5.0.7.2/lib/action_dispatch/middleware/static.rb:136: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/railties-5.0.7.2/lib/rails/engine.rb:522: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/puma-3.12.6/lib/puma/configuration.rb:227: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/puma-3.12.6/lib/puma/server.rb:706: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/puma-3.12.6/lib/puma/server.rb:476: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/puma-3.12.6/lib/puma/server.rb:334: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/puma-3.12.6/lib/puma/thread_pool.rb:135: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
- Gracefully stopping, waiting for requests to finish

自分で試したこと

上記エラー前に、以下エラーがでたので、

cannot load such file -- sqlite3/sqlite3_native (LoadError)

こちらを試しました。
https://qiita.com/shuhey/items/8cd28aed5906fb5fa6ec

0 likes

No Answers yet.

Your answer might help someone💌