method=POST path=/api/v1/follow_requests/XXXX/authorize format=html controller=Api::V1::FollowRequestsController action=authorize status=500 error='NameError: undefined local variable or method `show_reblogs' for #<FollowRequest:XXXXXX>' duration=34.57 view=0.00 db=2.20
okay so what did I do or not do to make this happen #mastodev
yay
new error that is almost exactly the same as the old error but is in a different place
method=POST path=/api/v1/accounts/XXX/follow format=html controller=Api::V1::AccountsController action=follow status=500 error='ActiveModel::UnknownAttributeError: unknown attribute 'show_reblogs' for FollowRequest.' duration=28.13 view=0.00 db=5.17
@InspectorCaracal is this an ORM error? If the table hasn't changed maybe the thing that defines the relationship between the objects and the table? Probably an xml
@daHob I'll check that; all the code files and stuff should be good though? The table didn't have the column, so I added it and the first error went away but I'm getting the second error instead
@InspectorCaracal ah, yeah if your database and the ORM model get out of sync you can have troubles. The ones I've used build the all table mappings the first time you touch anything in the db. So, any sync error blows up the whole thing on the first db request
@daHob shit
how do I rebuild it?
@InspectorCaracal @daHob Rails defines class methods on the models based on what columns are in the database. The only way it can not have a method AND the column exists in the database is when you haven't restarted Rails after you updated the database table schema. Otherwise, if a method is missing in Rails, it means the column is missing in the database.
@Gargron @InspectorCaracal @daHob we have restarted rails, following still causes 500. talk to me eugen what am i doing wrong here
@squirrel @InspectorCaracal @daHob It's not a common situation you've got and I'm at a loss for how exactly you got into it. The useless problem description is "your database is out of sync with the db/schema.rb of the mastodon version you're trying to run". How did you get here? Did you make and restore a db backup excluding the schema_migrations table?
@daHob @InspectorCaracal @Gargron table follow_requests in the database has column show_reblogs properly set up. rails model FollorRequest has no :show_reblog attribute.