Skip to content

Instantly share code, notes, and snippets.

@shri-zz
Created June 22, 2009 23:51
Show Gist options
  • Save shri-zz/134267 to your computer and use it in GitHub Desktop.
Save shri-zz/134267 to your computer and use it in GitHub Desktop.
print "Using SQL via IronRuby, activerecord-mssql-adapter\n"
require_dependency 'models/course'
require 'logger'
ActiveRecord::Base.logger = Logger.new("debug.log")
ActiveRecord::Base.configurations = {
'arunit' => {
:adapter => 'mssql',
:host => ENV['COMPUTERNAME'] + '\\SQLEXPRESS',
:database => 'activerecord_unittest',
:integrated_security => true
},
'arunit2' => {
:adapter => 'mssql',
:host => ENV['COMPUTERNAME'] + '\\SQLEXPRESS',
:database => 'activerecord_unittest2',
:integrated_security => true
}
}
ActiveRecord::Base.establish_connection 'arunit'
Course.establish_connection 'arunit2'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment