title: Is the Ruby on Rails database stored in the same place as the rails code by default?
body: <p>I am relatively new to Rails and web development. This is a simple conceptual question. Say you are developing the rails code on your local machine and then you push your code to a server. Is your rails code stored in the same place as the database for your application by default? How does rails know where to put the database on disk when you first push to a remote server? There must be a default, and how do you change the default?</p>
  
  <p>Furthermore, when you first create an app and run the app locally, there must be a local database, so what exactly happens when you push the code to a server?</p>
  
  <p>Would you ever put the database on a different server than where the rails code lies?</p>