bcrypt LoadError: Cannot load such file bcrypt LoadError: Cannot load such file ruby ruby

bcrypt LoadError: Cannot load such file


After running bundle install to install bcrypt, just restart the rails server.
That should help your application to reload and pick up the newly installed bcrypt dependency.


make sure you not only run bundle install, but that you ALSO kill the server and reload it to make sure it then loads in the new gems. you can also check your gemfile for 'spring'. if thats loaded too, you'll want to comment that out, reload the server and try it then. that should take care of all possibilities.


I had the same issue, but couldn't resolve it until I edited the Gemfile file, and uncommented the line

    gem 'bcrypt', '~> 3.1.7' 

I initially installed version 3.1.7 because I was worried if there were maybe compatibility issues with the later versions, based on something I read in another solution to this problem, but 3.1.7 also failed with another error message. However, 3.1.11 worked perfectly, and so I bumped up the comment in the Gemfile to read

    gem 'bcrypt', '~> 3.1.11

and ran bundle install again.This worked.