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.