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.
The better, easiest way is to install the development kit:
Download devkit-<version>.7z from here;
unpack it in the Ruby directory (for instance, C:\Ruby, so that you'll have C:\Ruby\devkit;
from command line, type: gem install bcrypt-ruby.
For me, the following worked
gem uni bcrypt-ruby
gem i bcrypt-ruby --platform=ruby
To be able to build a gem extension for One-Click Installer (OCI) you need VC6. Mxing and matching different versions of newer Visual Studio will fail or will generate unknown errors during runtime.
I would recommend avoid all these hassles and proceed with the successor of One-Click, which is called RubyInstaller.
Download and install either 1.8.6 or 1.9.1 RC1 packages, announced at RubyForge
Download the Development Kit, and unpack it on your Ruby installation
Follow INSTALL.txt instructions to adjust the DevKit to the location you extracted it
Proceed with gem install bcrypt-ruby, will work out of the box
For more details about using other gems or Rails with this newer version, please see the tutorials section in our Wiki.
Hope this helps.
Try below command
gem install bcrypt-ruby --platform=mswin32
I met the same problem when installing devise in windows.
maybe you could checkout this:
http://github.com/oneclick/rubyinstaller/wiki/development-kit
and giorgian is correct, pay attention here:
ruby version: you must install the "ruby installer" version, but not .zip version or other version.
unpack it in the Ruby directory (for instance, C:\Ruby, so that you'll have C:\Ruby\devkit;
If you installed ruby from other setup file (which is not ruby-installer), you MUST remove it ,then install ruby with the ruby installer. don't simply overwrite it.
no need to install VC6, it won't work with other ruby setup version(which is not ruby- installer) . if you installed it just for setup the ruby-gem, I suggest you remove it.
no need to install MinGW , cause dev-kit is based on it.
I spent almost 15 hours to solve this problem. and it's now time to say that "ruby-installer" + "dev kit" is our choise to build the native gem.
On Windows Server 2003 (Ruby 1.8.6), the plain vanilla:
gem install bcrypt-ruby
worked like a charm.
Note that if you want to use it with Rails, you must use:
config.gem 'bcrypt-ruby', :lib => 'bcrypt'
For me, a part of the problem was in the fact that I had Ruby2.0.0 x64 installed (I'm running win8), which seemed to be incompatible with the gcc compiler I was using.
I've removed my ruby installation, and installed ruby 1.9.3 together with Bundler, Rails and some other packages with the use railsInstaller (http://railsinstaller.org/) and I'm now able to install bcrypt-ruby :)
Related
I'm trying to build ruby on visual studio with zlib and I'm having problems with it.
I have prepared everything to build it but I don't know how to specify where the zlib library and headers are.
I have the source code in $(ProjectDir)/..
I am buildin in $(ProjectDir)/$(Platform)/$(Configuration)
I build with command line, and I have it like this
mkdir $(Platform)\$(Configuration)
cd $(Platform)\$(Configuration)\
..\..\..\win32\configure.bat --target=i386-mswin32 --prefix=$(ProjectDir)$(Platform)\$(Configuration)\bin
If I go to ext/zlib, I can execute
extconf.rb --with-zlib-lib=$(ProjectDir)..\..\zlib-1.2.8\zlib-1.2.8\$(Platform)\$(Configuration)\lib --with-zlib-include=$(ProjectDir)..\..\zlib-1.2.8
and creates the makefile correcly, but I don't know how to pass zlib lib
and include paths to the configuration script.
I have tried with
..\..\..\win32\configure.bat --target=i386-mswin32 --prefix=$(ProjectDir)$(Platform)\$(Configuration)\bin --with-zlib-lib=$(ProjectDir)..\..\zlib-1.2.8\zlib-1.2.8\$(Platform)\$(Configuration)\lib --with-zlib-include=$(ProjectDir)..\..\zlib-1.2.8
but that doesn't works
I suppose it has something to do with the '--with-ext="a,b,..."' option or with the "--path" that is specified in the help command, but I don't know how to specify it and the documentation is really bad.
I would be very gratefull if you could help me.
The instructions below are for Ruby 2.2.5 – if you want to build some other version or use different folder paths, change accordingly. I used these to successfully build Ruby 2.2.5 and 2.3.1 from source with zlib using VS2013 Community Update 5 on Windows 8.1 Pro x64.
Create folders:
C:\ruby-2.2.5\build
C:\ruby-2.2.5\src
Untar ruby-2.2.5.tar.gz and put the sources in C:\ruby-2.2.5\src
Unzip the zlib distribution archive (zlib128-dll.zip) into C:\zlib128-dll
Run Developer Command Prompt for VS2013, then run:
SET INCLUDE=%INCLUDE%;C:\zlib128-dll\include
SET LIB=%LIB%;C:\zlib128-dll\lib
SET PATH=%PATH%;C:\zlib128-dll
cd C:\ruby-2.2.5\build
..\src\win32\configure.bat
nmake
nmake DESTDIR=C:/ruby-2.2.5 install
Done. You should now have a fully working, zlib-enabled, Ruby build in C:\ruby-2.2.5\usr.
I'm using SASS in my application and i'm in the process of migrating to Azure.
I've got my project setup but it's not compiling the SASS. I'm trying to use the Ruby Installer from here http://rubyinstaller.org/downloads/ (Ruby 1.9.3-p551) and I've uploaded this via FTP to D:/home however when I try to install it simply using the command rubyinstaller-1.9.3-p551.exe it doesn't do anything. No error message or anything either.
Any suggestions?
Using the installer won't work because it probably requires an interactive session. What I did was get the Ruby binaries and FTP those to the website. You can find the binaries as as 7zip file on Ruby download page. I followed along this post: Installing Ruby 1.8.7 (and other stuff) manually. The part about zlib is probably outdated because there is a corresponding dll in the zipped archive already. I did download the other mentioned dll though (the iconv dll) and placed it in the Ruby bin folder.
Gem is already bundled in the package so no need to install that separately.
Unfortunately now I'm having difficulties in getting the gulp task to work because it is still saying "ruby and compass must be installed and in path". I set the path in the gulpfile.
You no longer need to depend on Ruby to compile your SASS.
LIBSASS has 100% parity with RUBY SASS, and doesn't come with the Ruby dependency.
If you're using grunt, you can switch over to LIBSASS by editing your gruntfile.js to use
grunt.loadNpmTasks('grunt-sass');
instead of
grunt.loadNpmTasks('grunt-contrib-sass');
You should also update your package.json file accordingly.
You can then get Azure to execute your grunt tasks as explained in this answer.
I didn't get any windows installer to install ruby 2.1.2. The only resource I found is a tar/zip file that is available at https://www.ruby-lang.org/en/downloads/.
I have no idea how to install this , anyone provide some suggestions how to install 2.1.2 version of ruby.
I have been able to crack the zlib nut (for Windows 8.1 -- see below), but I'm still struggling with openssl, readline, etc... I find it amazing that this documentation does not seem to be easily found, and that some experts/respondents advise using the 2.0 installer without considering that users are fighting this fight because we need the 2.1.2 functionality.
I downloaded zlib128-dll.zip from http://zlib.net and unzipped the contents to a directory (e.g., c:\zlib).
Then following some hints from this post (https://www.ruby-forum.com/topic/4421852), I created these dirs off of my c:\ruby-build\usr directory:
zlib
zlib\include
zlib\lib
Then I copied some files from my C:\zlib directories to my c:\ruby-build\usr directories:
*.h files (both) from C:\zlib\include to c:\ruby-build\usr\zlib\include
zdll.lib from C:\zlib\lib to c:\ruby-build\usr\zlib\lib.
zlib1.dll *AS* zlib.dll from C:\zlib to both c:\ruby-build\usr\zlib\lib and c:\ruby-build\usr\bin
(not sure which one or both are necessary).
Then from a VS 2012 Native Tools Command Window, I naviagted to C:\ruby-2.1.2\ext\zlib and executed:
\ruby-build\usr\bin\ruby extconf.rb --with-zlib-dir=c:/ruby-build/usr/zlib
Then nmake, followed by nmake install, and voila, I zlib was finally installed.
Let me know if you any questions about my steps.
The project Ruby Installer has published Ruby 2.1.3 for Windows (32 and 64 bits versions) on their download page:
http://rubyinstaller.org/downloads/
You will also find there a new build for Ruby 2.0 (p576).
Although they didn´t updated their news page yet.
The standard way to install Ruby on Windows is with Ruby Installer. However, due to some bugs/regressions in Ruby, there has been some hold up creating an installer for Ruby 2.1 on Windows. To get Ruby 2.1 on Windows, you'll likely have to compile from source.
That's a good question. It seems that 2.1.2 is not easily available on bitnami or ruby installer.
Check this out.
If it's not worth the pain or if you don't explicitly need the features of 2.1.2, I would recommend just installing 2.0.x's stable release.
Please let me know if you have any questions!
I've having trouble getting the ffi-rzmq gem to work on windows.
I've installed the windows installer for ZeroMQ 2.2 from here:
http://www.zeromq.org/distro:microsoft-windows
And I've added C:\Program Files\ZeroMQ 2.2.0\bin to my PATH variable.
I then installed the ffi and ffi-rzmq gems with
gem install ffi
gem install ffi-rzmq
But when I start an irb and run:
require 'ffi-rzmq'
I get this message:
irb(main):001:0> require 'ffi-rzmq'
Unable to load this gem. The libzmq library (or DLL) could not be found.
If this is a Windows platform, make sure libzmq.dll is on the PATH.
For non-Windows platforms, make sure libzmq is located in this search path:
["C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/ffi-rzmq-0.9.3/lib/ffi-rz
mq/../../ext/libzmq.dll", "/usr/local/lib/libzmq.dll", "/opt/local/lib/libzmq.dl
l", "/usr/local/homebrew/lib/libzmq.dll", "/usr/lib64/libzmq.dll"]
The weird thing is that the Zero MQ installer doesn't seem to package a libzmq.dll, only libzmq-v100-mt.dll
I'm sure I'm doing something very obvious that's wrong, but I can't see what it is... can anyone help?
Thanks.
I've managed to fix the problem - the error message given by ffi-rzmq has actually improved somewhat in the latest version.
Nathan was right that I had to rename the libzmq-v100-mt.dll to libzmq.dll, but that alone wasn't enough - I was using the 64bit compiled version of ZMQ, but for some reason ffi-rzmq is linked against the 32bit version.
So everything worked once I uninstalled the 64bit version, installed the 32bit version instead, reanamed the dll to libzmq.dll and adjusted my path to point to the 'c:\program files (x86)' version of zmq.
You have to rename libzmq-v100-mt.dll to libzmq.dll - I have no idea why they decided to have the windows build output a different library name.
I had the same problem, and as soon as I renamed the file zeromq started working fine.
(Okay, technically I had to fix my code first, but THEN zeromq worked fine).
I was compiling Ruby 1.8.7's latest version yesterday (since the latest version has no binaries out yet).
I followed the instructions in the readme file, but then, when I installed ruby gems and update it, it displays the error that zlib.so cannot be found.
I am pretty sure that I already downloaded zlib libraries, etc. I also investigated the nmake logs and here's what the error looks like.
conftest.c(8) : error C2065: 'deflateReset' : undeclared identifier
Did i missed anything?
Thanks :)
Sorry, I got it figured out. You need to download the zlib binaries and place the items in the include folder into your c++ include directory. After that copy zlib1.dll in ruby\bin directory.