New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heroku only: undefined method `ancestry' for #<Model:0x007f1684d797a8> #243
Comments
You did not migrate up your database (adding the |
Also of note, Heroku tends to loads all models at startup vs locally it tends to lazy load. To find these, I tend to go through the various controllers, so I'm exercising/loading all my code. Best of luck |
@etayluz Any chance the error you are seeing is on github and I could kick the tires? |
I have also "NoMethodError: undefined method `ancestry' " when I try to save my object in database. Of course I migrated up my database. And I have this error : NoMethodError: undefined method `ancestry' for #Component:0x00000005c95f68 My model is like this : My migration is like this :
end Please help me, what I done wrong ? |
The column should be called |
The column should be called |
Please reopen if this is still an issue. |
I'm seeing an issue on Heroku only (cannot reproduce locally):
A NoMethodError occurred in home#upload:
undefined method `ancestry' for #Model:0x007f1684d797a8
Method looks like this:
def anthem_upload
user = User.find_by(id: params[:user_id])
anthem = Anthem.create!(user_id: user.id, body:params[:post]) <-- happens here
...
ene
This method doesn't even call on .ancestry method - but the exception happens as soon as model is created.
Model looks like this:
class Anthem < ActiveRecord::Base
has_ancestry
...
end
The text was updated successfully, but these errors were encountered: