【问题标题】:windows ruby install jsduck errorwindows ruby​​ 安装 jsduck 错误
【发布时间】:2016-08-02 02:59:41
【问题描述】:

我正在尝试在 ruby​​ gem 上安装 jsduck,但出现错误。

我已经下载了 Ruby 2.3.0(x64)。

我还下载了适用于 x64 的 DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe。

我安装了 ruby​​ 2.3.0(x64)。然后我把devkit解压到“C:/rubydevkit”

我在“C:/rubydevkit”文件夹中运行了以下命令:

$ruby dk.rb 初始化

$ruby dk.rb 安装

到目前为止,一切正常。我通过

成功安装了 sass

$gem 安装 sass

但是,当我尝试时

$gem 安装 jsduck

$gem install rdiscount --platform=ruby

我收到以下错误:

$ 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...

以下是我当前的版本:

Windows 8.1 64 位

$ gem -v

2.5.1

$ ruby -v

ruby 2.3.0p0(2015-12-25 修订版 53290)[x64-mingw32]

【问题讨论】:

    标签: ruby windows rubygems rdiscount jsduck


    【解决方案1】:

    RDiscount 绝对适用于 Windows 上的 Ruby 2.2.2(因为这已包含在 CI 中)和 Linux 上的 Ruby 2.3.0(因为这也包含在 CI 中)。

    但 RDiscount + Ruby 2.3.0 + Windows 尚未测试。

    看看您是否可以在 Windows 机器上使用 Ruby 2.2.2 成功构建。

    【讨论】:

      【解决方案2】:

      您是否尝试过使用precompiled windows binary?

      您在为 Ruby 编译二进制扩展时确实遇到了问题。特别是 rdiscount 依赖项无法编译 - 您可能会从 rdiscount 开发人员那里获得更好的帮助。

      【讨论】:

        猜你喜欢
        • 2014-01-29
        • 1970-01-01
        • 1970-01-01
        • 2021-08-18
        • 2015-07-03
        • 1970-01-01
        • 2012-01-05
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多