ActiveRecord::UnknownAttributeError?

白昼怎懂夜的黑 提交于 2019-12-05 00:11:43

It's cliché but I tried again in the morning and it works perfectly! I suspect it might have been a propagation issue of some sort.

dnszero

I had this same issue with my Heroku app in production, but not with my nearly identical app in staging.

What was the difference? My staging app only had 1 web dyno instead of 2.

So I manually scaled my Production app down to 0 web dynos, then back up to 2.

BAM! Problem solved.

Was pulling my hair out on this one until I saw Leito's comment above.

heroku restart --app staging

fixed this one for me.

Try this

attr_reader :seats
attr_accessor :seats

instead of

attr_accessible :seats
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!