wuet_w
Last Updated: February 25, 2016
·
897
· michiels
Fb613ae74d247c05eba250f575e2c9b0

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.

~/Code/enviu_challenges/script/setup

#!/bin/sh

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
Say Thanks
Respond