Skip to content

Instantly share code, notes, and snippets.

@jnwheeler44
Created February 16, 2012 09:06
Show Gist options
  • Select an option

  • Save jnwheeler44/1843508 to your computer and use it in GitHub Desktop.

Select an option

Save jnwheeler44/1843508 to your computer and use it in GitHub Desktop.
Example configuration for database.yml in version control. Allows override of default values.
default_dev: &default_dev
adapter: postgresql
host: localhost
database: db
pool: 500
username: user
password: pass
timeout: 25000
<%= file = File.join(Rails.root.to_s, "../config", "dev.yml")
IO.read(file) if File.exist?(file) %>
development:
<<: *default_dev
# ../config/dev.yml
database: my_db_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment