Rails – Solving “cannot load such file bcrypt_ext” error
When run “rails server” command sometimes it show error “cannot load such file bcrypt_ext”, it often happened on windows OS. This come because bcrypt extension fail to install on PC environment. This is step to fix that:
- Open command prompt/terminal
- Enter “gem uninstall bcrypt” to uninstall your bcrypt.
- Select option “3” (if exist)
- Enter command “gem uninstall bcrypt-ruby”
- Reinstall bcrypt with “gem install bcrypt –platform=ruby”
- Add this to your “Gemfile” on project:
gem 'bcrypt', platforms: :ruby
- Run “rails server”
Finish.. Happy coding..