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

@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?

@Gargron The short version is I made a few v bad decisions.

The longer version: I ran db:setup before importing in the old database, the database migrations were thus fucked up when they tried to run because some of the columns and changes were present and some weren't, I tried to handle this by commenting out the pieces of the migrations that were throwing "already exists" errors.

@InspectorCaracal Okay then can you drop the database and import your backup freshly and then run the migrations?

@Gargron @InspectorCaracal i do not want to do this. if we absolutely have to then let's do it soon rather than later. but i do not like this option. is there seriously no other way

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!