Reply to topic
Databases
hermes369


Joined: 07 Apr 2004
Posts: 7
Location: GA
Reply with quote
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
Code:
&login
and
Code:
mysql server
and
Code:
database name


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

Joined: 19 Mar 2004
Posts: 178
Reply with quote
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


Joined: 29 Apr 2006
Posts: 27
Location: Newark, DE
Reply with quote
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
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic