Cannot load such file — bcrypt_ext

I had a similar problem today with ruby 2.3.3 and rails 4.2.4.

The problem was that bundle install of devise installed as a dependency another version of bcrypt (bcrypt (3.1.11 x86-mingw32) instead of bcrypt (3.1.11)) which was causing trouble with ruby 2.3 (it should work with all previous versions of ruby)

The solution I used is to install bcrypt outside of the gemfile, run bundle and then remove the second version of bcrypt :

$ gem list bcrypt
bcrypt (3.1.11 x86-mingw32)

$ gem uninstall devise && gem uninstall bcrypt
Successfully uninstalled devise-4.2.0
Successfully uninstalled bcrypt-3.1.11-x86-mingw32

$ gem install bcrypt --platform=Ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed bcrypt-3.1.11
Parsing documentation for bcrypt-3.1.11
Installing ri documentation for bcrypt-3.1.11
Done installing documentation for bcrypt after 1 seconds
1 gem installed

$ gem list bcrypt
bcrypt (3.1.11)

$ bundle install
...
Installing bcrypt 3.1.11 (x86-mingw32)
...
Installing devise 4.2.0
Bundle complete! 25 Gemfile dependencies, 75 gems now installed.

$ gem list bcrypt
bcrypt (3.1.11 ruby x86-mingw32)

$ gem uninstall bcrypt
Select gem to uninstall:
 1. bcrypt-3.1.11
 2. bcrypt-3.1.11-x86-mingw32
 3. All versions
> 2
Successfully uninstalled bcrypt-3.1.11-x86-mingw32

$ gem list bcrypt
bcrypt (3.1.11)

Hope that helps if you haven’t solved your problem yet.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)