Windows 10中的bcrypt加载错误 [英] bcrypt loading error in windows 10

查看:227
本文介绍了Windows 10中的bcrypt加载错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我正在尝试在Windows 10中安装bcrypt,但是每当运行以下Webrick服务器时出现加载错误.

now I am trying to install bcrypt in windows 10, but I got an loading error whenever running webrick server as the following.

C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bcrypt-3.1.10-x64-mingw32/lib/bcrypt.rb:16:in 
`require': cannot load such file -- bcrypt_ext (LoadError)

我正在使用Rails 4.1.5和ruby 2.2.3.当我使用Windows 8.1时,bcrypt没问题.当我使用Windows 8.1时,ruby版本是2.1.6.

I am using rails 4.1.5 and ruby 2.2.3. There was no problem with bcrypt when I was using windows 8.1. The ruby version was 2.1.6 when I was using windows 8.1

如何解决此bcrypt问题?

How can I solve this bcrypt issue?

推荐答案

我花了几个小时才能完成这项工作,但请随时分享.根本问题在于ruby本身随附bcrypt版本3.1.5,较新的更新存在错误.但是,当您安装或卸载bcrypt时,您会在bcrypt-ruby后面征税,它总是首先要求,因此您所做的所有事情都不会通过,该怎么办? 1-通过运行以下两个命令来卸载bcrypt和bcrypt-ruby: gem uninstall bcrypt

It took me few hours to get this done but please feel free to share it.The root problem here is that ruby itself comes with bcrypt version 3.1.5 which is having bugs with the newer updates. However when you install or uninstall the bcrypt you are leving behind bcrypt-ruby which it always asks for first and hence all what you are doing won't go through so what to do ? 1- uninstall bcrypt and bcrypt-ruby by running these two commands: gem uninstall bcrypt and

 gem uninstall bcrypt-ruby

2-使用

gem install bcrypt --platform=ruby 

在您的Gemfile中写

In your Gemfile write

 gem 'bcrypt','~>3.1.11' 

现在,当我写这些行时,最新版本是3.1.11,但是无论更新了什么版本,只需从其gem页面添加即可.运行bundle install,它应该可以正常工作.

NOW as i write these lines the latest version is 3.1.11 but whatever version is updated just add it from their gem page. Run bundle install and it should work just fine.

这篇关于Windows 10中的bcrypt加载错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆