I was trying to create a test case in Rails 3.0 RC2 for an entirely separate question about connecting to external databases via establish_connection, but ran into a problem with rake db:create.
In short, "rake db:create" only creates two of the four databases listed in config/database.yml, and I can't figure out why. Here's the database.yml file. The only thing out of the ordinary is the :external database specification, but notice that its params are identical to the others:
========= file: config/database.yml development: adapter: mysql encoding: utf8 reconnect: false database: dbtest_development pool: 5 username: root password: XYZZY socket: /tmp/mysql.sock
external: adapter: mysql encoding: utf8 reconnect: false database: dbtest_external pool: 5 username: root password: XYZZY socket: /tmp/mysql.sock
test: adapter: mysql encoding: utf8 reconnect: false database: dbtest_test pool: 5 username: root password: XYZZY socket: /tmp/mysql.sock
production: adapter: mysql encoding: utf8 reconnect: false database: dbtest_production pool: 5 username: root password: XYZZY socket: /tmp/mysql.sock ========= EOF
But rake db:create only creates the _development and _test databases, not the _external nor _production. Here's the synopsis. My db BEFORE: