title: Rails 4 app ActiveRecord::MigrationProxy Devise 3 migration error
body: <p>I am deploying my rails 4 app on vps with ssh and when I run  </p>
  
  <pre><code>bundle exec rake db:migrate RAILS_ENV=production
  </code></pre>
  
  <p>this is what I get:</p>
  
  <pre><code>[root@georgigeorgiev public_html]# bundle exec rake db:migrate RAILS_ENV=production
  -- t()
  -- t()
  rake aborted!
  ActiveRecord::MigrationProxy#disable_ddl_transaction delegated to migration.disable_ddl_transaction, but migration is nil: #&lt;struct ActiveRecord::MigrationProxy name="DeviseCreateUsers", version=20140217200926, filename="/home/bboyratings/public_html/db/migrate/20140217200926_devise_create_users.rb", scope=""&gt;
  /usr/local/rvm/gems/ruby-2.0.0-p451@rails4/gems/activerecord-4.0.0/lib/active_record/migration.rb:712:in `rescue in disable_ddl_transaction'
  /usr/local/rvm/gems/ruby-2.0.0-p451@rails4/gems/activerecord-4.0.0/lib/active_record/migration.rb:708:in `disable_ddl_transaction'
  /usr/local/rvm/gems/ruby-2.0.0-p451@rails4/gems/activerecord-4.0.0/lib/active_record/migration.rb:1012:in `use_transaction?'
  /usr/local/rvm/gems/ruby-2.0.0-p451@rails4/gems/activerecord-4.0.0/lib/active_record/migration.rb:922:in `rescue in block in migrate'
  /usr/local/rvm/gems/ruby-2.0.0-p451@rails4/gems/activerecord-4.0.0/lib/active_record/migration.rb:919:in `block in migrate'
  /usr/local/rvm/gems/ruby-2.0.0-p451@rails4/gems/activerecord-4.0.0/lib/active_record/migration.rb:916:in `each'
  /usr/local/rvm/gems/ruby-2.0.0-p451@rails4/gems/activerecord-4.0.0/lib/active_record/migration.rb:916:in `migrate'
  /usr/local/rvm/gems/ruby-2.0.0-p451@rails4/gems/activerecord-4.0.0/lib/active_record/migration.rb:764:in `up'
  /usr/local/rvm/gems/ruby-2.0.0-p451@rails4/gems/activerecord-4.0.0/lib/active_record/migration.rb:742:in `migrate'
  /usr/local/rvm/gems/ruby-2.0.0-p451@rails4/gems/activerecord-4.0.0/lib/active_record/railties/databases.rake:42:in `block (2 levels) in &lt;top (required)&gt;'
  /usr/local/rvm/gems/ruby-2.0.0-p451@rails4/bin/ruby_executable_hooks:15:in `eval'
  /usr/local/rvm/gems/ruby-2.0.0-p451@rails4/bin/ruby_executable_hooks:15:in `&lt;main&gt;'
  Tasks: TOP =&gt; db:migrate
  (See full trace by running task with --trace)
  </code></pre>
  
  <p>also my devise migration file:</p>
  
  <pre><code>class DeviseCreateUsers &lt; ActiveRecord::Migration
     t.has_attached_file :avatar  
  def change
      create_table(:users) do |t|
        ## Database authenticatable
        t.string :email,              :null =&gt; false, :default =&gt; ""
        t.string :encrypted_password, :null =&gt; false, :default =&gt; ""
  
        ## Recoverable
        t.string   :reset_password_token
        t.datetime :reset_password_sent_at
  
        ## Rememberable
        t.datetime :remember_created_at
  
        ## Trackable
        t.integer  :sign_in_count, :default =&gt; 0
        t.datetime :current_sign_in_at
        t.datetime :last_sign_in_at
        t.string   :current_sign_in_ip
        t.string   :last_sign_in_ip
  
        ## Confirmable
        # t.string   :confirmation_token
        # t.datetime :confirmed_at
        # t.datetime :confirmation_sent_at
        # t.string   :unconfirmed_email # Only if using reconfirmable
  
        ## Lockable
        # t.integer  :failed_attempts, :default =&gt; 0 # Only if lock strategy is :failed_attempts
        # t.string   :unlock_token # Only if unlock strategy is :email or :both
        # t.datetime :locked_at
  
        ## Token authenticatable
        # t.string :authentication_token
  
  
        t.timestamps
      end
  
      add_index :users, :email,                :unique =&gt; true
      add_index :users, :reset_password_token, :unique =&gt; true
      # add_index :users, :confirmation_token,   :unique =&gt; true
      # add_index :users, :unlock_token,         :unique =&gt; true
      # add_index :users, :authentication_token, :unique =&gt; true
    end
  end
  </code></pre>
  
  <p>Thanks!</p>