I’m fairly new to Ruby on Rails / Git and had a few questions about database setup for different environments. Right now I’ve got what I think is a pretty solid setup. I have all of my application code in my dropbox folder and I can push that to git and then I can push git to my dotcloud application.
Now for the question. I’ve got a local environment and a production environment. Should I be setting up two databases for my information or is there a way to synchronize the database and store a local copy? Or am I thinking about this the wrong way?
In rails for different enviornment we can set different databases.
In config/database.yml file.
Set different database for different enviornment or you can set same database for two environment.
Eg. For setting different database:
For developement mode:
For Production mode: