尝试在Windows 7上安装Buildr-as3时出错

问题描述:

我目前正在考虑自动化Flex构建,以便我们可以在CI服务器上运行它。尝试在Windows 7上安装Buildr-as3时出错

经过在互联网上四处打探并询问,Buildr as3看起来像一个很有前途的选项,但我不能让它正确安装。免责声明:我是一个红宝石新手(如果你愿意的话,还是一个roob)。

我试过红宝石1.8.7,1.9.2和1.9.3与两台电脑运行相同的操作系统。在所有情况下,我都会得到同样的错误。我正在使用Windows 7 Enterprise SP1和SP1。我们的开发机器和CI机器都运行Windows。

我一直在以下这些步骤:

安装错误:

C:>gem install buildr-as3 Fetching: buildr-as3-0.2.19.gem (100%) Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing buildr-as3: ERROR: Failed to build gem native extension.

C:/Ruby192/bin/ruby.exe extconf.rb 

* 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:/Ruby192/bin/ruby extconf.rb:45:in open': No such file or directory - C:\Program Files (x86)\Java \jre6\include (Errno::ENOENT) from extconf.rb:45:in '

Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/rjb-1.3.3 for inspection. Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/rjb-1.3.3/ext/gem_make.out

我会贴mkmf.log的内容,但由于某种原因它不再在任我的电脑创建(看在这两个的devkit &红宝石文件夹,但没有它的标志,可能是用户错误)。

谷歌搜索我曾在mkmf.log文件turned up this pastie的错误,但是:

它的要点是:

conftest.c: In function 't': conftest.c:8:53: error: 'random' undeclared (first use in this function) conftest.c:8:53:

它看起来像它试图从源代码编译的东西,但相关性缺失,但我无法弄清楚。有任何想法吗?如果没有,那么是否有人在Windows上成功运行builder-as3,如果有的话,你使用的是哪个版本?

任何帮助表示赞赏。谢谢。

最后,一个同事建议我尝试以下方法(注意参数是一样的安装buildr时使用的一个):

gem install buildr-as3 --platform mswin32

然后它没有错误安装。

问题不是来自buildr-as3,而是来自其依赖关系rjb。

rjb找不到文件夹C:\Program Files (x86)\Java \jre6\include,因为里面有空格。

要解决此问题,请考虑使用jruby或使用java安装并定义不包含空格的JAVA_HOME。

如果您需要进一步的帮助,请联系buildr项目的用户邮件列表!

问题是,JAVA_HOME变量指向没有“包含”文件夹的JRE。

更改环境变量指向JDK,我敢肯定,你有,否则它很难做任何Java开发;)

+0

感谢您的答复。我没有(直接)做任何Java开发,但我确实使用依赖于JRE的工具(其他一切正常,这是我遇到的第一个问题)。你说“include”文件夹不存在是正确的。最后,我确实安装了它(请参阅我的答案),但我最终还是选择了GradleFx。 – 2012-06-14 12:56:05