未能在Windows上安装Jekyll gem原生扩展,并使用“多个目标模式” [英] Failing to install Jekyll gem native extension on Windows with "multiple target patterns"

查看:124
本文介绍了未能在Windows上安装Jekyll gem原生扩展,并使用“多个目标模式”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让Jekyll在我的Windows 7机器上运行,但安装gem失败并出现异常。我基本上遵循由Madhur Arhuja提供的说明加上一些修复,由于一些看似错误的链接。以下是我所做的:

I'm trying to get Jekyll up and running on my Windows 7 machine, but installing the gem fails with a make exception. I'm basically following the instructions provided by Madhur Arhuja plus some "fixes" due to some seemingly wrong links. Here is what I did:

下载并安装了ruby 1.9。 3 p448

从同一页面下载并提取RubyDevelopmentKit。

Downloaded and extracted the RubyDevelopmentKit from the same page.

在我的Git Bash从我安装开发工具包的目录中运行

In my Git Bash from the directory where I installed the development kit I ran

ruby dk.rb init
ruby dk.rb install
gem install jekyll

前两步很好。我有一些信息输出,没有错误。但最后一步创造了这个:

The first two steps worked fine. I got some Info output, no errors. But the last step created this:

$ gem install jekyll
Fetching: liquid-2.5.1.gem (100%)
Fetching: fast-stemmer-1.0.2.gem (100%)
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:/Program Files/Ruby193/bin/ruby.exe" extconf.rb
creating Makefile

make
Makefile:222: *** multiple target patterns.  Stop.


Gem files will remain installed in c:/Program Files/Ruby193/lib/ruby/gems/1.9.1/gems/fast-stemmer-1.0.2 for inspection.
Results logged to c:/Program Files/Ruby193/lib/ruby/gems/1.9.1/gems/fast-stemmer-1.0.2/ext/gem_make.out

非常简单的应用程序失败,出现多个目标模式来自Eclipse 我发现这可能与unix模拟器有关,所以我在windows shell中再次运行最后一个命令,但结果相同。

In Very simple application fails with "multiple target patterns" from Eclipse I found that this might be related to the unix emulator, so I ran the last command again in the windows shell, but with the same result.

因为我不知道有关ruby,c,make或任何涉及到的东西,我完全被卡住了: - (

Since I have no idea about ruby, c, make or anything involved I'm completely stuck :-(

推荐答案

在这行(及其后面)的Makefile定义了 .mo

Ok just a try. The Makefile on this line (and following) defines the target for .m.o.

$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<

如果你使用mingw / cygwin,一切看起来都不错,但如果你安装了ruby,INCFLAGS 可以在窗口机器上产生问题一个带空格的目录
INCFLAG被定义为 INCFLAGS = -I。-I $(arch_hdrdir)-I $(hdrdir)/ ruby​​ / backward -I $(hdrdir)-I $(

Everything looks ok if you're using mingw / cygwin, but INCFLAGS can make problems on window machines, if you've installed ruby in a directory with spaces. INCFLAG is defined as INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir) and if you see my definition below there is no space in any path.

topdir = /C/Ruby200-x64/include/ruby-2.0.0
hdrdir = $(topdir)
arch_hdrdir = C:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32

如果我将ruby安装更改为具有空格的路径,我在本机窗口命令行和mingw会话中获得了无效选项错误。也许这可能会有所帮助。

If I change the ruby installation to a path with spaces I get invalid option error in native windows command line and in the mingw session. Maybe this is could help.

这篇关于未能在Windows上安装Jekyll gem原生扩展,并使用“多个目标模式”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆