2011-10-28 225 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