Skip to content

Instantly share code, notes, and snippets.

@uri
Last active June 17, 2016 14:16
Show Gist options
  • Save uri/a35e4bc3282968dea9752b26a1f39f08 to your computer and use it in GitHub Desktop.
Save uri/a35e4bc3282968dea9752b26a1f39f08 to your computer and use it in GitHub Desktop.
Useful Makefile for development convenience
start:
mysql.server start
redis-server &
stop:
mysql.server stop
redis-cli shutdown
clone-db:
bundle exec rake dev:db:branch_dup
bundle exec rake db:migrate
bundle exec rake db:test:prepare
compile:
env RAILS_ENV=production bundle exec rake assets:clobber
env RAILS_ENV=production bundle exec rake assets:precompile
test-modified:
git diff --name-only | grep _spec.rb | xargs bundle exec rspec
puma: puma.config
bundle exec puma -w 2 -t 2:15 -b tcp://0.0.0.0:3000 -C puma.config
puma.config:
echo "worker_timeout 10" > puma.config
clean:
rm puma.config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment