在 Windows 上安装 bcrypt-ruby gem [英] Installing bcrypt-ruby gem on Windows

查看:17
本文介绍了在 Windows 上安装 bcrypt-ruby gem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to install bcrypt-ruby on Windows Vista.

到目前为止,我已经能够安装来自 MS 知识库文章的 nmake.exe 和安装 Visual Studio 2008 Express 的 cl.exe.

So far, I have been able to install nmake.exe from a MS knowledge base article and cl.exe from installing Visual Studio 2008 Express.

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

However, I am now encountering this error:

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 FilesMicrosoft Visual Studio 9.0VCINCLUDEstdio.h(381) : warning C4255: '_get_printf_count_output' : no function prototype given: converting '()' to '(void)'
C:Program FilesMicrosoft Visual Studio 9.0VCINCLUDEstdlib.h(215) : warning C4255: '_get_purecall_handler' : no function prototype given: converting '()' to '(void)' 
c:instantrails
ubylib
ubygems1.8gemscrypt-ruby-2.1.2extmrilf.h(37): fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
NMAKE : fatal error U1077: '"C:Program FilesMicrosoft Visual Studio 9.0VCBINcl.EXE"' : return code '0x2' Stop.

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

I've already executed VCVARS32.bat which presumably sets up the environment. I am suspecting that the warnings and errors are due to installing newer version of Visual Studio.

有没有人成功做到这一点?我没有 Visual Studio 6.0 的副本.

Has anyone done this successfully? I do not have a copy of Visual Studio 6.0.

推荐答案

更好、最简单的方法是安装 开发工具包:

The better, easiest way is to install the development kit:

  1. 这里下载devkit-<version>.7z
  2. 将其解压到 Ruby 目录中(例如,C:Ruby,这样你就拥有了 C:Rubydevkit
  3. 从命令行输入:gem install bcrypt-ruby.
  1. Download devkit-<version>.7z from here;
  2. unpack it in the Ruby directory (for instance, C:Ruby, so that you'll have C:Rubydevkit;
  3. from command line, type: gem install bcrypt-ruby.

这篇关于在 Windows 上安装 bcrypt-ruby gem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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