Reputation: 17160
When you clone a Rails project and you want to get it up and running on your computer, you first run bundle install
, but what do you do next? Specifically, how do you setup the database? I can get it working using rake db:migrate
but this changes the schema.rb
file and I don't want to have to commit that to my git history. Are there some rake tasks for doing this or some way of properly doing this? Any insight would be much appreciated!
Upvotes: 4
Views: 3221
Reputation: 47548
rake db:create && rake db:schema:load
should create the database specified in config/database.yml
for the current environment, and create the tables/indexes specified in db/schema.rb
. You probably want to do rake db:test:prepare
to set up the test database as well.
Upvotes: 5