Skip to content

Instantly share code, notes, and snippets.

@rkjha
Created March 21, 2014 17:05
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 rkjha/9690821 to your computer and use it in GitHub Desktop.
Save rkjha/9690821 to your computer and use it in GitHub Desktop.
Production config for database.yml while deploying a Rails application to openshift. [using postgresql]
production:
adapter: postgresql
encoding: unicode
pool: 5
database: <%=ENV['OPENSHIFT_APP_NAME']%>
host: <%=ENV['$OPENSHIFT_POSTGRESQL_DB_HOST']%>
port: <%=ENV['$OPENSHIFT_POSTGRESQL_DB_PORT']%>
username: <%=ENV['OPENSHIFT_POSTGRESQL_DB_USERNAME']%>
password: <%=ENV['OPENSHIFT_POSTGRESQL_DB_PASSWORD']%>
@trueheart78
Copy link

The host and port values have a leading '$' in them and caused issues when I attempted to use this setup recently. Everything worked just fine when I corrected those items.

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