Created
April 3, 2019 14:21
-
-
Save krisleech/4c33d09a1b9d3d690a9bffec832049b9 to your computer and use it in GitHub Desktop.
inline ActiveRecord and Bundler
This file contains 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
require "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
gem "activerecord" | |
gem "sqlite3" | |
end | |
require "active_record" | |
require "logger" | |
ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:") | |
ActiveRecord::Base.logger = Logger.new(STDOUT) | |
ActiveRecord::Schema.define do | |
create_table :fruits, force: true do |t| | |
end | |
end | |
class Fruit < ActiveRecord::Base | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment