undefined method `database_authenticatable' for #

后端 未结 5 1478
猫巷女王i
猫巷女王i 2020-12-30 22:17

I am using Active Admin gem for my small application based on Quiz. But when I execute rake db:migrate it gives me error. Following is the trace of the comm

5条回答
  •  -上瘾入骨i
    2020-12-30 22:32

    New to this site as you can see from my rep. John Kamuchau is correct, you need to change the xxxx_devise_create_users.rb migration according to your version.

    For example I just updated a rails 3.2 to 4.2 updating devise accordingly and I had to change out the deprecated -

    t.database_authenticatable :null => false
    

    for -

    ## Database authenticatable
    t.string :email,              null: false, default: ""
    t.string :encrypted_password, null: false, default: ""
    

    Old question but hope this helps if someone comes looking.

提交回复
热议问题