Skip to content

Instantly share code, notes, and snippets.

@yannvery
Last active August 29, 2015 14:10
Show Gist options
  • Select an option

  • Save yannvery/f26a48e8843596590bbe to your computer and use it in GitHub Desktop.

Select an option

Save yannvery/f26a48e8843596590bbe to your computer and use it in GitHub Desktop.
Heroku deployment reminer

Requirements

By default heroku uses a pg database.

Don't forget to add in your Gemfile :

group :production do
  # Use postgresql as the database for Active Record
  gem 'pg'
  gem 'rails_12factor', group: :production
end

and also place your sqlite gem on group development if needed

group :development do
  # Use sqlite3 as the database for Active Record
  gem 'sqlite3'
end
```

## Heroku multiple account
I used multiple account for heroku so I need to specify one on my git config

git config heroku.account personal


## Installation
### Create an heroku instance

heroku create


### Push a specific branch

git push heroku yourbranch:master


### Run a db migrate

heroku run rake db:migrate


## Addons
### Mongo
If you need to uses mongo just add this addon : 

heroku addons:add mongolab


On `config/mongoid.yml` add these lines

production: sessions: default: uri: <%= ENV['MONGOLAB_URI'] %> options:

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