Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 4 Heroku迁移错误_Ruby On Rails 4_Heroku - Fatal编程技术网

Ruby on rails 4 Heroku迁移错误

Ruby on rails 4 Heroku迁移错误,ruby-on-rails-4,heroku,Ruby On Rails 4,Heroku,PG::不可定义: 错误:关系“单位消耗”不存在 : ALTER TABLE "products" ADD CONSTRAINT "fk_rails_6c18c32772" FOREIGN KEY ("unitConsumption_id") REFERENCES "unitConsumptions" ("id") 这不是问题…我发现了错误。这是因为我编写了camelcase模型,并且类名不正确。模型产品属于单位消耗和类单位消耗

PG::不可定义:

错误:关系“单位消耗”不存在

: ALTER TABLE "products" ADD CONSTRAINT "fk_rails_6c18c32772"
FOREIGN KEY ("unitConsumption_id")
  REFERENCES "unitConsumptions" ("id")

这不是问题…我发现了错误。这是因为我编写了camelcase模型,并且类名不正确。模型产品属于单位消耗和类单位消耗