title: rake db:migrate fails
body: <p>I am creating a simple users table and when I ran rake db:migrate it appeared to create_table(:users) Howerver I got the following warnings at the same time. I tried running rake db:migrate again and then I got the 2nd error on this page. How can I check if the table was created, and how to prevent this warning/error?</p>
  
  <p><strong>ERROR1</strong></p>
  
  <pre><code>    WARNING: 'require 'rake/rdoctask'' is deprecated.  Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
      at /Users/anderskitson/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
  WARNING: Global access to Rake DSL methods is deprecated.  Please include
      ...  Rake::DSL into classes and modules which use the Rake DSL methods.
  WARNING: DSL method DemoApp::Application#task called at /Users/anderskitson/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/railties-3.0.1/lib/rails/application.rb:214:in `initialize_tasks'
  </code></pre>
  
  <p><strong>ERROR 2</strong></p>
  
  <pre><code>rake aborted!
  undefined local variable or method `d' for main:Object
  </code></pre>
  
  <p>This is what I get with --trace</p>
  
  <pre><code>/Users/anderskitson/rails_project/demo_app/Rakefile:1:in `&lt;top (required)&gt;'
  /Users/anderskitson/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
  /Users/anderskitson/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
  /Users/anderskitson/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
  /Users/anderskitson/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
  /Users/anderskitson/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
  /Users/anderskitson/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
  /Users/anderskitson/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
  /Users/anderskitson/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
  /Users/anderskitson/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
  /Users/anderskitson/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/rake-0.9.2.2/bin/rake:33:in `&lt;top (required)&gt;'
  /Users/anderskitson/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/bin/rake:19:in `load'
  /Users/anderskitson/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/bin/rake:19:in `&lt;main&gt;'
  </code></pre>
  
  <p>I ran </p>
  
  <blockquote>
    <p>rails generate scaffold User name:string email:string</p>
  </blockquote>
  
  <p>Then I ran </p>
  
  <pre><code>rake db:migrate
  </code></pre>
  
  <p>my rake file looks like</p>
  
  <pre><code>d# Add your own tasks in files placed in lib/tasks ending in .rake,
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
  
  require File.expand_path('../config/application', __FILE__)
  require 'rake'
  
  
  DemoApp::Application.load_tasks
  </code></pre>