0
我的模型有问题。当我推到heroku我得到错误:Rails/Heroku未定义方法错误
Completed 500 Internal Server Error in 6ms (ActiveRecord: 1.5ms)
ActionView::Template::Error (undefined method `parent_id' for #<Kategorie:0x007f607f8a3ea0>):
当我在本地主机运行我的应用程序没有问题。我试图跑
heroku run rake db:migrate
heroku run rake db:migrate:status --app app_name
heroku restart
但没有为我工作。
更新:
当我检查状态一切正常。分类表是空的,但一切都在本地服务器上运行。
在我的模型,我有:
has_many :children, class_name: "Kategorie", foreign_key: "parent_id"
最新状态?所有迁移都已结束? –
“Kategories”表中是否有任何数据? – Sajan