This solution worked perfectly. Thank you!
I fixed each one individually, but I think I could have done the destroy_all and update_all stuff in one rails console session, then issued the rake categories:create_definition command once at the end. What do you think? It might save somone a few minutes at some point.