Skip to content

Instantly share code, notes, and snippets.

@cadyherron
Last active February 29, 2016 23:57
Show Gist options
  • Save cadyherron/19529124ddc5c0dcd617 to your computer and use it in GitHub Desktop.
Save cadyherron/19529124ddc5c0dcd617 to your computer and use it in GitHub Desktop.
How to deploy Rails app to Heroku with Figaro vars
  1. add the following to your Gemfile:

      gem 'rails_12factor'
    end```
    
    `gem 'figaro'`
    
    
    
  2. run bundle exec figaro install

  3. add ENV vars to config/application.yml and call them from config/secrets.yml

  4. deploy to Heroku with the following commands:

    heroku create git push heroku master (takes a little while) heroku run rake db:create heroku run rake db:migrate heroku open

  5. check on your app with the following:

    heroku logs -t (tail the prod logs) heroku run bash plus rails c to run Rails console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment