2011-10-28 187 views
1

我正在尝试安装FXRuby宝石。我已经在Mac OS 10.7上安装了Ruby和Fox与Homebrew,我无法弄清楚如何使它工作。有人吗?安装FXRuby宝石

继承人的错误打印出我收到:

gem install fxruby 
Building native extensions. This could take a while... 
ERROR: Error installing fxruby: 
    ERROR: Failed to build gem native extension. 

/usr/local/Cellar/ruby/1.9.2-p290/bin/ruby 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=/usr/local/Cellar/ruby/1.9.2-p290/bin/ruby 
    --with-fox-dir 
    --without-fox-dir 
    --with-fox-include 
    --without-fox-include=${fox-dir}/include 
    --with-fox-lib 
    --without-fox-lib=${fox-dir}/lib 
    --with-fxscintilla-dir 
    --without-fxscintilla-dir 
    --with-fxscintilla-include 
    --without-fxscintilla-include=${fxscintilla-dir}/include 
    --with-fxscintilla-lib 
    --without-fxscintilla-lib=${fxscintilla-dir}/lib 
extconf.rb:31:in `find_installed_fox_version': couldn't find FOX header files (RuntimeError) 
    from extconf.rb:125:in `<main>' 
+0

'检查mkmf.log文件以获取更多详细信息.' mkmf.log可能有所帮助。 –

+0

http://lylejohnson.name/blog/2008/03/28/one-step-installation-for-fxruby-on-mac-os-x/ –

+0

我已编辑帖子以包含我的打印件。 – NickTFried

回答

3

我有同样的问题,这个命令修复它:

sudo apt-get install libfox-1.6-dev 
+0

Mac上的'sudo apt-get'?你们甚至读过这个问题吗? – toriningen

4

错误发生在因为FOX工具包是装不上你的机器。 FXRuby是FOX图形工具包的Ruby界面,因此需要先将FOX安装在机器上。对于Mac OS X执行

brew install fox 

这将安装依赖:

libpng, freetype, jpeg, libtiff 

然后安装fxruby宝石

gem install fxruby 

我使用的优山美地(OS X 10.10)和fxruby宝石1.6版。 28在我的系统上成功安装

+0

在我可以安装狐狸之前,我不得不做'酿造自来水家酿/ x11'。 – Jared