You can set them up and keep them secret using the Figaro Gem
Add it to your Gemfile and bundle. Then install Figaro:
bundle exec figaro install
Once it's installed, you'll have a new file called application.yml in your config folder
You can create environment variables there and they're ignored by Git so your secrets won't get published.
You can set different variables for different environments if you want.
development:
GMAIL_USERNAME: '[email protected]'
GMAIL_PASSWORD: notaRE41p4ssw0rD
production:
GMAIL_USERNAME: '[email protected]'
GMAIL_PASSWORD: notaRE41p4ssw0rD317h3R
To push them to Heroku:
$ figaro heroku:set -e production