Last Updated: February 25, 2016
· michiels

script/setup script for your app

Make everyone on your team happy, and create a script/setup for your Rails apps that instantly sets it up for development. This is handy when you borked things up and just want to revert to a clean database with some seeds or fixtures. And it is great because everyone on your team knows how to instantly get up and running on a new machine.

Here is a sample of a script/setup task in one of your apps that both developers and designers work on. Just run script/setup from your product dir and everything goes awesome.



brew install sphinx --mysql

rm -f log/*
bundle install --without production
bundle exec rake db:create
bundle exec rake db:schema:load
bundle exec rake db:fixtures:load
bundle exec rake db:seed