So I am currently trying to develop this project (https://open.appacademy.io/learn/full-stack-online/javascript/ajax-twitter) but while executing "rails db:setup", I encounter the error of "rails aborted!, ArgumentError: wrong number of arguments (given 3, expected 2)"
rails db:setup --trace
** Invoke db:setup (first_time)
** Invoke db:schema:load_if_ruby (first_time)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
rails aborted!
ArgumentError: wrong number of arguments (given 3, expected 2)
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/actionpack-5.2.6/lib/action_dispatch/middleware/static.rb:111:in `initialize'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/actionpack-5.2.6/lib/action_dispatch/middleware/stack.rb:37:in `new'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/actionpack-5.2.6/lib/action_dispatch/middleware/stack.rb:37:in `build'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/actionpack-5.2.6/lib/action_dispatch/middleware/stack.rb:101:in `block in build'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/actionpack-5.2.6/lib/action_dispatch/middleware/stack.rb:101:in `each'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/actionpack-5.2.6/lib/action_dispatch/middleware/stack.rb:101:in `inject'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/actionpack-5.2.6/lib/action_dispatch/middleware/stack.rb:101:in `build'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/railties-5.2.6/lib/rails/engine.rb:510:in `block in app'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/railties-5.2.6/lib/rails/engine.rb:506:in `synchronize'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/railties-5.2.6/lib/rails/engine.rb:506:in `app'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/railties-5.2.6/lib/rails/application/finisher.rb:47:in `block in <module:Finisher>'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/railties-5.2.6/lib/rails/initializable.rb:32:in `instance_exec'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/railties-5.2.6/lib/rails/initializable.rb:32:in `run'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/railties-5.2.6/lib/rails/initializable.rb:61:in `block in run_initializers'
/Users/eduardomeza/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:228:in `block in tsort_each'
/Users/eduardomeza/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/Users/eduardomeza/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:431:in `each_strongly_connected_component_from'
/Users/eduardomeza/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:349:in `block in each_strongly_connected_component'
/Users/eduardomeza/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:347:in `each'
/Users/eduardomeza/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:347:in `call'
/Users/eduardomeza/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:347:in `each_strongly_connected_component'
/Users/eduardomeza/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:226:in `tsort_each'
/Users/eduardomeza/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/tsort.rb:205:in `tsort_each'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/railties-5.2.6/lib/rails/initializable.rb:60:in `run_initializers'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/railties-5.2.6/lib/rails/application.rb:361:in `initialize!'
/Users/eduardomeza/Downloads/skeleton 13/config/environment.rb:5:in `<main>'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/railties-5.2.6/lib/rails/application.rb:337:in `require_environment!'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/railties-5.2.6/lib/rails/application.rb:520:in `block in run_tasks_blocks'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:241:in `each'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:241:in `invoke_prerequisites'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/railties-5.2.6/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/railties-5.2.6/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/railties-5.2.6/lib/rails/command.rb:48:in `invoke'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/railties-5.2.6/lib/rails/commands.rb:18:in `<main>'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/Users/eduardomeza/.rvm/gems/ruby-3.0.1/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:setup => db:schema:load_if_ruby => db:create => db:load_config => environment
I am currently using:
- "ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [arm64-darwin20]"
- "Rails 5.2.6"
- ""Postgress.app""
- SQLite version 3.32.3 2020-06-18 14:16:19
Gemfile is:
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
gem 'bootsnap', require: false
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2'
# Use postgresql as the database for Active Record
gem 'pg', '>= 1.0.0'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
gem 'jquery-rails'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
end
group :development do
gem 'pry-rails'
gem 'better_errors'
gem 'binding_of_caller'
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Project comes with a skeleton and many default files(You can click the link above and check the files since it an open project. The only thing Iam doing different is that I am not using ruby 2.5.1 as they suggest but I doubt that could be the issue. Very new to rails so if anyone can lead me to the right direction, I will really appreciated it. Thank you!
Aucun commentaire:
Enregistrer un commentaire