title: Ruby on Rails and Rake problems: uninitialized constant Rake::DSL
body: <p>I'm having a really frustrating issue: <a href="http://en.wikipedia.org/wiki/Rake_%28software%29" rel="noreferrer">Rake</a> is being dumb.</p>
  
  <p>Here's how the problem comes about:</p>
  
  <pre><code>$ rails new test_app
  $ rails generate scaffold new_scaffold field1:string field2:text
  </code></pre>
  
  <p>Both of those work just fine, but then when I do this,</p>
  
  <pre><code>$ rake db:migrate
  </code></pre>
  
  <p>I get the following error.</p>
  
  <pre><code>(in /home/mikhail/test_app)
  rake aborted!
  uninitialized constant Rake::DSL
  /usr/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
  /usr/lib/ruby/gems/1.9.1/gems/rake-0.9.0/lib/rake/tasklib.rb:8:in `&lt;class:TaskLib&gt;'
  /usr/lib/ruby/gems/1.9.1/gems/rake-0.9.0/lib/rake/tasklib.rb:6:in `&lt;module:Rake&gt;'
  /usr/lib/ruby/gems/1.9.1/gems/rake-0.9.0/lib/rake/tasklib.rb:3:in `&lt;top (required)&gt;'
  /usr/lib/ruby/gems/1.9.1/gems/rake-0.9.0/lib/rake/rdoctask.rb:20:in `require'
  /usr/lib/ruby/gems/1.9.1/gems/rake-0.9.0/lib/rake/rdoctask.rb:20:in `&lt;top (required)&gt;'
  /usr/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/tasks/documentation.rake:1:in `require'
  /usr/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/tasks/documentation.rake:1:in `&lt;top (required)&gt;'
  /usr/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/tasks.rb:15:in `load'
  /usr/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/tasks.rb:15:in `block in &lt;top (required)&gt;'
  /usr/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/tasks.rb:6:in `each'
  /usr/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/tasks.rb:6:in `&lt;top (required)&gt;'
  /usr/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:214:in `require'
  /usr/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:214:in `initialize_tasks'
  /usr/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:139:in `load_tasks'
  /usr/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:77:in `method_missing'
  /home/mikhail/test_app/Rakefile:7:in `&lt;top (required)&gt;'
  /usr/lib/ruby/1.9.1/rake.rb:2373:in `load'
  /usr/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
  /usr/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
  /usr/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
  /usr/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
  /usr/lib/ruby/1.9.1/rake.rb:1991:in `run'
  /usr/bin/rake:31:in `&lt;main&gt;'
  </code></pre>
  
  <p>I've looked about the Internet for similar/same errors, and people have had them. Just no one ever seems to solve the problem!</p>
  
  <p>How do I fix this problem?</p>