1

这是我认为正确的代码:

rails generate migration AddDirectorsToMovies Directors:string

当我运行rake db:test:prepare时,终端告诉我:

Run "rake db:migrate" to update your database then try again. The rake aborts.
4

1 回答 1

2

你先跑了rake db:migrate吗?该任务将生成架构文件,然后由rake db:test:prepare.

于 2012-11-06T02:28:47.507 回答