[英]Rails app working locally but not on Heroku
I inherited a rails app running on heroku. 我继承了在heroku上运行的Rails应用程序。 I needed to add some database fields which I did and it works locally. 我需要添加一些我所做的数据库字段,并且它可以在本地工作。 I deployed a new version to heroku, ran db:migrate, but for some reason it's not working. 我在heroku上部署了一个新版本,运行db:migrate,但是由于某种原因它无法正常工作。 It seems to think the fields don't exist, but running db:migrate:status I can see the migrations have run: 似乎认为该字段不存在,但是运行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
The last two migrations are mine. 最后两个迁移是我的。 Do I need to do something else? 我还需要做其他事情吗?
Versions: ruby 1.9.3 rails 3.2.3 版本:ruby 1.9.3 rails 3.2.3
You need to restart your Dyno for the migrations to take effect. 您需要重新启动Dyno才能使迁移生效。 From the command line: 在命令行中:
heroku restart -a your_app_name
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.