Skip to content

Instantly share code, notes, and snippets.

@mikesjewett
Created September 10, 2012 22:29
Show Gist options
  • Save mikesjewett/3694445 to your computer and use it in GitHub Desktop.
Save mikesjewett/3694445 to your computer and use it in GitHub Desktop.
Setup Foreman to use environment constants for hiding sensitive info - local dev environment
# install Foreman
gem install foreman
#bash
export CONSTANT_NAME='name'
export CONSTANT_SOMETHING_ELSE='something_else'
#in app root directory create Procfile, .env and .gitignore
#Procfile
web: bundle exec rails s -p $PORT
#.env
CONSTANT_NAME = 'name'
CONSTANT_SOMETHING_ELSE = 'something_else'
#.gitignore (just add this line)
*.env
Links:
http://ddollar.github.com/foreman/
https://devcenter.heroku.com/articles/config-vars#local-setup
Notes:
must use 'foreman run' before all commands once you go down this road.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment