Displaying 1 result from an estimated 1 matches for "dev_database_password".
2006 Jul 31
4
switching database dynamically based on incoming request
...e we could do the same for the database by adjusting
database.yml like so:
development:
adapter: mysql
database: <%= request.env[''DEV_DATABASE''] %>
host: localhost
username: <%= request.env[''DEV_DATABASE_USERNAME'']
password: <%= request.env[''DEV_DATABASE_PASSWORD'']
The idea being to have a virtual host config like:
<VirtualHost virtualhost1.us.com:80>
ServerName virtualhost1.us.com
SetEnv DEV_DATABASE virtualhost1
SetEnv DEV_DATABASE_USERNAME virtualhost1_username
SetEnv DEV_DATABASE_PASSWORD virtualhost1_password
DocumentRoot "/var/ww...