Skip to content

Instantly share code, notes, and snippets.

@laurenhavertz
Created July 22, 2013 21:00
Show Gist options
  • Select an option

  • Save laurenhavertz/6057629 to your computer and use it in GitHub Desktop.

Select an option

Save laurenhavertz/6057629 to your computer and use it in GitHub Desktop.

FOREMAN

-passes keys into a project from the env file

  • when you want to keep things private
    • (example:TWITTER API)
    • has info about your personal account that you don't want exposed on Git or GitHub
  1. in TERMINAL touch .env touch Procfile

  2. on ENV file:

    TWITTER_KEY = "key"

  3. on .rb file

#{ENV["TWITTER_KEY"]"

  1. on .gitignore

    .env

  2. in terminal

foreman run ruby sin.rb

FOREMAN FOR HEROKU

in terminal

  1. cd myapp
  2. heroku config:set TWITTER "keys"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment