Reputation: 346
I have been looking into the RubyWMQ gem trying to connect to a Websphere queue, but am having no luck. My ultimate goal is to connect to, read and put messages to the queue using Ruby. I have used the gem authors documentation and examples here with no luck as well. currently I have tried this:
queue = WMQ::QueueManager.connect(
:q_mgr_name => 'MYQUEUEMANAGERNAMEHERE',
:exception_on_error => true,
:trace_level => 2,
# :connect_options => WMQ::MQCNO_FASTBATH_BINDING, # this errors
:channel_name => 'MYQUEUEMANAGERNAMEHERE',
:connection_name => 'localhost(1414)',
:transport_type => WMQ::MQXPT_TCP,
:user_identifier => 'MYUSERNAMEHERE',
:password => 'MYPASSWORDHERE')
I believe the first error I am receiving has to do with the Webshpere MQ client itself, or the install of the gem. i installed RubyWMQ using this command:
gem install rubywmq --platform=ruby -- '--with-mqm-include="C:\Program Files\IBM\WebSphereMQ\tools\c\include"'
I am using IBM WebSphere MQ version 7.1.0.3, located in C:\Program Files\IBM\WebSphere MQ...
I get this error when running my code:
WMQ::QueueManager#connect(). Failed to load MQ Library:mqic32, rc=126 (WMQ::WMQException)
I can see the "mqic32.dll" file in C:\Program Files\IBM\WebSphere MQ\bin, so I am not sure exactly what the gem code is doing..
Upvotes: 4
Views: 1129
Reputation: 1184
Managed to fix this by adding C:\Program Files\IBM\WebSphere MQ\bin64
to my user $Path
.
Which was odd, because bin
and bin64
had both been added to the System $path
variable by the IBM install.
(This is with a mingw ruby install)
Upvotes: 1