Thursday, November 13, 2008

Ruby build for re-install of Leopard and install of RubyCocoa

I, like many others, had Mac OS X before Leopard came out. i.e. installed Leopard separately when it came out. Sometimes that causes some things to err out, because for one example, RubyCocoa was bundled with Leopard, and some gems depend on RubyCocoa depending on what you're doing. Plus it's nice to mess around with RubyCocoa.


Found a good post here related to manually building RubyCocoa for your /usr/local Ruby (http://stephencelis.com/archive/2008/11/the-definitive-leopard-ruby-build) . I modified it a little bit, because I want to run Ruby 1.8.6, not 1.8.7.

-bash3.2.17:>> curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p110.tar.gz

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4439k 100 4439k 0 0 50223 0 0:01:30 0:01:30 --:--:-- 41886

-bash3.2.17:>> tar xzf ruby-1.8.6-p110.tar.gz
-bash3.2.17:>> cd ruby-1.8.6-p110
-bash3.2.17:>> curl http://gist.github.com/22725.txt > ruby_thread_hooks.diff
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3452 100 3452 0 0 7877 0 --:--:-- --:--:-- --:--:-- 58363

-bash3.2.17:>> patch -p0 < ruby_thread_hooks.diff

-bash3.2.17:>> ./configure --enable-shared --enable-pthread --enable-install-doc \
CFLAGS=-D_XOPEN_SOURCE=1

-bash3.2.17:>> make
-bash3.2.17:>> sudo make install

No comments: