0

我有一个空数据库,使用 创建rake db:create,当我对它运行 rake db:migrate 时,我得到 mysql2 错误。我在跑rails 3.2.8ruby - 1.9.3。我还尝试创建一个新的 rails 项目,rake db:create并且rake db:migrate运行良好

rake aborted!
Mysql2::Error: Table 'groups_empty_db.groups' doesn't exist: SHOW FULL FIELDS FROM `groups`
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:243:in `query'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:243:in `block in execute'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:243:in `execute'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/connection_adapters/mysql2_adapter.rb:211:in `execute'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:257:in `execute_and_free'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:424:in `columns'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/connection_adapters/schema_cache.rb:12:in `block in initialize'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/connection_adapters/schema_cache.rb:16:in `yield'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/connection_adapters/schema_cache.rb:16:in `default'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/connection_adapters/schema_cache.rb:16:in `block in initialize'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/relation/predicate_builder.rb:56:in `yield'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/relation/predicate_builder.rb:56:in `default'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/relation/predicate_builder.rb:56:in `block in build_from_hash'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/relation/predicate_builder.rb:4:in `each'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/relation/predicate_builder.rb:4:in `map'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/relation/predicate_builder.rb:4:in `build_from_hash'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/relation/query_methods.rb:327:in `build_where'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/relation/query_methods.rb:136:in `where'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activerecord-3.2.12/lib/active_record/querying.rb:9:in `where'
/home/username/Projects/Mentor_26_03_2012/ChronusMentor/app/models/group.rb:262:in `<class:Group>'
/home/username/Projects/Mentor_26_03_2012/ChronusMentor/app/models/group.rb:27:in `<top (required)>'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:469:in `load'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:469:in `block in load_file'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:639:in `new_constants_in'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:468:in `load_file'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:353:in `require_or_load'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:502:in `load_missing_constant'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:192:in `block in const_missing'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `each'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `const_missing'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:514:in `load_missing_constant'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:192:in `block in const_missing'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `each'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `const_missing'
/home/username/Projects/Mentor_26_03_2012/ChronusMentor/app/models/program.rb:116:in `<class:Program>'
/home/username/Projects/Mentor_26_03_2012/ChronusMentor/app/models/program.rb:58:in `<top (required)>'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:469:in `load'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:469:in `block in load_file'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:639:in `new_constants_in'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:468:in `load_file'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:353:in `require_or_load'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:502:in `load_missing_constant'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:192:in `block in const_missing'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `each'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `const_missing'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:514:in `load_missing_constant'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:192:in `block in const_missing'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `each'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `const_missing'
/home/username/Projects/Mentor_26_03_2012/ChronusMentor/app/models/user.rb:113:in `<class:User>'
/home/username/Projects/Mentor_26_03_2012/ChronusMentor/app/models/user.rb:28:in `<top (required)>'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:469:in `load'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:469:in `block in load_file'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:639:in `new_constants_in'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:468:in `load_file'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:353:in `require_or_load'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:502:in `load_missing_constant'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:192:in `block in const_missing'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `each'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `const_missing'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:514:in `load_missing_constant'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:192:in `block in const_missing'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `each'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `const_missing'
/home/username/Projects/Mentor_26_03_2012/ChronusMentor/app/models/member.rb:63:in `<class:Member>'
/home/username/Projects/Mentor_26_03_2012/ChronusMentor/app/models/member.rb:31:in `<top (required)>'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:469:in `load'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:469:in `block in load_file'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:639:in `new_constants_in'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:468:in `load_file'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:353:in `require_or_load'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:502:in `load_missing_constant'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:192:in `block in const_missing'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `each'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `const_missing'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:514:in `load_missing_constant'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:192:in `block in const_missing'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `each'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:190:in `const_missing'
/home/username/Projects/Mentor_26_03_2012/ChronusMentor/app/helpers/members_helper.rb:4:in `<module:MembersHelper>'
/home/username/Projects/Mentor_26_03_2012/ChronusMentor/app/helpers/members_helper.rb:1:in `<top (required)>'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:469:in `load'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:469:in `block in load_file'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:639:in `new_constants_in'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:468:in `load_file'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:353:in `require_or_load'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:313:in `depend_on'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:225:in `require_dependency'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/actionpack-3.2.12/lib/abstract_controller/helpers.rb:135:in `block in modules_for_helpers'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/actionpack-3.2.12/lib/abstract_controller/helpers.rb:131:in `map!'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/actionpack-3.2.12/lib/abstract_controller/helpers.rb:131:in `modules_for_helpers'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/actionpack-3.2.12/lib/action_controller/metal/helpers.rb:92:in `modules_for_helpers'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/actionpack-3.2.12/lib/abstract_controller/helpers.rb:95:in `helper'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/actionpack-3.2.12/lib/action_controller/railties/paths.rb:18:in `block (2 levels) in with'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/actionpack-3.2.12/lib/action_view/test_case.rb:11:in `<class:TestCase>'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/actionpack-3.2.12/lib/action_view/test_case.rb:10:in `<module:ActionView>'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/actionpack-3.2.12/lib/action_view/test_case.rb:8:in `<top (required)>'
/home/username/Projects/Mentor_26_03_2012/ChronusMentor/vendor/gems/prototype-rails-3.2.1/lib/prototype-rails/on_load_action_view.rb:17:in `<top (required)>'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
/home/username/Projects/Mentor_26_03_2012/ChronusMentor/vendor/gems/prototype-rails-3.2.1/lib/prototype-rails.rb:12:in `block (2 levels) in <class:Engine>'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/lazy_load_hooks.rb:26:in `block in on_load'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/lazy_load_hooks.rb:25:in `each'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/lazy_load_hooks.rb:25:in `on_load'
/home/username/Projects/Mentor_26_03_2012/ChronusMentor/vendor/gems/prototype-rails-3.2.1/lib/prototype-rails.rb:11:in `block in <class:Engine>'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/username/Projects/Mentor_26_03_2012/ChronusMentor/config/environment.rb:14:in `<top (required)>'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/railties-3.2.12/lib/rails/application.rb:103:in `require_environment!'
/home/username/.rvm/gems/ruby-1.9.3-p125@mentor/gems/railties-3.2.12/lib/rails/application.rb:297:in `block (2 levels) in initialize_tasks'
4

0 回答 0