0

I already done one project using Rails 6 version with PostgreSQL 9.6 version. And for learning TDD purpose, I created new project and tried to use my old project's database. And I have Categories and Articles which are having many to many association. While I trying to run one simple test case it showing Relation categories does not exist error. The same test model I copied to my old rails project, But there its successfully running.

I am new to Ruby and rails world. Is there any additional thing that I need to take care when using existing database to new project? Or Do I need to add the association again in my new project?

Can anyone suggest/guide me to avoid these type of errors while using existing database while working with new rails project please?

2
  • 2
    Don't make it harder on yourself. Start fresh with a new database. It will be much easier to focus on learning the TDD concepts if you start with a clean slate instead of a bunch of legacy. Commented Dec 2, 2024 at 14:35
  • Did you ensure your new config/database.yml file is pointing at the correct database? Your error sounds more on the Rails side than the Postgres side though. Can you add your test code? Commented Dec 9, 2024 at 18:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.