Skip to content

Instantly share code, notes, and snippets.

@rthbound
Forked from soilforlifeforms/gist:8983234
Last active August 29, 2015 13:56
Show Gist options
  • Save rthbound/8983262 to your computer and use it in GitHub Desktop.
Save rthbound/8983262 to your computer and use it in GitHub Desktop.
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'mysql2'
#gem 'pg'
development:
adapter: postgresql
encoding: unicode
#reconnect: false
database: mxit_app_development
pool: 5
password:
#username: mxitapp
#password: Forgiven7
#pool: 5
# socket: /tmp/mysql.sock
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: postgresql
encoding: unicode
#reconnect: false
database: mxit_app_test
pool: 5
password:
production:
adapter: postgresql
encoding: unicode
#reconnect: false
database: mxit_app_production
pool: 5
password:
@rthbound
Copy link
Author

The different databases each require slightly different configuratoins (mysql might need certain settings, psql other certain settings). My postgresql database.yml file has contents more like this:

development:
  adapter: postgresql
  encoding: unicode
  username: ...
  password: ...
  database: ...
  host: ...
  port: 5432
  timeout: 5000
  pool: 5

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