Skip to content

Instantly share code, notes, and snippets.

View jdblack's full-sized avatar

James Blackwell jdblack

View GitHub Profile
@jdblack
jdblack / Rakefile
Created January 1, 2017 23:52 — forked from schickling/Rakefile
Activerecord without Rails
require "active_record"
namespace :db do
db_config = YAML::load(File.open('config/database.yml'))
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'})
desc "Create the database"
task :create do
ActiveRecord::Base.establish_connection(db_config_admin)