Problems installing Rubywmq gem

Hello Team,

For the last three or more hours, I have been trying to install *Rubywmq*.
I have been running into the error listed below. I’ve done almost
everything:

1. I deleted Ruby completely and reinstalled it (3 or 4 times)

2. Install and upgraded gems (4 times)

3. Deleted and reinstalled DevKit about 6 times

4. Played with the PATH, etc

I really don’t know what’s next and so I am trying to get some help to
resolve the problem listed below.

Thank you

*OS:*

Windows 7 Enterprise

Service Pack 1

64-bit Operating System

C:\>*ruby -v*

ruby 2.3.1p112 (2016-04-26 revision 54768) [x64-mingw32]

C:\>*gem -v*

2.6.6

*C:\>gem install rubywmq --platform=ruby*

Temporarily enhancing PATH to include DevKit...

Building native extensions. This could take a while...

ERROR: Error installing rubywmq:

        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby23-x64/lib/ruby/gems/2.
3.0/gems/rubywmq-2.1.0/ext

C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20160816-4852-1cqcalv.rb extconf.rb

checking for cmqc.h... no

checking for main() in -lmqm... no

*** extconf.rb failed ***

Could not create Makefile due to some reason, probably lack of necessary

libraries and/or headers. Check the mkmf.log file for more details. You
may

need configuration options.

Provided configuration options:

        --with-opt-dir

        --without-opt-dir

        --with-opt-include

        --without-opt-include=${opt-dir}/include

        --with-opt-lib

        --without-opt-lib=${opt-dir}/lib

        --with-make-prog

        --without-make-prog

        --srcdir=.

        --curdir

        --ruby=C:/Ruby23-x64/bin/$(RUBY_BASE_NAME)

        --with-mqm-dir

        --without-mqm-dir

        --with-mqm-include

        --without-mqm-include=${mqm-dir}/include

        --with-mqm-lib

        --without-mqm-lib=${mqm-dir}/lib

        --with-mqmlib

        --without-mqmlib

C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:6:in `initialize': No such file or directory @
rb_sysopen - C:\Pr

ogram Files\IBM\WebSphere MQ\tools\c\include/cmqc.h (Errno::ENOENT)

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:6:in `open'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:6:in `extract_const'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:26:in `reason_case'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:72:in `block in wmq_reason'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:71:in `each'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:71:in `wmq_reason'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:222:in `block in generate'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:222:in `open'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:222:in `generate'

        from extconf.rb:28:in `<main>'

To see why this extension failed to compile, please check the mkmf.log
which can be found here:

  C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.
3.0/rubywmq-2.1.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0
for inspection.

Results logged to C:/Ruby23-x64/lib/ruby/gems/2.
3.0/extensions/x64-mingw32/2.3.0/rubywmq-2.1.0/gem_make.out

C:\>

···

--
Ruby Student

Well, if you don't actually have the cmqc.h header file from WebsphereMQ, then there's not really anything to be done until you obtain that file or figure out where it is and adjust the search option to the compiler (C compiler for the native extension) so it can find your header files.

-Rob

···

On 2016-Aug-16, at 17:01 , Ruby Student <ruby.student@gmail.com> wrote:

Building native extensions. This could take a while...
ERROR: Error installing rubywmq:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext
C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20160816-4852-1cqcalv.rb extconf.rb
checking for cmqc.h... no
checking for main() in -lmqm... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Ruby23-x64/bin/$(RUBY_BASE_NAME)
        --with-mqm-dir
        --without-mqm-dir
        --with-mqm-include
        --without-mqm-include=${mqm-dir}/include
        --with-mqm-lib
        --without-mqm-lib=${mqm-dir}/lib
        --with-mqmlib
        --without-mqmlib
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/generate/generate_reason.rb:6:in `initialize': No such file or directory @ rb_sysopen - C:\Pr
ogram Files\IBM\WebSphere MQ\tools\c\include/cmqc.h (Errno::ENOENT)

Hey, see the inline comments.

Hello Team,

For the last three or more hours, I have been trying to install *Rubywmq*.
I have been running into the error listed below. I’ve done almost
everything:

1. I deleted Ruby completely and reinstalled it (3 or 4 times)

2. Install and upgraded gems (4 times)

3. Deleted and reinstalled DevKit about 6 times

Make sure you do `ruby dk.rb install --force` when you do this otherwise
nothing actually happens.

4. Played with the PATH, etc

I really don’t know what’s next and so I am trying to get some help to
resolve the problem listed below.

Thank you

*OS:*

Windows 7 Enterprise

Service Pack 1

64-bit Operating System

C:\>*ruby -v*

ruby 2.3.1p112 (2016-04-26 revision 54768) [x64-mingw32]

C:\>*gem -v*

2.6.6

*C:\>gem install rubywmq --platform=ruby*

Temporarily enhancing PATH to include DevKit...

Building native extensions. This could take a while...

ERROR: Error installing rubywmq:

        ERROR: Failed to build gem native extension.

...

C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/generate/generate_reason.rb:6:in
`initialize': No such file or directory @ rb_sysopen - C:\Pr

ogram Files\IBM\WebSphere MQ\tools\c\include/cmqc.h (Errno::ENOENT)

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/generate/generate_reason.rb:6:in
`open'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/generate/generate_reason.rb:6:in
`extract_const'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/generate/generate_reason.rb:26:in
`reason_case'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/generate/generate_reason.rb:72:in
`block in wmq_reason'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/generate/generate_reason.rb:71:in
`each'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/generate/generate_reason.rb:71:in
`wmq_reason'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/gen
erate/generate_reason.rb:222:in `block in generate'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/gen
erate/generate_reason.rb:222:in `open'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/gen
erate/generate_reason.rb:222:in `generate'

        from extconf.rb:28:in `<main>'

This is your culprit here. It looks like you either don't have WebSphere
SDK installed, it is installed at a different location, or you don't have a
compatible version.

The gem README is pretty clear on how to do it, if you followed this and it
still doesn't work then make sure you installed a compatible version.

Justin

···

On Tue, Aug 16, 2016 at 4:01 PM, Ruby Student <ruby.student@gmail.com> wrote:

Building native extensions. This could take a while...
ERROR: Error installing rubywmq:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext
C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20160816-4852-1cqcalv.rb extconf.rb
checking for cmqc.h... no
checking for main() in -lmqm... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Ruby23-x64/bin/$(RUBY_BASE_NAME)
        --with-mqm-dir

If your include file is actually:

C:\IBM\WebSphere MQ\Tools\c\include\cmqc.h

Then you probably need:

--with-mqm-dir="C:/IBM/WebSphere MQ/Tools/c"

Note that I'm showing forward slashes as the path separator and putting the entire path in quotes due to the space in the "WebSphere MQ" component of the path.

The extconf.rb file is probably rebuilt which is why your attempts to change it before rerunning the gem install command isn't working.

Try:

gem install rubywmq --platform=ruby --with-mqm-dir="C:/IBM/WebSphere MQ/Tools/c"

-Rob

P.S. If you want help, keep the discussion on the mailing list. If you want to hire me to help you, by all means send me another direct email and I'll supply you with my standard consulting rate.

···

On 2016-Aug-16, at 17:14 , Rob Biedenharn <rob.biedenharn@gmail.com> wrote:

On 2016-Aug-16, at 17:01 , Ruby Student <ruby.student@gmail.com <mailto:ruby.student@gmail.com>> wrote:

        --without-mqm-dir
        --with-mqm-include
        --without-mqm-include=${mqm-dir}/include
        --with-mqm-lib
        --without-mqm-lib=${mqm-dir}/lib
        --with-mqmlib
        --without-mqmlib
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/generate/generate_reason.rb:6:in `initialize': No such file or directory @ rb_sysopen - C:\Pr
ogram Files\IBM\WebSphere MQ\tools\c\include/cmqc.h (Errno::ENOENT)

Well, if you don't actually have the cmqc.h header file from WebsphereMQ, then there's not really anything to be done until you obtain that file or figure out where it is and adjust the search option to the compiler (C compiler for the native extension) so it can find your header files.

-Rob

a simple way to install it is trhough a version manager
-$VM -- first
- then: ... all the stuff you want. There are some of those in txt and
graphic mode, chose
by your needs and test/fail is always the way.!!!
Preferibly try to do it in your userspace, cuz you can simply ->
delete_user! and
start again. --user(or somthing). In the gem www.page you can find some
info about that.

···

2016-08-18 14:58 GMT+02:00 Rob Biedenharn <rob.biedenharn@gmail.com>:

On 2016-Aug-16, at 17:14 , Rob Biedenharn <rob.biedenharn@gmail.com> > wrote:

On 2016-Aug-16, at 17:01 , Ruby Student <ruby.student@gmail.com> wrote:

Building native extensions. This could take a while...
ERROR: Error installing rubywmq:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby23-x64/lib/ruby/gems/2.
3.0/gems/rubywmq-2.1.0/ext
C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20160816-4852-1cqcalv.rb
extconf.rb
checking for cmqc.h... no
checking for main() in -lmqm... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You
may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Ruby23-x64/bin/$(RUBY_BASE_NAME)
        --with-mqm-dir

If your include file is actually:

*C:\IBM\WebSphere MQ\Tools\c\include\cmqc.h*

Then you probably need:

*--with-mqm-dir="C:/IBM/WebSphere MQ/Tools/c"*

Note that I'm showing forward slashes as the path separator and putting
the entire path in quotes due to the space in the "WebSphere MQ" component
of the path.

The *extconf.rb* file is probably rebuilt which is why your attempts to
change it before rerunning the gem install command isn't working.

Try:

*gem install rubywmq --platform=ruby **--with-mqm-dir="C:/IBM/WebSphere
MQ/Tools/c"*

-Rob

P.S. If you want help, keep the discussion on the mailing list. If you
want to hire me to help you, by all means send me another direct email and
I'll supply you with my standard consulting rate.

        --without-mqm-dir
        --with-mqm-include
        --without-mqm-include=${mqm-dir}/include
        --with-mqm-lib
        --without-mqm-lib=${mqm-dir}/lib
        --with-mqmlib
        --without-mqmlib
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/generate/generate_reason.rb:6:in
`initialize': No such file or directory @ rb_sysopen - C:\Pr
ogram Files\IBM\WebSphere MQ\tools\c\include/cmqc.h (Errno::ENOENT)

Well, if you don't actually have the cmqc.h header file from WebsphereMQ,
then there's not really anything to be done until you obtain that file or
figure out where it is and adjust the search option to the compiler (C
compiler for the native extension) so it can find your header files.

-Rob

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--
Equipo

EscenarioDeJuego <http://EscenarioDeJuego.blogspot.com.es/&gt;

Rob,

Thank you for your reply, I truly appreciate it. Now,

I do have the file *cmqc.h*. My desktop runs a full blown MQ environment,
meaning that it has all the necessary files. The file can be actually found
at:

*C:\IBM\WebSphere MQ\Tools\c\include\cmqc.h*

Now, the *extconf.rb * has the wrong path, *C:\Program Files
(x86)\IBM\WebSphere MQ\tools\c\include*, which I changed multiple times to
match the actual path. However, when I run the gem install command, I
noticed that the path is changed back to the wrong path. I am not sure how
to fix that. I even tried coping the *cmqc.h* to the ruby directory with
the others header files.

This is what I am getting.

*C:\Ruby23-x64\lib\ruby\gems\2.3.0\gems\rubywmq-2.1.0\ext>gem install
rubywmq --platform=ruby*

Temporarily enhancing PATH to include DevKit...

Building native extensions. This could take a while...

ERROR: Error installing rubywmq:

        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby23-x64/lib/ruby/gems/2.
3.0/gems/rubywmq-2.1.0/ext

C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20160817-15160-2c82np.rb extconf.rb

checking for cmqc.h... no

checking for main() in -lmqm... no

*** extconf.rb failed ***

Could not create Makefile due to some reason, probably lack of necessary

libraries and/or headers. Check the mkmf.log file for more details. You
may

need configuration options.

Provided configuration options:

        --with-opt-dir

        --without-opt-dir

        --with-opt-include

        --without-opt-include=${opt-dir}/include

        --with-opt-lib

        --without-opt-lib=${opt-dir}/lib

        --with-make-prog

        --without-make-prog

        --srcdir=.

        --curdir

        --ruby=C:/Ruby23-x64/bin/$(RUBY_BASE_NAME)

        --with-mqm-dir

        --without-mqm-dir

        --with-mqm-include

        --without-mqm-include=${mqm-dir}/include

        --with-mqm-lib

        --without-mqm-lib=${mqm-dir}/lib

        --with-mqmlib

        --without-mqmlib

C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:6:in `initialize': No such file or directory @
rb_sysopen - C:\Pr

ogram Files\IBM\WebSphere MQ\tools\c\include/cmqc.h (Errno::ENOENT)

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:6:in `open'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:6:in `extract_const'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:26:in `reason_case'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:72:in `block in wmq_reason'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:71:in `each'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:71:in `wmq_reason'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:222:in `block in generate'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:222:in `open'

        from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/
generate/generate_reason.rb:222:in `generate'

        from extconf.rb:28:in `<main>'

To see why this extension failed to compile, please check the mkmf.log
which can be found here:

  C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.
3.0/rubywmq-2.1.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0
for inspection.

Results logged to C:/Ruby23-x64/lib/ruby/gems/2.
3.0/extensions/x64-mingw32/2.3.0/rubywmq-2.1.0/gem_make.out

···

On Tue, Aug 16, 2016 at 5:14 PM, Rob Biedenharn <rob.biedenharn@gmail.com> wrote:

On 2016-Aug-16, at 17:01 , Ruby Student <ruby.student@gmail.com> wrote:

Building native extensions. This could take a while...
ERROR: Error installing rubywmq:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby23-x64/lib/ruby/gems/2.
3.0/gems/rubywmq-2.1.0/ext
C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20160816-4852-1cqcalv.rb
extconf.rb
checking for cmqc.h... no
checking for main() in -lmqm... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You
may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Ruby23-x64/bin/$(RUBY_BASE_NAME)
        --with-mqm-dir
        --without-mqm-dir
        --with-mqm-include
        --without-mqm-include=${mqm-dir}/include
        --with-mqm-lib
        --without-mqm-lib=${mqm-dir}/lib
        --with-mqmlib
        --without-mqmlib
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubywmq-2.1.0/ext/generate/generate_reason.rb:6:in
`initialize': No such file or directory @ rb_sysopen - C:\Pr
ogram Files\IBM\WebSphere MQ\tools\c\include/cmqc.h (Errno::ENOENT)

Well, if you don't actually have the cmqc.h header file from WebsphereMQ,
then there's not really anything to be done until you obtain that file or
figure out where it is and adjust the search option to the compiler (C
compiler for the native extension) so it can find your header files.

-Rob

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

--
Ruby Student