LoadError:无法在Windows 2008 x64服务器上加载此文件 - bcrypt_ext [英] LoadError: cannot load such file -- bcrypt_ext on Windows 2008 x64 server
问题描述
我升级了(覆盖)DevKit,并重新运行了ruby dk.rb安装。
我删除了Gemfile.lock并运行了bundle安装以开始一个全新的环境。一切看起来不错,但我得到的错误:
E:\Projects\development\Stairs> rake db:migrate
耙子中止!
LoadError:无法加载此文件 - bcrypt_ext
E:/Projects/development/Stairs/config/application.rb:7:在< top(required)>'
E :/ Projects / development / Stairs / Rakefile:4:在< top(required)>'
LoadError:无法加载这个文件 - 2.2 / bcrypt_ext
E:/ Projects / development / Stairs /config/application.rb:7:in`< top(required)>'
E:/ Projects / development / Stairs / Rakefile:4:在< top(required)>'
(通过使用--trace运行任务查看完整跟踪)
我首先遇到了同样的问题Nokogiri,我解决了这个解决方案: Nokogiri加载错误
使用Juloi Elixir的解决方案,并从本地副本中安装Nokogiri。
但我不想做这个foreach宝石!它看起来像ruby使用./或./2.2路径搜索gem,而gems存储在./2.2.0路径中。这是可配置的吗?
如何解决这个问题?
注意:Gemfile包含gem'bcrypt','〜> 3.1.10'
谢谢!
解决方案在这里: bcrypt-ruby @ github
a>:
本地重建bcrypt宝石:
- 更改宝石目录\Ruby22-x64\lib\ruby\gems\2.2.0\gems\bcrypt-3.1.10-x64-mingw32\ext\mri>
- 运行ruby extconf.rb
- 运行make
- 运行make install
请注意,这仅适用于您的DevKit环境设置正确(运行devkitvars.bat)。
I upgraded my environment from Ruby 2.0.0 to 2.2.3.
I also upgraded (overwrite) DevKit, and re-run ruby dk.rb 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:\Projects\development\Stairs>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)
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.
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'
Thanks!
Solution was here: bcrypt-ruby@github:
Rebuild locally the bcrypt gem:
- Change to the gem directory \Ruby22-x64\lib\ruby\gems\2.2.0\gems\bcrypt-3.1.10-x64-mingw32\ext\mri>
- Run ruby extconf.rb
- Run make
- Run make install
Note that this works only if your DevKit environment is correctly setup (run devkitvars.bat).
这篇关于LoadError:无法在Windows 2008 x64服务器上加载此文件 - bcrypt_ext的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!