Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (10 sloc) 587 Bytes
require 'activesupport'
require 'activerecord'
# Find environment
RACK_ENV = ENV['RACK_ENV'] || 'development' unless defined? RACK_ENV
# Load db config and establish connection
ActiveRecord::Base.establish_connection YAML.load(, 'config', 'database.yml'))).with_indifferent_access[RACK_ENV]
# Setup logger for activerecord
ActiveRecord::Base.logger =, 'log', "#{RACK_ENV}.log"), 'a'))
# Load libs from lib/
Dir[File.join(File.dirname(__FILE__), 'lib', '*.rb')].each {|lib| require lib }