Rails 应用程序在本地运行但不能在 Heroku 上运行

Rails app working locally but not on Heroku

我在 heroku 上继承了一个 rails 应用 运行ning。我需要添加一些我所做的数据库字段,它在本地工作。我向 heroku 部署了一个新版本 运行 db:migrate,但由于某种原因它无法正常工作。似乎认为这些字段不存在,但是 运行ning db:migrate:status 我可以看到迁移有 运行:

> heroku run rake db:migrate:status
Running rake db:migrate:status attached to terminal... up, run.6278

database: **censored***

Status   Migration ID    Migration Name
--------------------------------------------------
up     20120107003506  Create conferences
up     20120112003506  Create users
up     20120116200332  Alter conferences country varchar
up     20120116213331  Alter conferences subject varchar
up     20120123215724  Split user name in two
up     20120123224808  Alter conferences add csv generated date
up     20120128211622  Increase conference text field size
up     20120128213531  Add indexes to conferences
up     20120131192147  Add role to user
up     20120131225950  Change subject to subject
up     20120209204719  Add status id to conferences
up     20120625221325  Add index to status
up     20120625225604  Add email sent to conferences
up     20120626231155  Rename email sent column
up     20120706141747  Set organiser emails to lowercase
up     20160112093201  Add conference type to conference
up     20160112142416  New fields

最后两次迁移是我的。 我还需要做其他事情吗?

版本: ruby1.9.3 rails3.2.3

您需要重新启动 Dyno 才能使迁移生效。从命令行:

heroku restart -a your_app_name