Rails 运行时候提示表不存在~

suchiva · June 06, 2014 · Last by posebear1990 replied at October 14, 2015 · 1990 hits

运行 bundle exec rake db:migrate 时候报错~

ActiveRecord::StatementInvalid: Mysql2::Error: Table 'testror_development.schema_migrations' doesn't exist: SELECT schema_migrations.* FROM schema_migrations

rake db:create 先?

是不是数据库还在,迁移历史表被删了。。。。

rake db:drop
rake db:create
rake db:migrate

试下这样行不行,相当于重建表,可排除误操作数据库。

#2 楼 @pynix 这种情况会怎么样?

You need to Sign in before reply, if you don't have an account, please Sign up first.