在Windows上安装bcrypt-ruby gem

Jar*_*ryl 7 ruby windows gem bcrypt

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

到目前为止,我已经能够从安装Visual Studio 2008 Express的MS知识库文章和cl.exe安装nmake.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.
Run Code Online (Sandbox Code Playgroud)

我已经执行了VCVARS32.bat,这可能会设置环境.我怀疑警告和错误是由于安装了较新版本的Visual Studio.

有人做过这个吗?我没有Visual Studio 6.0的副本.

gio*_*ian 9

更好,最简单的方法是安装开发套件:

  1. devkit-<version>.7z这里下载;
  2. 将它解压缩到Ruby目录中(例如C:\Ruby,这样你就可以了C:\Ruby\devkit;
  3. 从命令行输入:gem install bcrypt-ruby.

  • @giorgian我已经尝试过,但它不起作用."gem install bcrypt-ruby"命令仍然抱怨它找不到"nmake".并且nmake也不在devkit的任何地方.我看到@charles的截图指的是i386-mingw,所以如果你不能使用Visual C++ 6.0那么这似乎是先决条件.正确? (2认同)