How to setup a cloned Rails project on local machine?

git, ruby-on-rails

Solution

`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.

Problem

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!

Original source