我正在尝试在 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...
以下是我当前的版本:
视窗 8.1 64 位
$ gem -v
2.5.1
$ ruby -v
ruby 2.3.0p0(2015-12-25 修订版 53290)[x64-mingw32]