title: Rake Not Creating Tables
body: <p><strong>Problem</strong>
  <br></p>
  
  <p><code>rake db:migrate</code> is not creating tables in my MySQL database. (Yes, I have read all similar posts, and implemented their suggestions, please continue reading.)</p>
  
  <p><strong>Code</strong>
  <br></p>
  
  <p>database.yml:</p>
  
  <pre><code>default: &amp;default
    adapter: mysql2
    encoding: utf8
    pool: 5
    username: root
    password:
    host: localhost
    port: /tmp/mysql.sock
  
  development:
    &lt;&lt;: *default
    database: asreport
  </code></pre>
  
  <p>Line from gemfile (yes, I already gem install'd it too):</p>
  
  <pre><code>gem 'mysql2', '~&gt; 0.3.20'
  </code></pre>
  
  <p>/appfile/db/migrate/create_users.rb (I've also tried making the second line 'def up'):</p>
  
  <pre><code>class CreateUsers &lt; ActiveRecord::Migration
    def up
      create_table :users do |t|
        t.string :username
        t.string :password
        t.integer :usertype
        t.string :salt
        t.timestamps
      end
    end
  end
  </code></pre>
  
  <p>After I run <code>rake db:drop</code>, <code>rake db:create</code> to refresh, rake db:migrate --trace reads (after this output, 'show tables' in mysql still only shows schema_migrations):</p>
  
  <pre><code>** Invoke db:migrate (first_time)
  ** Invoke environment (first_time)
  ** Execute environment
  ** Invoke db:load_config (first_time)
  ** Execute db:load_config
  ** Execute db:migrate
  ** Invoke db:_dump (first_time)
  ** Execute db:_dump
  ** Invoke db:schema:dump (first_time)
  ** Invoke environment 
  ** Invoke db:load_config 
  ** Execute db:schema:dump
  </code></pre>
  
  <p><strong>What I've Tried</strong>
  <br></p>
  
  <p>First of all, I know that I am connecting to MySQL via Ruby, as <code>db:drop</code> create does indeed create the database itself, just not the table.</p>
  
  <p>I've read all the relevant stack overflow posts I could find on the issue. I've tried rollback, dropping my database directly on SQL, and <code>db:drop/create</code>.</p>
  
  <p>I've tried deleting and recreating my migration script too.</p>
  
  <p>I've run db:migrate multiple times (by itself and after <code>db:drop/create's, rollback's, resets)</code>, but the schema_migrations always has 0 entries and my <code>schema.rb</code> file is on <code>version: 0</code>.</p>