Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew White pixeltrix

View GitHub Profile
View ar_mysql2_bug.rb
# Must have mysql installed with database 'activerecord_unittest' and user 'rails'
unless File.exists?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'mysql2'
GEMFILE
system 'bundle'
View gist:217074
# This works
require 'rubygems'
require 'activesupport'
class Base
def self.cry
"#{self.name}.cry called!"
end
end