title: Rails, Rake aborted! undefined method 'active_record'
body: <p>I'm sure I miss some basic thing.</p>
  
  <p>I had a correctly working app in dev environment. 
  Than I had some modifications that I cant correctly explain (with the migrations and tried to insert seed_dump gem).
  Now every rake command drops an error:</p>
  
  <pre><code>C:\Programozas\Rails Apps\sorsveto&gt;rake about
  rake aborted!
  undefined method `active_record' for #&lt;Rails::Application::Configuration:0x3e482
  98&gt;
  
  Tasks: TOP =&gt; about =&gt; environment
  (See full trace by running task with --trace)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>C:\Programozas\Rails Apps\sorsveto&gt;rake db:migrate
  rake aborted!
  Don't know how to build task 'db:migrate'
  
  (See full trace by running task with --trace)
  </code></pre>
  
  <p>There is my gemfile:</p>
  
  <pre><code>source 'https://rubygems.org'
  
  gem 'rails', '3.2.2'
  gem 'bootstrap-sass', '2.0.0'
  gem 'will_paginate', '3.0.3'
  gem 'bootstrap-will_paginate', '0.0.5'
  
  group :development do
    gem 'sqlite3', '1.3.5'
    gem 'annotate', '~&gt; 2.4.1.beta'
  end
  
  # Gems used only for assets and not required
  # in production environments by default.
  group :assets do
    gem 'sass-rails',   '~&gt; 3.2.3'
    gem 'coffee-rails', '~&gt; 3.2.1'
    gem 'uglifier', '&gt;= 1.0.3'
  end
  
  gem 'jquery-rails'
  
  group :test, :development do
    gem 'rspec-rails', '~&gt; 2.8.rc'
    gem 'shoulda', '~&gt; 3.0.1'
    gem 'shoulda-context'
    gem 'shoulda-matchers'
    gem 'eventmachine', '1.0.0.rc.4'
    gem 'listen', '0.4.7'
    gem 'guard-livereload', '1.0.0'
    gem 'guard-rspec', '0.5.5'
    gem 'guard-spork', '0.3.2'
    gem 'spork', '0.9.0'
  end
  
  group :test do
    gem 'capybara', '1.1.2'
    gem 'factory_girl_rails', '1.4.0'
    gem 'cucumber-rails', '1.2.1'
    gem 'database_cleaner', '0.7.0'
  end
  
  # Test gems on Windows
  group :test do
    gem 'rb-fchange', '0.0.5'
    gem 'rb-notifu', '0.0.4'
    gem 'win32console', '1.3.0'
  end
  
  group :production do
    gem 'pg', '0.12.2'
  end
  </code></pre>
  
  <p>I can't figure out how to solve this. I tried to reinstall or install 0.8.7 and remove this (now I have version 0.9.2.2). I even tried to install 0.9.2. Many combinations (more than one at a time and run bundle exec rake XY) no success.
  I even tried to insert this into my gem file:</p>
  
  <pre><code>require 'rake/dsl_definition'
  require 'rake'
  </code></pre>
  
  <p>Neither helped.
  Any ideas? All help mutch appriciated.</p>