Hiding my API keys07 Jan 2015
I don't want to expose API secret keys, but I still want to be able to commit my changes and push to github.
- Install figaro gem
- set environment variables in config/application.yml
- make sure .gitignore ignores config/application.yml
- in the initializer code, (for my week3 app, I put this in config/initializer/twitter.rb) use ENV['my_api_key'] instead of hardcoding the api key
- after deploying to heroku, run this command to set heroku's env variables
figaro heroku:set -e production