我正在使用MySQL数据库,Ruby 1.9.2-p290和Rails 3.0.3尝试首次部署该应用程序。
WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
at /home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
WARNING: Global access to Rake DSL methods is deprecated. Please include
... Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method Kazdoor::Application#task called at /home/amer/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.3/lib/rails/application.rb:214:in `initialize_tasks'
WARNING: Global access to Rake DSL methods is deprecated. Please include
... Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method Class#namespace called at /home/amer/.rvm/gems/ruby-1.9.2-p290/bundler/gems/calendar_date_select-8e7ec79435a6/lib/calendar_date_select.rb:31:in `block in <class:Railtie>'
WARNING: DSL method Class#desc called at /home/amer/.rvm/gems/ruby-1.9.2-p290/bundler/gems/calendar_date_select-8e7ec79435a6/lib/calendar_date_select.rb:32:in `block (2 levels) in <class:Railtie>'
WARNING: DSL method Class#task called at /home/amer/.rvm/gems/ruby-1.9.2-p290/bundler/gems/calendar_date_select-8e7ec79435a6/lib/calendar_date_select.rb:33:in `block (2 levels) in <class:Railtie>'
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Table 'dor_development.brands' doesn't exist
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.2.11/lib/active_record/connection_adapters/mysql2_adapter.rb:263:in `query'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.2.11/lib/active_record/connection_adapters/mysql2_adapter.rb:263:in `execute'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.2.11/lib/active_record/connection_adapters/mysql2_adapter.rb:413:in `columns'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.3/lib/active_record/base.rb:679:in `columns'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.3/lib/active_record/persistence.rb:284:in `attributes_from_column_definition'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.3/lib/active_record/locking/optimistic.rb:62:in `attributes_from_column_definition'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.3/lib/active_record/base.rb:1394:in `initialize'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-2.3.2/lib/factory_girl/proxy.rb:106:in `new'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-2.3.2/lib/factory_girl/proxy.rb:106:in `object'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-2.3.2/lib/factory_girl/proxy.rb:84:in `result_instance'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-2.3.2/lib/factory_girl/proxy/build.rb:11:in `result'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-2.3.2/lib/factory_girl/proxy/create.rb:5:in `result'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-2.3.2/lib/factory_girl/factory.rb:163:in `run'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-2.3.2/lib/factory_girl/factory.rb:47:in `run'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-2.3.2/lib/factory_girl/syntax/methods.rb:148:in `run_factory_girl_proxy'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-2.3.2/lib/factory_girl/syntax/methods.rb:63:in `create'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-2.3.2/lib/factory_girl/syntax/vintage.rb:124:in `create'
/home/amer/Code/monopoly/test/factories/business_factory.rb:4:in `block in <top (required)>'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-2.3.2/lib/factory_girl/syntax/vintage.rb:30:in `define'
/home/amer/Code/monopoly/test/factories/business_factory.rb:1:in `<top (required)>'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:235:in `load'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:235:in `block in load'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:in `new_constants_in'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:235:in `load'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-2.3.2/lib/factory_girl/find_definitions.rb:20:in `block (2 levels) in find_definitions'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-2.3.2/lib/factory_girl/find_definitions.rb:19:in `each'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-2.3.2/lib/factory_girl/find_definitions.rb:19:in `block in find_definitions'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-2.3.2/lib/factory_girl/find_definitions.rb:15:in `each'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl-2.3.2/lib/factory_girl/find_definitions.rb:15:in `find_definitions'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/factory_girl_rails-1.4.0/lib/factory_girl_rails/railtie.rb:23:in `block in <class:Railtie>'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/lazy_load_hooks.rb:34:in `call'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/lazy_load_hooks.rb:42:in `each'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.3/lib/rails/application/finisher.rb:46:in `block in <module:Finisher>'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `instance_exec'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `run'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.3/lib/rails/initializable.rb:50:in `block in run_initializers'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `each'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `run_initializers'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.3/lib/rails/application.rb:134:in `initialize!'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.3/lib/rails/application.rb:77:in `method_missing'
/home/amer/Code/monopoly/config/environment.rb:4:in `<top (required)>'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `block in require'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:in `new_constants_in'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.3/lib/rails/application.rb:103:in `require_environment!'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.3/lib/rails/application.rb:216:in `block in initialize_tasks'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/amer/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/home/amer/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/amer/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/amer/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `load'
/home/amer/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `<main>'
Tasks: TOP => db:migrate => environment
答案 0 :(得分:0)
为什么您的工厂在开发环境中加载?你错误地做了吗?
group :development, :test do
gem 'factory_girl_rails'
end
而不是这个?
group :test do
gem 'factory_girl_rails'
end