BCrypt::Errors::InvalidSalt: invalid salt Devise

前端 未结 2 1281
后悔当初
后悔当初 2021-01-24 21:04

I\'m getting this error when i try to create new User, like this

>> User.create(:email=>\"nandosousafr@gmail.com\", :password => \"hello\")
BCrypt::E         


        
2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-24 21:55

    Reinstalling bcrypt-ruby hasn't worked for me.

    The bug got fixed in bcrypt-ruby >= 3.1.10, but Rails 3.2 locked on bcrypt-ruby 3.0.x.

    Solution would be to either:

    • move to newer Rails version (>=4)
    • use older Ruby version (2.1.x)
    • fork my changes and keep up with security updates by yourself (since currently Rails 3.2 supports only severe security updates)

提交回复
热议问题