Skip to content

Instantly share code, notes, and snippets.

@danmartens
Created August 28, 2012 18:22
Show Gist options
  • Save danmartens/3501709 to your computer and use it in GitHub Desktop.
Save danmartens/3501709 to your computer and use it in GitHub Desktop.
Attempts to fix Rails applications
# Only the professor can fix it
fixit() {
clear;
echo -e '\x1B[30;45m'"\n\033[1m Bundle installing... \033[0m\n";
bundle install;
echo -e '\x1B[30;45m'"\n\033[1m Migrating database... \033[0m\n";
bundle exec rake db:migrate;
echo -e '\x1B[30;45m'"\n\033[1m Clearing Rails cache... \033[0m\n";
rails runner "Rails.cache.clear";
echo -e '\x1B[30;45m'"\n\033[1m Restarting Pow... \033[0m\n";
powder restart;
echo -e '\x1B[30;45m'"\n\033[1m Fixed it! \033[0m";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment