Skip to content

Instantly share code, notes, and snippets.

@kiafaldorius
kiafaldorius / active_record_sqlite_in_memory_db.rb
Created September 3, 2018 03:05 — forked from thomasklemm/active_record_sqlite_in_memory_db.rb
Awesome ActiveRecord bug report script. How to use ActiveRecord and SQLite in a Ruby script.
# Based on http://www.jonathanleighton.com/articles/2011/awesome-active-record-bug-reports/
# Run this script with `$ ruby my_script.rb`
require 'sqlite3'
require 'active_record'
# Use `binding.pry` anywhere in this script for easy debugging
require 'pry'
# Connect to an in-memory sqlite3 database