Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing bcrypt-ruby gem on Windows

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

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.

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.

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

like image 433
Jaryl Avatar asked Nov 03 '09 10:11

Jaryl


1 Answers

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

  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.
like image 191
giorgian Avatar answered Sep 21 '22 04:09

giorgian