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

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

问题描述

我试图在Windows Vista上安装 bcrypt-ruby

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

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

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:\Ruby\devkit ;

  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:\Ruby\devkit;
  3. from command line, type: gem install bcrypt-ruby.

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

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