![]() |
| Databases |
|
hermes369
|
Perhaps a silly question...
I'm looking at the Building a Rails application here: http://www.hostmysite.com/support/rubyonrails/buildapp/ The database.yml file differs a little bit from the default created by scaffold. I understand that for the purposes of the tutorial one simply replaces the information. I'm pretty sure I know what's going on in the example with the execption of what values to insert for
Yes, I know to put my internal database address in there and the name of my database; but!!! Unless I'm missing something, the database names for production and development are the same. This differs from what I'm seeing in the Rails tutorials I'm working through. So, I guess I want to know if I'm correct that the HMS way is indeed different, why this is so, if it matters, and how to handle it in my local environment before I ftp my app to HMS. Thanks for the help. B. |
||||||||||||||||||
|
|
|||||||||||||||||||
|
pmeserve
HostMySite Tech
|
Yes, it's intended that you use the same names for development and production databases. This is a reasonable choice for making a small/test application, because it allows you to switch between the two modes when you're testing and then deploying the application
If you were making a "real" Rails app you'd probably not do this - of course another possibility is that you would maintain separate database.yml files for development and production applications, which makes it all a bit of a moot point. The real database you need to ensure is different is the "test" one, as it'll get wiped out when you run tests |
||||||||||||
|
|
|||||||||||||
|
jstedman
|
If you would really like, you can purchase an additional database for dev or particularly test mode purposes. As testing in Rails will make a clean sweep of the test DB then copy from the dev DB, that's one case that you really can't use the same DB.
THen again, you shouldn't be testing on your live site anyway. If you'd like to set up an additional DB, contact support. |
||||||||||||
|
|
|||||||||||||
| Databases |
|
||
|


