Get NoMethodError in Devise::RegistrationsController#create

前端 未结 1 1026
故里飘歌
故里飘歌 2021-01-17 02:18

trying to add new users , using the devise gem ran rake db:migrate and ran the rails server again

but when i type in 3000/posts/sign_up

it gives me the defa

相关标签:
1条回答
  • 2021-01-17 02:38

    The main problem is here

    NoMethodError (undefined method `encrypted_password=' for #<Post:0x007fde3e09e538>):
    

    Check out you migration file. Is encrypted_password present or not? Do you have this t.string :encrypted_password, :null => false, :default => "" line of code in your migration file. And in your model file (i.e post.rb) you haven't define password attribute too.

    0 讨论(0)
提交回复
热议问题