How to set up a cloned Rails project on a local computer?

When you clone a Rails project and want to run it and run it on your computer, start it first bundle install, but what will you do next? In particular, how do you set up the database? I can make it work with rake db:migrate, but that modifies the file schema.rb, and I don't want this to be in my git history. Are there any rake tasks for this or some way to do it right? Any insight would be greatly appreciated!

+3
source share
1 answer

rake db:create && rake db:schema:load

must create the database specified in config/database.ymlfor the current environment and create the tables / indexes specified in db/schema.rb. You might want to do this rake db:test:prepareto set up a test database.

+4
source

All Articles