LoadError: cannot load such file -- bcrypt_ext on Windows 2008 x64 server [英] LoadError: cannot load such file -- bcrypt_ext on Windows 2008 x64 server

查看:13
本文介绍了LoadError: cannot load such file -- bcrypt_ext on Windows 2008 x64 server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将环境从 Ruby 2.0.0 升级到 2.2.3.

I upgraded my environment from Ruby 2.0.0 to 2.2.3.

我还升级(覆盖)了 DevKit,并重新运行 ruby​​ dk.rb install.

I also upgraded (overwrite) DevKit, and re-run ruby dk.rb install.

我删除了 Gemfile.lock 并运行 bundle install 以开始一个全新的环境.一切看起来都很好,但我得到了错误:

I removed Gemfile.lock and ran bundle install to start with a brand new environment. Everything looks ok, but I get the error:

E:ProjectsdevelopmentStairs>rake db:migrate 
rake aborted!
LoadError: cannot load such file -- bcrypt_ext
E:/Projects/development/Stairs/config/application.rb:7:in `<top (required)>'
E:/Projects/development/Stairs/Rakefile:4:in `<top (required)>'
LoadError: cannot load such file -- 2.2/bcrypt_ext
E:/Projects/development/Stairs/config/application.rb:7:in `<top (required)>'
E:/Projects/development/Stairs/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

我首先遇到了与 Nokogiri 相同的问题,我使用此解决方案解决了这个问题:Nokogiri 加载错误使用 Juloi Elixir 的解决方案并从本地副本安装 Nokogiri.

I first had the same issue with Nokogiri, which I solved using this solution : Nokogiri load error using Juloi Elixir's solution and installing Nokogiri from a local copy.

但我不想做这个 foreach gem!看起来 ruby​​ 正在使用 ./或 ./2.2 路径搜索 gem,而 gem 存储在 ./2.2.0 路径中.这是可配置的吗?我该如何解决这个问题?

But I don't feel like doing this foreach gem! It looks like ruby is searching the gem using a ./ or ./2.2 path, while gems are stored in a ./2.2.0 path. Is this configurable? How can I solve this issue?

Note: Gemfile contains gem 'bcrypt', '~> 3.1.10'

谢谢!

推荐答案

解决方案在这里:bcrypt-ruby@github:

在本地重建 bcrypt gem:

Rebuild locally the bcrypt gem:

  1. 切换到 gem 目录 Ruby22-x64lib ubygems2.2.0gemscrypt-3.1.10-x64-mingw32extmri>
  2. 运行 ruby​​ extconf.rb
  3. 运行 make
  4. 运行 make install

请注意,只有正确设置了 DevKit 环境(运行 devkitvars.bat),这才有效.

Note that this works only if your DevKit environment is correctly setup (run devkitvars.bat).

这篇关于LoadError: cannot load such file -- bcrypt_ext on Windows 2008 x64 server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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