>From my research, it appears that I have to manually create database tables. I was wondering if there is a gem or something else in ROR that would auto-create the database for me based upon my ruby model. Thanks.
on 2007-01-22 01:40
on 2007-01-22 03:31
The fields themselves won't be auto created, but when you do ./script/generate model model_name, you'll also get a db migration file generated for ya.
on 2007-01-22 14:13
You have to manually create the empty db yourself (eg mysqladmin create foo_development) When you generate the model an empty migration is created in db\migrate. Edit this to define the table columns and then run rake db:migrate. Read about migrations, much nicer than hand coding sql scripts.