首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Windows上安装bcrypt-ruby gem

在Windows上安装bcrypt-ruby gem
EN

Stack Overflow用户
提问于 2009-11-03 18:31:59
回答 7查看 7.1K关注 0票数 7

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

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

然而,我现在遇到了这个错误:

代码语言:javascript
复制
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的副本。

EN

回答 7

Stack Overflow用户

回答已采纳

发布于 2010-03-11 20:07:40

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

  1. devkit-<version>.7z下载here
  2. 将其解压到Ruby目录中(例如,为了获得C:\Ruby\devkit;
  3. from命令行,请输入:C:\Ruby
票数 9
EN

Stack Overflow用户

发布于 2013-05-24 00:15:15

对我来说,下面的方法行得通

代码语言:javascript
复制
gem uni bcrypt-ruby
gem i bcrypt-ruby --platform=ruby
票数 2
EN

Stack Overflow用户

发布于 2009-11-22 23:26:18

为了能够为一键安装程序(OCI)构建一个gem扩展,您需要VC6。混合和匹配较新的Visual Studio的不同版本将失败,或者将在运行时生成未知错误。

我建议避免所有这些麻烦,继续使用One-Click的后续版本,即RubyInstaller。

Ruby installation

  • Follow
  1. 下载并安装1.8.6或1.9.1 RC1软件包,安装开发工具包,然后在Ruby INSTALL.txt上将其解压缩。说明将DevKit调整为解压缩的位置
  2. 继续使用gem install bcrypt-ruby,将开箱即用

有关在此新版本中使用其他gem或Rails的更多详细信息,请参阅我们的维基中的tutorials部分。

希望这能有所帮助。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/1666511

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档