title: Weird Error in Old Rails 2.1 App
body: <p>I had this working(ish) before, but apparently something has changed on my system and it is no longer working.  I am picking up the pieces of someones old Rails 2.1 project, and when I go to do anything I get the same cryptic error:</p>
  
  <pre><code>$ rake db:migrate --trace
  (in /Users/ry/Documents/rails/yogatoday)
  ** Invoke db:migrate (first_time)
  ** Invoke environment (first_time)
  ** Execute environment
  rake aborted!
  undefined method `class_attribute' for ActiveRecord::Base:Class
  /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:1672:in `method_missing_without_paginate'
  /opt/local/lib/ruby/gems/1.8/gems/mislav-will_paginate-2.2.3/lib/will_paginate/finder.rb:164:in `method_missing'
  /opt/local/lib/ruby/gems/1.8/gems/paperclip-2.3.15/lib/paperclip.rb:182:in `included'
  /opt/local/lib/ruby/gems/1.8/gems/paperclip-2.3.15/lib/paperclip/railtie.rb:20:in `include'
  /opt/local/lib/ruby/gems/1.8/gems/paperclip-2.3.15/lib/paperclip/railtie.rb:20:in `send'
  /opt/local/lib/ruby/gems/1.8/gems/paperclip-2.3.15/lib/paperclip/railtie.rb:20:in `insert'
  /opt/local/lib/ruby/gems/1.8/gems/paperclip-2.3.15/rails/init.rb:2:in `evaluate_init_rb'
  /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/rails/plugin.rb:95:in `evaluate_init_rb'
  /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
  /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/rails/plugin.rb:91:in `evaluate_init_rb'
  /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/rails/plugin.rb:44:in `load'
  /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/rails/plugin/loader.rb:33:in `load_plugins'
  /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/rails/plugin/loader.rb:32:in `each'
  /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/rails/plugin/loader.rb:32:in `load_plugins'
  /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:292:in `load_plugins'
  /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:142:in `process'
  /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:97:in `send'
  /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:97:in `run'
  /Users/ry/Documents/rails/yogatoday/config/environment.rb:13
  /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
  /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
  /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'
  /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:355:in `new_constants_in'
  /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'
  /opt/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/tasks/misc.rake:3
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
  /opt/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
  /opt/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
  /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
  /opt/local/bin/rake:19:in `load'
  /opt/local/bin/rake:19
  </code></pre>
  
  <p>If I then look at my config/environment.rb file I've got:</p>
  
  <pre><code>Rails::Initializer.run do |config|
    config.gem 'aasm', :version =&gt; '2.1.5'
    config.gem 'brightcove-api', :version =&gt; '1.0.2'
    config.gem 'fakeweb', :version =&gt; '1.2.8'
    config.gem 'httparty', :version =&gt; '0.5.2'
    config.gem 'calendar_date_select', :version =&gt; '1.15'
    config.gem 'exceptional'
    config.gem 'fastercsv', :version =&gt; '1.4'
    config.gem 'hominid', :version =&gt; '2.1.5'
    config.gem 'lockfile', :version =&gt; '1.4.3'
    config.gem 'mislav-will_paginate', :lib =&gt; 'will_paginate', :version =&gt; '~&gt; 2.2.3', :source =&gt; 'http://gems.github.com'
    config.gem 'paperclip'
    config.gem 'hashie'
    config.gem 'rest-client', :lib =&gt; 'rest_client', :version =&gt; '0.8.2'
  
  ...
  
  end
  </code></pre>
  
  <p>With line 13 being the <code>Rails::Initializer.run do |config|</code> line.</p>
  
  <p>I'm more of a rails 3 guy, so I'm not exactly sure what is going on here but it seems like some kind of versioning conflict. Any suggestions for how to get this running?</p>
  
  <p>Thanks!</p>