I have tried to deploy devise authentication on my rails app.
I am getting this issue
"cannot load such file -- bcrypt_ext"
I see it is a common issue amongst windows based computers but the answers to other questions have not helped me yet.
I am running Windows 8 x64 with x86 ruby and devkit
答案 0 :(得分:5)
try
C:\> gem install --no-ri --no-rdoc bcrypt
C:\> cd (path to gems root)\bcrypt-3.1.7-x86-mingw32\ext\mri
C:\(path to gems root)\bcrypt-3.1.7-x86-mingw32\ext\mri> ruby extconf.rb
C:\(path to gems root)\bcrypt-3.1.7-x86-mingw32\ext\mri> make
C:\(path to gems root)\bcrypt-3.1.7-x86-mingw32\ext\mri> make install
reference: https://www.alib.jp/entries/bcrypt_ext_load_error_on_ruby21x
答案 1 :(得分:0)
bcrypt_ext.so文件丢失 - 如果您手动将其复制到正确的文件夹 - 在我的情况下\ Ruby23 \ lib \ ruby \ gems \ 2.3.0 \ gems \ bcrypt-3.1.11-x86-mingw32 \ lib - it帮助。 :)
答案 2 :(得分:0)
这对我有用: https://github.com/codahale/bcrypt-ruby/issues/142
- 卸载所有bcrypt版本:gem uninstall bcrypt
选择选项3(全部卸载)
- 卸载所有bcrypt-ruby版本:gem uninstall bcrypt-ruby
选择选项3(全部卸载)
通过以下方式替换gemfile中的行:
将此行添加到gemfile: gem'bcrypt',平台:: ruby
但对我来说不起作用,但是将gemfile指向git存储库:
gem'bcrypt',git:'https://github.com/codahale/bcrypt-ruby.git',:require => 'bcrypt'
捆绑安装
你应该好好去
答案 3 :(得分:0)
点击此链接https://github.com/codahale/bcrypt-ruby/issues/142
有人提到了这个解决方案
gem 'bcrypt', git: 'https://github.com/codahale/bcrypt-ruby.git', :require => 'bcrypt'
它对我有用