1

我正在尝试部署到 heroku,但遇到了一个问题:当我运行 heroku rake db:seed (它在我的数据库中创建管理员用户)时,rails 返回我有待处理的迁移。我已经手动删除了这些迁移(我不应该这样做,我知道),我该如何解决这个问题?

Charlie@CHARLIE-PC /c/rails/rails_projects/METACRITIC (master)
$ rake db:migrate

Charlie@CHARLIE-PC /c/rails/rails_projects/METACRITIC (master)
$ heroku run rake db:seed
Running `rake db:seed` attached to terminal... up, run.1
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support
 for these plugins will be removed in Rails 4.0. Move them out and bundle them i
n your Gemfile, or fold them in to your app as lib/myplugin/* and config/initial
izers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonr
ails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required
)> at /app/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support
 for these plugins will be removed in Rails 4.0. Move them out and bundle them i
n your Gemfile, or fold them in to your app as lib/myplugin/* and config/initial
izers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonr
ails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required
)> at /app/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support
 for these plugins will be removed in Rails 4.0. Move them out and bundle them i
n your Gemfile, or fold them in to your app as lib/myplugin/* and config/initial
izers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonr
ails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required
)> at /app/Rakefile:7)
You have 2 pending migrations:
  20121013054027 Addcolumnimagetoshow
  20121013063205 AddAttachmentToShows
Run `rake db:migrate` to update your database then try again.

Charlie@CHARLIE-PC /c/rails/rails_projects/METACRITIC (master)
$
4

1 回答 1

2

您在本地(rake db:migrate)运行迁移,而不是在 heroku 上运行heroku run rake db:migrate

于 2012-10-21T10:48:52.387 回答