Last active
June 9, 2017 13:47
-
-
Save localytics-gist/36201ead570f76526219ff18b7b83f72 to your computer and use it in GitHub Desktop.
Sandbox for connecting to ODBC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'bundler/inline' | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'activerecord', '5.0.3' | |
| gem 'odbc_adapter', '5.0.3' | |
| end | |
| require 'active_record' | |
| require 'logger' | |
| ActiveRecord::Base.establish_connection(adapter: 'odbc', dsn: ARGV.shift) | |
| ActiveRecord::Base.logger = Logger.new(STDOUT) | |
| class ApplicationRecord < ActiveRecord::Base | |
| self.abstract_class = true | |
| end | |
| require 'irb' | |
| IRB.start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment