Yet another post about installing qtruby on mac

Alec Jacobson

October 07, 2009

weblog/

Trying to install qtruby for mac os x 10.5 on my own (following their instructions) I got an error during cmake, like
i686-apple-darwin9-g++-4.0.1: /Users/Zack/Desktop/qt4-qtruby-2.0.3/smoke/qtwebkit/x_1.cpp: No such file or directory
i686-apple-darwin9-g++-4.0.1: no input files
make[2]: *** [smoke/qtwebkit/CMakeFiles/smokeqtwebkit.dir/x_1.o] Error 1
make[1]: *** [smoke/qtwebkit/CMakeFiles/smokeqtwebkit.dir/all] Error 2
make: *** [all] Error 2
I followed the instructions on another blog and my cmake finished correctly and make and sudo make install compiled and installed smoothly...BUT! When I went into irb, and issued
require 'qt4'
I got this exciting error:
/opt/local/lib/ruby/site_ruby/1.8/i686-darwin9/qtruby4.bundle: [BUG] Bus Error
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9]

Abort trap
I found a solution on a rubyforge help site, which suggested more gobbedygook to add to my cmake call. I add these flags to the flags from before giving me a final cmake line that looked like this:
cmake -DENABLE_QTWEBKIT_SMOKE=off -DENABLE_QTWEBKIT_RUBY=off -DENABLE_QTTEST=off -DENABLE_QTTEST_SMOKE=off -DCMAKE_BUILD_TYPE=debugfull -DRUBY_INCLUDE_PATH=/opt/local/lib/ruby/1.8/i686-darwin9 -DRUBY_LIBRARY=/opt/local/lib/libruby.dylib .
This worked! After make and sudo make install I can go into irb and issue require 'qt4' with no errors. Here's a screen shot of my test in irb: qtruby test app in irb