RubyWMQ‎ > ‎

Installation

RubyWMQ needs to be compiled on the target system due to the numerous combinations of Ruby versions, MQ Versions and Operating System platforms. For convenience pre-built binaries are made available for Windows since it does come with a 'C' compiler by default.

Prior to installing the rubywmq gem, the WebSphere MQ Client and/or server must be installed locally along with the SDK files.

UNIX and Linux

Most UNIX and Linux systems can compile directly from the Ruby gem:
gem install rubywmq

If an error occurs during the compilation step, see "Compiling the Source Code" below.

Windows

Pre-built binaries are only available for RubyWMQ 0.3.0 on Windows for Ruby 1.8.4 or newer. For all other platforms the code will have to be compiled, see "Compiling the Source Code" below.

NOTE: Selecting a pre-built binary will only work on Ruby 1.8.4 or above.

We are looking for a volunteer running Windows to contribute a pre-compiled binary/gem for RubyMQ 1.0.0 on Windows

Libraries are available for both MQ 5.3 and MQ 6.  The MQ 6 library will allow use of the options specific to MQ 6, but also supports MQ 7. The MQ 5.3 library will work with WebSphere MQ V 5.3, V6, and V7.
  • For MQ 5.3, select gem with platform: i386-mswin32-mq5.3
  • For MQ 6, select gem with platform: i386-mswin32-mq6
  • For MQ 7, select gem with platform: i386-mswin32-mq6
    • or if you have the Visual C V6 compiler follow the "Compiling the Source Code" section below
To install RubyWMQ, run the following command:
gem install rubywmq

Expected Output:
Bulk updating Gem source index for: http://gems.rubyforge.org
Select which gem to install for your platform (i386-mswin32)
 1. rubywmq 1.0.0 (ruby)
 2. rubywmq 0.3.0 (ruby)
 3. rubywmq 0.3.0 (i386-mswin32-mq6)
 4. rubywmq 0.3.0 (sparc-solaris2.8-mq5.3)
 5. rubywmq 0.3.0 (i386-mswin32-mq5.3)
 6. Skip this gem
 7. Cancel installation
>

If in doubt, select gem with platform i386-mswin32-mq5.3 since it will work with the newer WebSphere MQ versions anyway.

Compiling the Source Code:

To compile using the source code contained in the Ruby Gem, the following must be installed on the local machine:
  • A ‘C’ compiler
    • On Windows: Visual C++ V6.0
    • Any standard 'C' compiler should work on the MQ supported platforms
  • The WebSphere MQ Software development toolkit
    • Ensure the MQ SDK is installed
  • MQ Client and/or MQ Server binaries
Note: Prior to running the gem install, ensure that the compiler is in the current path.
  • For windows run the following command prior to performing the install: "C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT"
To install RubyWMQ, run the following command:
gem install rubywmq

Expected Output:
Bulk updating Gem source index for: http://gems.rubyforge.org
Select which gem to install for your platform (i386-mswin32)
 1. rubywmq 1.0.0 (ruby)
 2. rubywmq 0.3.0 (ruby)
 3. rubywmq 0.3.0 (i386-mswin32-mq6)
 4. rubywmq 0.3.0 (sparc-solaris2.8-mq5.3)
 5. rubywmq 0.3.0 (i386-mswin32-mq5.3)
 6. Skip this gem
 7. Cancel installation
>

Select gem “rubywmq 1.0.0 (ruby)”, the output should be similar to:
Building native extensions.  This could take a while...
Successfully installed rubywmq-1.0.0
Installing ri documentation for rubywmq-1.0.0...
Installing RDoc documentation for rubywmq-1.0.0...

The gem package install assumes that MQ is installed in the default location. If not, perform the install and when the build fails modify the paths and re-build the package as follows (update paths below based on your system) :
  • Windows
    • cd "c:/ruby/lib/ruby/gems/1.8/gems/rubywmq-1.0.0/ext"
    • Edit the file build.bat and change the location of WebSphere MQ (if not in C:\Program Files\IBM\WebSphere MQ) and the location of Visual C++ 6 (if not C:\Program Files\Microsoft Visual Studio\VC98)
  • Unix/Linux
    • cd `gem env gempath`/gems/rubywmq-1.0.0/ext
    • Edit the file build.sh and edit the location of WebSphere (if not in /opt/mqm)