簡體   English   中英

Rails 中止了! ArgumentError:參數數量錯誤(給定 0,預期為 1..2)

[英]Rails aborted! ArgumentError: wrong number of arguments (given 0, expected 1..2)

我正在嘗試進行生產遷移並出現上述錯誤。 在開發模式下,它們工作正常,但是當我嘗試遷移到生產時出現此錯誤。

/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/activesupport-5.2.4.1/lib/active_support/cache/file_store.rb:24:in `initialize'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/activesupport-5.2.4.1/lib/active_support/cache.rb:60:in `new'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/activesupport-5.2.4.1/lib/active_support/cache.rb:60:in `lookup_store'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/railties-5.2.4.1/lib/rails/application/bootstrap.rb:67:in `block in <module:Bootstrap>'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/railties-5.2.4.1/lib/rails/initializable.rb:32:in `instance_exec'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/railties-5.2.4.1/lib/rails/initializable.rb:32:in `run'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/railties-5.2.4.1/lib/rails/initializable.rb:61:in `block in run_initializers'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/railties-5.2.4.1/lib/rails/initializable.rb:60:in `run_initializers'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/railties-5.2.4.1/lib/rails/application.rb:361:in `initialize!'
/home/Steven.Cahill/Brighter/Adviser/config/environment.rb:7:in `<main>'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:291:in `block in require'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:291:in `require'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/railties-5.2.4.1/lib/rails/application.rb:337:in `require_environment!'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/railties-5.2.4.1/lib/rails/application.rb:520:in `block in run_tasks_blocks'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/railties-5.2.4.1/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/railties-5.2.4.1/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/railties-5.2.4.1/lib/rails/command.rb:48:in `invoke'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/railties-5.2.4.1/lib/rails/commands.rb:18:in `<main>'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:291:in `block in require'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/Steven.Cahill/.rvm/gems/ruby-2.6.5/gems/activesupport-5.2.4.1/lib/active_support/dependencies.rb:291:in `require'

查看 Brighter/Adviser/config/environment.rb:7:in `'

此錯誤表明 rvm 在需要一些依賴項方面存在問題。

檢查您的 rvm 設置

調用此命令時需要正確指定參數數量

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM