I am currently working on an app. In this app, I created a Person model and I was using rail's dynamic attribute find feature. In the Person model I have an attribute called uid, so I was calling Person.find_by_uid(some numerical value). This worked fine in my development mode and the app was totally functioning. However, once I deployed this app to heroku. The app failed and the log complains about NoMethodError (undefined method `find_by_uid' for #):
I have been looking all places, but still unable to track down the problem. I tried to define the method find_by_uid under the Person model, and still does not work.
I was wonde开发者_高级运维ring if anyone has had similar experience or knows how to solve this issue?
Thank you very much ahead of the time!
Did you try running the migrations in heroku (heroku rake db:migrate)? Most provably that attribute is not in the heroku data base so you don't have that dynamic method.
I ran into the same problem. heroku restart
has saved me.
精彩评论