Okay, I understand the differences between the development, test, and production environments but what is the difference with the databases you put in databases.yml?

I switched my project to production for the heck and it still used the development DB (i checked database.yml it was correct and shouldnt use it).

What are they for?