All your database tables were emptied because you didn’t have
development or production or test databases. You had one database that
you used for everything.
That “database” (or “host” in the case of modern Oracle) entry needs to
be different for each environment, generally corresponding to separate
entries in tsnames.ora, and those three (or however many) databases need
If you want three separate databases, you need three separate databases.
Different users on the same database are just that: different users, not
For more examples of Oracle database.yml entries, see:
If you’re still not clear on it, you may want to make sure you
understand how to set up and connect to multiple, distinct databases in
For most other databases, the distinction is made in the “database:”
entry in a database.yml block. Oracle’s terminology and setup are a bit
different because of the tsnames.ora way of doing things.
Chris R. wrote:
Dj T@l wrote:
For some reason it wants to use my development database instead of test.
Any ideas why?
When running test, rails dumps the development databse schema to the
database. So it need to connect to the development database.
OK, but that doesn’t explain why my development database tables were