Run the following: (you must be using Ruby 2.0 obviously)
:adapter => defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3',
:database => ':memory:'
ActiveRecord::Base.connection.execute('CREATE TABLE users (id INTEGER PRIMARY KEY, email TEXT)')
module A; end
class User < ActiveRecord::Base
The last line will blow up with an error similar to _run__XXXXXXX__validation__callbacks cannot be found.
I tried tracing this one down but ActiveSupport::Callbacks is beyond me.
This is happening on both Rails 3.2.x an Rails 4.0.beta.1
Nevermind, this looks like it was a bug in Ruby 2.0.0-p0 but was resolved in 2.0.0-p195