我快要疯了,所以我只想问:
你到底是如何在 Windows 上安装 Ruby Gem Jekyll 的。
Jekyll 依赖于 fast-stemmer-1.0.0 并且必须构建为原生扩展
我在RubyDevKit上找到了这个方便的指南,可以在 Windows 上安装一个“健全”的环境,它可以工作,但是 fast-stemmer 仍然一心想要使用 nmake 构建二进制文件,并且返回以下错误:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>gem install jekyll
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe extconf.rb
creating Makefile
nmake
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
cl -nologo -I. -IC:/Ruby/lib/ruby/1.8/i386-mswin32 -IC:/Ruby/lib/ruby/1.
8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6 -c -Tcporter.c
cl : Command line warning D9035 : option 'Og-' has been deprecated and will be r
emoved in a future release
cl : Command line warning D9002 : ignoring unknown option '-G6'
porter.c
porter.c(31) : fatal error C1083: Cannot open include file: 'stdlib.h': No such
file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/fast-stemmer-1
.0.0 for inspection.
Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/fast-stemmer-1.0.0/ext/gem_make
.out
我在 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin 中使用 Visual Studio 2010 附带的 nmake,正如其他文章中所建议的那样。但它仍然不起作用。
我已经尝试从 DevKit 附带的 MSYS shell 运行 gem 安装,所以我当时确实有 Unix make,但我不知道如何指示 Ruby 使用 make 而不是 nmake(并阅读 mkmf. rb 也没有启发我)。它一心想使用 nmake 并且上面的错误消息非常失败
对此的任何帮助将不胜感激!
更新 我终于意识到我没有通过 RubyInstaller.org 安装 Ruby。我使用安装程序重新安装,现在使用 DevKit 构建 jekyll 工作正常。
感谢大家指出这一点!