Iteration A1 (Configure the Application)

アプリケーションの設定


database.yml を以下の状態にする。

~/depot$ cat config/database.yml
development:
  adapter: mysql
  database: depot_development
  host: localhost
  username: 
  password: 

# Warning: The database defined as 'test' will be erased and
# re-generated from your development database when you run 'rake'.
# Do not set this db to the same as development or production.
test:
  adapter: mysql
  database: depot_test
  host: localhost
  username: 
  password:

production:
  adapter: mysql
  database: depot_production
  host: localhost
  username: prod
  password: wibble
~/depot$

デフォルトの状態は以下。

~/depot$ cat config/database.yml.ORG
development:
  adapter: mysql
  database: rails_development
  host: localhost
  username: root
  password: 

# Warning: The database defined as 'test' will be erased and
# re-generated from your development database when you run 'rake'.
# Do not set this db to the same as development or production.
test:
  adapter: mysql
  database: rails_test
  host: localhost
  username: root
  password:

production:
  adapter: mysql
  database: rails_production
  host: localhost
  username: root
  password: 
~/depot$

diff も (余計)。

~/depot$ ls config/database.yml*
database.yml   database.yml.ORG
~/depot$ diff config/database.yml config/database.yml.ORG
3c3
<   database: depot_development
---
>   database: rails_development
5c5
<   username: 
---
>   username: root
13c13
<   database: depot_test
---
>   database: rails_test
15c15
<   username: 
---
>   username: root
20c20
<   database: depot_production
---
>   database: rails_production
22,23c22,23
<   username: prod
<   password: wibble
---
>   username: root
>   password: 
~/depot$