Skip to content

Instantly share code, notes, and snippets.

@michaelfairley
Created July 26, 2012 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelfairley/3183405 to your computer and use it in GitHub Desktop.
Save michaelfairley/3183405 to your computer and use it in GitHub Desktop.
ActiveRecord cannot be eager loaded without ActionDispatch

Run this and watch as it explodes:

bundle install
bundle exec ruby test.rb
source :rubygems
gem 'activerecord', :require => 'active_record'
GEM
remote: http://rubygems.org/
specs:
activemodel (3.2.6)
activesupport (= 3.2.6)
builder (~> 3.0.0)
activerecord (3.2.6)
activemodel (= 3.2.6)
activesupport (= 3.2.6)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activesupport (3.2.6)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
builder (3.0.0)
i18n (0.6.0)
multi_json (1.3.6)
tzinfo (0.3.33)
PLATFORMS
ruby
DEPENDENCIES
activerecord
require 'rubygems'
require 'bundler'
Bundler.require :default
ActiveSupport::Autoload.eager_autoload!
@microweber
Copy link

boom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment