# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: sqlite3
database: db/development.sqlite3
timeout: 5000
# 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: sqlite3
database: db/test.sqlite3
timeout: 5000
This is the database.yml file. I'm very new to RoR and I'm trying to set
it up. In this file it has sqlite3... I'm using MySQl. What should I do?
Also I can see that there are several databases, development, test,
production. Do I need to create these databases? Tables?
Foo is the model you are creating (app/models/foo.rb).
Rails will generate a migration to create a database table based on the parameters you supply. In this case the 2 fields (integer and text).
After generating the scaffold look in:
db/migrations/001_create_foo.rb
You can add more fields if you want, then run
rake db:migrate