我想部署我的rails应用程序,我在动作教程中遵循Rails 4。我已经成功地推到Heroku的,但是当运行耙分贝:迁移我得到这个错误:PG :: Undefinedtable:错误:当运行rake db:在Heroku上迁移
heroku run rake db:migrate
Running rake db:migrate on ⬢ fast-lowlands-66439... up, run.6711 (Free)
ActiveRecord::SchemaMigration Load (10.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
Migrating to CreateStates (20161123222713)
(2.5ms) BEGIN
== 20161123222713 CreateStates: migrating =====================================
-- create_table(:states)
-- add_reference(:tickets, :state, {:index=>true, :foreign_key=>true})
(1.4ms) ALTER TABLE "tickets" ADD "state_id" integer
(9.7ms) CREATE INDEX "index_tickets_on_state_id" ON "tickets" ("state_id")
(4.6ms) ALTER TABLE "tickets" ADD CONSTRAINT "fk_rails_fc553dc329"
FOREIGN KEY ("state_id")
REFERENCES "states" ("id")
(0.6ms) ROLLBACK
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::UndefinedTable: ERROR: relation "states" does not exist
: ALTER TABLE "tickets" ADD CONSTRAINT "fk_rails_fc553dc329"
FOREIGN KEY ("state_id")
REFERENCES "states" ("id")
的应用本地工作和表确实存在。
让我知道你是否需要任何额外的文件发布。 非常感谢您的帮助。