Rubyが好きなプログラマーの日記。日々の生活、開発に関するメモとか考えとか。
Ruby 2.1.0が出たということで早速今のRailsアプリを動かしてみようとしたところ、capybara-webkitのインストール時に
Installing capybara-webkit (1.0.0)
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/local/var/rbenv/versions/2.1.0/bin/ruby extconf.rb
cd src/ && /usr/bin/qmake /usr/local/var/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/capybara-webkit-1.0.0/src/webkit_server.pro -spec /usr/local/Qt4.7/mkspecs/macx-g++ -o Makefile.webkit_server
cd src/ && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.webkit_server
g++ -pipe -g -gdwarf-2 -Wall -W -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.7/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I
/usr/include/QtCore -I/Library/Frameworks/QtNetwork.framework/Versions/4/Headers -I/usr/include/QtNetwork -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/Library/Framework
s/QtWebKit.framework/Versions/4/Headers -I/usr/include/QtWebKit -I/usr/include -I. -F/Library/Frameworks -x c++-header -c stable.h -o webkit_server.gch/c++
In file included from stable.h:1:
In file included from /Library/Frameworks/QtGui.framework/Versions/4/Headers/QApplication:1:
In file included from /Library/Frameworks/QtGui.framework/Versions/4/Headers/qapplication.h:45:
In file included from /Library/Frameworks/QtCore.framework/Headers/qcoreapplication.h:45:
In file included from /Library/Frameworks/QtCore.framework/Headers/qobject.h:47:
In file included from /Library/Frameworks/QtCore.framework/Headers/qobjectdefs.h:45:
In file included from /Library/Frameworks/QtCore.framework/Headers/qnamespace.h:45:
/Library/Frameworks/QtCore.framework/Headers/qglobal.h:320:6: warning: "This version of Mac OS X is unsupported" [-W#warnings]
などと出てきて、インストールできなかった。homebrewでqtをインストールしているのに、/Library/Frameworks
とか違うところを見に行っているので、brew doctor
先生に聞いてみたところ、
Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:
git
git-cvsserver
git-receive-pack
git-shell
git-upload-archive
git-upload-pack
lconvert
lrelease
lupdate
macdeployqt
moc
qcollectiongenerator
qdoc3
qhelpgenerator
qmake
qt3to4
rcc
uic
xmlpatterns
Consider setting your PATH so that /usr/local/bin
occurs before /usr/bin. Here is a one-liner:
echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile
と出ていたので、その通りに環境変数PATHの設定を変更してみたところ、インストールできるようになった。
しかし、なんでいつの間にかに/Library/Frameworks
なんて見るようになってしまったんだろうか。そこが気になる。