1

I am trying to install jsduck on ruby gem, however I got error.

I've downloaded Ruby 2.3.0(x64).

I've also downloaded DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe which is for x64.

I installed the ruby 2.3.0(x64). Then I extracted devkit to "C:/rubydevkit"

I ran the below commands in "C:/rubydevkit" folder :

$ruby dk.rb init

and

$ruby dk.rb install

So far, everything is okay. I installed sass successfully by

$gem install sass

However, when I try

$gem install jsduck

or

$gem install rdiscount --platform=ruby

I got followin error:

$ gem install jsduck
        ERROR:  Error installing jsduck:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rdiscount-2.1.8/ext
C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20160411-6020-6ayo32.rb extconf.rb
checking for random()... no
checking for srandom()... no
checking for rand()... yes
checking for srand()... yes
checking size of unsigned long... 4
checking size of unsigned int... failed
checking size of unsigned short... 2
no int with size 2
*** 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-rdiscount-dir
        --without-rdiscount-dir
        --with-rdiscount-include
        --without-rdiscount-include=${rdiscount-dir}/include
        --with-rdiscount-lib
        --without-rdiscount-lib=${rdiscount-dir}/lib

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/rdiscount-2.1.8/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rdiscount-2.1.8 for inspection.
Results logged to C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/rdiscount-2.1.8/gem_make.out
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...

Below are my current versions versions:

Windows 8.1 64bit

$ gem -v

2.5.1

$ ruby -v

ruby 2.3.0p0 (2015-12-25 revision 53290) [x64-mingw32]

SchemeSonic
  • 376
  • 5
  • 12

2 Answers2

1

Have you tried using a precompiled windows binary?

You're really running into issues with compiling binary extensions for Ruby. Specifically the rdiscount dependency is failing to compile - you might get better help from rdiscount developers.

Rene Saarsoo
  • 13,580
  • 8
  • 57
  • 85
0

RDiscount definitely works on Ruby 2.2.2 on Windows (since this is covered by CI) and in Ruby 2.3.0 on Linux (since this is also covered by CI).

But RDiscount + Ruby 2.3.0 + Windows hasn't been tested yet.

See if you can build successfully with Ruby 2.2.2 on your Windows box.

David Foster
  • 6,931
  • 4
  • 41
  • 42