Не работает миграция Devise

Я создал модель пользователя, используя Devise , и всякий раз, когда я использую rake db: migrate , я получаю следующую проблему:

==  DeviseCreateUsers: migrating ==============================================
-- create_table(:users)
rake aborted!
An error has occurred, this and all later migrations canceled:

undefined method `database_authenticatable' for #<ActiveRecord::ConnectionAdapters::TableDefinition:0x00000103fa1ff0>

Tasks: TOP => db:migrate
(See full trace by running task with --trace)

Я запускаю полная трассировка с помощью - функция трассировки , но, похоже, не может понять, в чем проблема. Вот файл миграции:

class DeviseCreateUsers < ActiveRecord::Migration
def self.up
create_table(:users) do |t|
  t.database_authenticatable :null => false
  t.recoverable
  t.rememberable
  t.trackable
  t.confirmable

  # t.encryptable
  # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
  # t.token_authenticatable


  t.timestamps
 end

add_index :users, :email,                :unique => true
add_index :users, :reset_password_token, :unique => true
add_index :users, :confirmation_token,   :unique => true
# add_index :users, :unlock_token,         :unique => true
# add_index :users, :authentication_token, :unique => true
end

def self.down
  drop_table :users
  end
end
8
задан jbihan 24 November 2013 в 20:26
поделиться