Package
The Ruby bindings are available as a gem, named rb-zmq
All that is required, is that you have libzmq installed and built with the C language extensions enabled (this means passing —with-c to configure).
To install the ruby gem:
gem install rb-zmq
If the gem installation complains that it cannot find libzmq or headers, simply pass the location of your libzmq installation to the gem install command:
gem install rb-zmq -- --with-zmq-dir=/opt/local
(note the extra -- are required)
This gem package has been tested on MacPorts-enabled, 64-bit OSX SnowLeopard installation, and amd_64 Debian Linux. Please let us know on the mailing list if you've managed to get the gem installed on your platform, or if you run into any problems.
Source Code
Source code can be found here:
http://github.com/sustrik/rbzmq
To build the Ruby binding from the source code first make sure that ØMQ is installed on the system. Then fetch the rbzmq code from the repository and do the following:
$ ruby extconf.rb
$ make
$ make install
To test whether everything is all right try running the performance tests in perf subdirectory:
$ ruby local_lat.rb tcp://127.0.0.1:5555 1 100
and
$ ruby ./remote_lat.rb tcp://127.0.0.1:5555 1 100
message size: 1 [B]
roundtrip count: 100
mean latency: 44.875 [us]
Documentation
The ruby bindings are currently not documented. Consult the rbzmq.cpp file in git and the C API Documentation for more information. Additionally, have a look at performance tests in perf subdirectory.
Bug Reporting
Mailing list
Use generic ØMQ mailing lists.
