I have this mega legacy Rails project that gave me this error when it got to the seeds in rake db:setup:
rake aborted!
BCrypt::Errors::InvalidHash: invalid hash
so i ran bundle update bcrypt, which did
Fetching bcrypt 3.1.20 (was 3.1.11)
Installing bcrypt 3.1.20 (was 3.1.11) with native extensions
which allowed the seed to complete (?), and now I have bcrypt 3.1.20 in the Gemfile.lock, but 3.1.11 in the Gemfile
I've got 3.1.11 on the live server, and since it seems to only have this issue when running seeds, setting up a local database, I want to put it back to 3.1.11 in case there's some conflict that is or is not apparent using 3.1.20 instead 3.1.11.
however, i run bundle install, assuming is will revert back to 3.1.11 since that's what's in the Gemfile, but nothing changes, shows Using bcrypt 3.1.20
How do I get 3.1.11 back?
Change your bcrypt line in your
Gemfileto:...and run
bundle