参数:错误数量的参数(给定0,预期1.2)


  ** Invoke db:migrate:reset (first_time)
  ** Invoke db:drop (first_time)
  ** Invoke db:load_config (first_time)
  ** Execute db:load_config
  ** Execute db:drop
  ** Invoke db:create (first_time)
  ** Invoke db:load_config 
  ** Execute db:create
  ** Invoke db:migrate (first_time)
  ** Invoke environment (first_time)
  ** Execute environment
  rake aborted!
  ArgumentError: wrong number of arguments (given 0, expected 1..2)
    /usr/local/rvm/gems/ruby-2.3.3/gems/activesupport-4.2.5/lib/active_support/cache/file_store.rb:20:in `initialize'
    /usr/local/rvm/gems/ruby-2.3.3/gems/activesupport-4.2.5/lib/active_support/cache.rb:60:in `new'
    /usr/local/rvm/gems/ruby-2.3.3/gems/activesupport-4.2.5/lib/active_support/cache.rb:60:in `lookup_store'
    /usr/local/rvm/gems/ruby-2.3.3/gems/railties-4.2.5/lib/rails/application/bootstrap.rb:76:in `block in <module:Bootstrap>'
    /usr/local/rvm/gems/ruby-2.3.3/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
    /usr/local/rvm/gems/ruby-2.3.3/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
    /usr/local/rvm/gems/ruby-2.3.3/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
    /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
    /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
    /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
    /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
    /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `each'
    /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `call'
    /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
    /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
    /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
    /usr/local/rvm/gems/ruby-2.3.3/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
    /usr/local/rvm/gems/ruby-2.3.3/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
    /home/ubuntu/workspace/config/environment.rb:5:in `<top (required)>'
    /usr/local/rvm/gems/ruby-2.3.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
    /usr/local/rvm/gems/ruby-2.3.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
    /usr/local/rvm/gems/ruby-2.3.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
    /usr/local/rvm/gems/ruby-2.3.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
    /usr/local/rvm/gems/ruby-2.3.3/gems/railties-4.2.5/lib/rails/application.rb:328:in `require_environment!'
    /usr/local/rvm/gems/ruby-2.3.3/gems/railties-4.2.5/lib/rails/application.rb:457:in `block in run_tasks_blocks'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/task.rb:248:in `block in execute'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/task.rb:243:in `each'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/task.rb:243:in `execute'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/task.rb:187:in `block in invoke_with_call_chain'
    /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/task.rb:180:in `invoke_with_call_chain'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/task.rb:209:in `block in invoke_prerequisites'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/task.rb:207:in `each'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/task.rb:207:in `invoke_prerequisites'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/task.rb:186:in `block in invoke_with_call_chain'
    /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/task.rb:180:in `invoke_with_call_chain'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/task.rb:209:in `block in invoke_prerequisites'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/task.rb:207:in `each'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/task.rb:207:in `invoke_prerequisites'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/task.rb:186:in `block in invoke_with_call_chain'
    /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/task.rb:180:in `invoke_with_call_chain'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/task.rb:173:in `invoke'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/application.rb:152:in `invoke_task'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/application.rb:108:in `each'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/application.rb:108:in `block in top_level'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/application.rb:117:in `run_with_threads'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/application.rb:102:in `top_level'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/application.rb:80:in `block in run'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/application.rb:178:in `standard_exception_handling'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/lib/rake/application.rb:77:in `run'
    /usr/local/rvm/gems/ruby-2.3.3/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
    /usr/local/rvm/gems/ruby-2.3.3/bin/rake:22:in `load'
    /usr/local/rvm/gems/ruby-2.3.3/bin/rake:22:in `<main>'
    /usr/local/rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `eval'
    /usr/local/rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `<main>'
    Tasks: TOP => db:migrate:reset => db:migrate => environment

我找不到错误的来源。请帮助我。

rake db:setup RAILS_ENV=production

相关内容

  • 没有找到相关文章

最新更新