title: Rails 3.2.6; rake 0.9.2.2; db:migrate aborted
body: <p>I'm new to Rails, and am following the getting started guide on their website.</p>
  
  <p>I'm getting an error when I run <code>$ rake db:migrate</code> in section: <a href="http://guides.rubyonrails.org/getting_started.html#generating-a-model" rel="nofollow">http://guides.rubyonrails.org/getting_started.html#generating-a-model</a></p>
  
  <p>It worked for the first time in section: <a href="http://guides.rubyonrails.org/getting_started.html#running-a-migration" rel="nofollow">http://guides.rubyonrails.org/getting_started.html#running-a-migration</a></p>
  
  <p>So I don't know what is wrong.</p>
  
  <p>When I run <code>$ rake db:migrate</code></p>
  
  <pre><code>==  CreateComments: migrating =================================================
  -- create_table(:comments)
  rake aborted!
  An error has occurred, this and all later migrations canceled:
  
  private method `test' called for #&lt;ActiveRecord::ConnectionAdapters::TableDefinition:0x007f83a27503c8&gt;
  
  Tasks: TOP =&gt; db:migrate
  (See full trace by running task with --trace)
  </code></pre>
  
  <p>So I followed the instructions to run it with the <code>--trace</code> argument; I was wondering if anyone has a clue what it means, and what the issue is?</p>
  
  <pre><code>** Invoke db:migrate (first_time)
  ** Invoke environment (first_time)
  ** Execute environment
  ** Invoke db:load_config (first_time)
  ** Invoke rails_env (first_time)
  ** Execute rails_env
  ** Execute db:load_config
  ** Execute db:migrate
  ==  CreateComments: migrating =================================================
  -- create_table(:comments)
  rake aborted!
  An error has occurred, this and all later migrations canceled:
  
  private method `test' called for #&lt;ActiveRecord::ConnectionAdapters::TableDefinition:0x007f8bacbba730&gt;
  /Users/parnmatt/Sites/test-rails/blog/db/migrate/20120627130542_create_comments.rb:5:in `block in change'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/schema_statements.rb:160:in `create_table'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:466:in `block in method_missing'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:438:in `block in say_with_time'
  /Users/parnmatt/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/benchmark.rb:280:in `measure'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:438:in `say_with_time'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:458:in `method_missing'
  /Users/parnmatt/Sites/test-rails/blog/db/migrate/20120627130542_create_comments.rb:3:in `change'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:407:in `block (2 levels) in migrate'
  /Users/parnmatt/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/benchmark.rb:280:in `measure'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:407:in `block in migrate'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:123:in `with_connection'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:389:in `migrate'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:528:in `migrate'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:720:in `block (2 levels) in migrate'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:775:in `call'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:775:in `block in ddl_transaction'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/transactions.rb:208:in `transaction'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:775:in `ddl_transaction'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:719:in `block in migrate'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:700:in `each'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:700:in `migrate'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:570:in `up'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/migration.rb:551:in `migrate'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/activerecord-3.2.6/lib/active_record/railties/databases.rake:153:in `block (2 levels) in &lt;top (required)&gt;'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
  /Users/parnmatt/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/bin/rake:33:in `&lt;top (required)&gt;'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in `load'
  /Users/parnmatt/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in `&lt;main&gt;'
  Tasks: TOP =&gt; db:migrate
  </code></pre>
  
  <p>This is the migration code generated:</p>
  
  <pre><code>class CreateComments &lt; ActiveRecord::Migration
    def change
      create_table :comments do |t|
        t.string :commenter
        t.test :body
        t.references :post
  
        t.timestamps
      end
      add_index :comments, :post_id
    end
  end
  </code></pre>