Skip to content

Instantly share code, notes, and snippets.

@moro
Created February 22, 2011 10:31
Show Gist options
  • Save moro/838478 to your computer and use it in GitHub Desktop.
Save moro/838478 to your computer and use it in GitHub Desktop.
require 'bundler'
Bundler.setup
require 'active_record'
require 'erb'
ActiveRecord::Base.establish_connection(
YAML.load(ERB.new(File.read('config/dev_database.yml')).result)["test"]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment