This mostly happens when there is a typo, so make sure the associations are correctly spelled, you may also specifically specified your
class_name: , foreign_key:
Don't also forget to confirm your file name match the classname also repeat this check on your concerns if any.