windows - 在 Windows 上安装 bcrypt-ruby gem

标签 windows ruby gem bcrypt

我正在尝试安装 bcrypt-ruby在 Windows Vista 上。

到目前为止,我已经能够从一篇 MS 知识库文章中安装 nmake.exe,并从安装 Visual Studio 2008 Express 中安装 cl.exe。

但是,我现在遇到了这个错误:

cl -nologo -Wall -I. -IC:/InstantRails/ruby/lib/ruby/1.8/i386-mswin32 -I
C:/InstantRails/ruby/lib/ruby/1.8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6  -c -Tcb crypt.c
cl : Command line warning D9035 : option 'Og-' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-G6' bcrypt.c
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(381) : warning C4255: '_get_printf_count_output' : no function prototype given: converting '()' to '(void)'
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\stdlib.h(215) : warning C4255: '_get_purecall_handler' : no function prototype given: converting '()' to '(void)' 
c:\instantrails\ruby\lib\ruby\gems\1.8\gems\bcrypt-ruby-2.1.2\ext\mri\blf.h(37): fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : return code '0x2' Stop.

我已经执行了大概设置环境的 VCVARS32.bat。我怀疑警告和错误是由于安装较新版本的 Visual Studio 造成的。

有人成功过吗?我没有 Visual Studio 6.0 的副本。

最佳答案

更好、最简单的方法是安装 development kit :

  1. 下载devkit-<version>.7z来自 here ;
  2. 将其解压到 Ruby 目录中(例如 C:\Ruby ,这样您将拥有 C:\Ruby\devkit
  3. 从命令行输入:gem install bcrypt-ruby .

关于windows - 在 Windows 上安装 bcrypt-ruby gem,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1666511/

相关文章:

ruby-on-rails - 即使使用 bundle exec 也会出现 "You have already activated"消息

.net - 为 mac 编写 .net 软件

ruby - 如何通过 cron 使用 selenium 运行 rspec 测试

ruby-on-rails - gem 回形针::错误::NotIdentifiedByImageMagickError

ruby-on-rails - ActiveRecord 用户提供的列名

ruby - 运行带有多个参数的 shell 命令

ruby-on-rails - 使用 'gem pq' 安装 PostgreSQL gem 失败并出现错误 : Failed to build gem native extension

java - 如何以编程方式打开/关闭 Caps Lock、Scroll Lock 和 Num Lock

windows - 分析BSOD WHEA_UNCORRECTABLE_ERROR WIN8驱动

windows - Silverlight Pivot Viewer 应用程序在部署到 IIS 时不显示