Show
Destroy
An entry
Get it down. Make it good. Share it.
Title
Text
Recently, I needed to run a one-time task from my local environment against a remote environment in Rails. In doing so, I needed to customize a connection for some obscure non-production calls (things like calling system commands, and direct DB queries). In any case, the code looked like: In an initializer or rake task: `CONFIG = YAML::load(File.open('config/custom_database.yml'))` In the /config directory `/config/custom_database.yml` ``` default: &default adapter: postgis encoding: utf8 development: <<: *default database: database username: username password: password host: host port: 5482 ```
Status
idea
draft
release
personal
Series
Part of a Series?
Bitcoin
On Work
Phoenix Trello Tutorial
Civics
Re Email Address
Tags
rails
×
notes
×
snippets
×
+
Slug
Url
Image 1
Image 2
Image 3
Visible
Date