Skip to content

Instantly share code, notes, and snippets.

@csexton
Created July 17, 2014 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csexton/99e86d49b53b10c5fa23 to your computer and use it in GitHub Desktop.
Save csexton/99e86d49b53b10c5fa23 to your computer and use it in GitHub Desktop.
Generic Rails Database Config for Heroku and Postgres
<%
user = ENV['USER']
app = ENV['RAILS_DB_APP_NAME'] || 'myapp'
%>
base: &generic
adapter: postgresql
encoding: unicode
pool: 5
username: <%= user %>
password:
host: localhost
development:
<<: *generic
database: <%= app >_development
test:
<<: *generic
database: <%= app >_test
production:
<<: *generic
database: <%= app >_production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment