0

在我最近的提交中,我在名为 Submissions 的表/模型中添加了一个名为“accepted”的布尔列。它在我的测试和开发环境中迁移得很好,但是当我将它推送到 Heroku 时,它似乎不起作用。推动后我使用:

heroku run rake db:migrate

这是输出:

Running `rake db:migrate` attached to terminal... up, run.2430
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 in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.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 in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/Rakefile:7)
** [NewRelic][01/29/13 23:23:10 +0000 0d3d429d-5437-42d0-9c57-e15606717231 (2)] INFO : Starting the New Relic Agent.
** [NewRelic][01/29/13 23:23:10 +0000 0d3d429d-5437-42d0-9c57-e15606717231 (2)] INFO : Environment: production
** [NewRelic][01/29/13 23:23:10 +0000 0d3d429d-5437-42d0-9c57-e15606717231 (2)] INFO : Dispatcher: thin
** [NewRelic][01/29/13 23:23:10 +0000 0d3d429d-5437-42d0-9c57-e15606717231 (2)] INFO : Application: chicagoimprovfestival
** [NewRelic][01/29/13 23:23:10 +0000 0d3d429d-5437-42d0-9c57-e15606717231 (2)] INFO : Installing ActiveRecord instrumentation
** [NewRelic][01/29/13 23:23:10 +0000 0d3d429d-5437-42d0-9c57-e15606717231 (2)] INFO : Installing Net instrumentation
** [NewRelic][01/29/13 23:23:10 +0000 0d3d429d-5437-42d0-9c57-e15606717231 (2)] INFO : Installing Rails 3 Controller instrumentation
** [NewRelic][01/29/13 23:23:10 +0000 0d3d429d-5437-42d0-9c57-e15606717231 (2)] INFO : Installing Rails 3.1/3.2 view instrumentation
** [NewRelic][01/29/13 23:23:10 +0000 0d3d429d-5437-42d0-9c57-e15606717231 (2)] INFO : Installing Rails3 Error instrumentation
** [NewRelic][01/29/13 23:23:10 +0000 0d3d429d-5437-42d0-9c57-e15606717231 (2)] INFO : Finished instrumentation
** [NewRelic][01/29/13 23:23:12 +0000 0d3d429d-5437-42d0-9c57-e15606717231 (2)] INFO : Starting Agent shutdown

在日志中,我收到此错误:

ActionView::Template::Error (undefined method `accepted' for #<Submission:0x00000005e71080>):

当然,我在开发中不会遇到这样的错误。有什么建议吗?我的迁移失败了吗?

4

1 回答 1

0

迁移没有添加到提交中。我修复了它,现在它似乎正在工作。

于 2013-01-30T00:27:01.600 回答