3

Am trying to install iruby on a windows machine and this error keeps appearing. Am currently doing some deep learning and I need to use sciruby and iruby to perform the actions required

PS C:\> gem install iruby
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing iruby:
        ERROR: Failed to build gem native extension.

    C:/RailsInstaller/Ruby2.1.0/bin/ruby.exe -r ./siteconf20150710-76680-1u0zekx.rb extconf.rb
checking for windows.h... yes
checking for winsock.h... yes
checking for main() in -lkernel32... yes
checking for main() in -lrpcrt4... yes
checking for main() in -lgdi32... yes
*** 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:/RailsInstaller/Ruby2.1.0/bin/ruby
        --with-kernel32lib
        --without-kernel32lib
        --with-rpcrt4lib
        --without-rpcrt4lib
        --with-gdi32lib
        --without-gdi32lib
extconf.rb:49:in `<main>': uninitialized constant GNU_CHAIN (NameError)

extconf failed, exit code 1

Gem files will remain installed in C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rbczmq-1.7.9 for inspection.
Results logged to C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/rbczmq-1.7.9/gem_make.out

Please assist solving this problem

Thomas K
  • 39,200
  • 7
  • 84
  • 86
Chris K. Mucheke
  • 114
  • 1
  • 2
  • 6

1 Answers1

0

I am new to python and know nothing about ruby, but I find ipython notebook so amazing that I want give it a try for another kernel,
so I just installed ruby and end up with the same problem, and google failed to help me,,,
but I am really good at patching things, after one hour of @#$@%&%@%!(@!, I found a way:
edit C:\Ruby22-x64\lib\ruby\gems\2.2.0\gems\rbczmq-1.7.9\ext\rbczmq\extconf.rb
add statement GNU_CHAIN = 1 on the top
cd C:\Ruby22-x64\lib\ruby\gems\2.2.0\gems\rbczmq-1.7.9
gem spec ....\cache\rbczmq-1.7.9.gem --ruby > ....\specifications\rbczmq-1.7.9.gem.gemspec
gem build ....\specifications\rbczmq-1.7.9.gem.gemspec
now, gem list shows "rbczmq (1.7.9)"

I knew nothing about ruby, so I dont know whether rbczmq really works or not
"iruby notebook" starts succ and new kernel "ruby 2.2.2" added, but it also says "kernel error" when I choose it
the Track back says: "OSError: [WinError 193]"

That's all I can help for now, so maybe you can figure it out now and tell me how to make the new kernel do its trick

mfmain
  • 99
  • 6
  • It turns out to be not that easy, let's do it manually: ``` cd ext/zeromq/builds/mingw32 make -f Makefile.mingw32 rename libzmq.dll.a to libzmq.a copy libzmq.dll libzmq.a C:\Ruby22-x64\lib cd ext/czmq/builds/mingw32 make -f Makefile.mingw32 rename libczmq.dll.a to libczmq.a copy libczmq.dll libczmq.dll.a C:\Ruby22-x64\lib cd ext/rbczmq ruby extconf.rb make copy rbczmq_ext.so to C:\Ruby22-x64\lib\ruby\2.2.0\x64-mingw32 and rename to rbczmq.so copy libgcc_s_sjlj-1.dll libstdc++-6.dll from DevKit to C:\Ruby22-x64\bin ``` – mfmain Aug 24 '15 at 02:23
  • seems the rbczmq gem is broken switched to ffi-rzmq gem and so far so good works perfectly – Chris K. Mucheke Aug 24 '15 at 09:39