Skip to content

Instantly share code, notes, and snippets.

@jpopesculian
Created November 1, 2016 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpopesculian/38560451ce0914c197ca72e08042b64a to your computer and use it in GitHub Desktop.
Save jpopesculian/38560451ce0914c197ca72e08042b64a to your computer and use it in GitHub Desktop.
Helpful script to get rails app branch up and running in production mode
#!/bin/bash
PORT=8080
DIR=$HOME/Development/single-ops-prod
rm -rf $DIR
git worktree add --detach $DIR
cd $DIR
RAILS_ENV=production
bundle exec rake assets:precompile
bundle exec rails server -p $PORT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment