ant*_*ony 0 migration rails-engines ruby-on-rails-4
我创建了一个新的rails 4引擎并添加了一个模型.我正在尝试使用迁移数据库
RAILS_ENV=test rake db:migrate
Run Code Online (Sandbox Code Playgroud)
它回来时没有错误.但是,当我跑:
rspec spec
Run Code Online (Sandbox Code Playgroud)
返回错误表明存在挂起的迁移.
Migrations are pending; run 'rake db:migrate RAILS_ENV=test' to resolve this issue. (ActiveRecord::PendingMigrationError)
Run Code Online (Sandbox Code Playgroud)
如果我查看我的数据库(在pg和sqlite上试过)它们还没有被运行并且没有创建表,那也是如此.运行上面列出的建议命令不会运行迁移.
'engine_name/db/migrate'中只有一个迁移,虚拟应用内没有迁移.
我正在使用ruby 2.0和rails 4.0.0.rc1.
| 归档时间: |
|
| 查看次数: |
2070 次 |
| 最近记录: |