Dienstag, 4. November 2008

Compiling Ruby 1.9.1 on Leopard

Update
With the new Ruby 1.9.1 stable version, I only used the following configure (--with-readline-dir is not recognized anymore)
./configure --prefix=/usr/local --program-suffix=1.9
make
sudo make install


The new Ruby 1.9 Preview is out, time for a first impression. But already step one, compiling readline 5.2 failed. Thanx to Han's Hint, I was able to patch the responsible shobj-conf file.

So after patching readline's conf file, in the readline-5.2 directory:
./configure --prefix=/usr/local
make
sudo make install
Now compiling ruby should work as expected, don't forget to point to your new compilied readline library. In your ruby directory:
./configure --prefix=/usr/local --program-suffix=1.9 --with-readline-dir=/usr/local
make
sudo make install
Now you have both ruby versions in parallel, try ruby -v and ruby1.9 -v

1 Kommentar:

mt hat gesagt…

hi there alessandro.
as we are currently working on new binaries for the rubyosx.com project, i wanted to ask you, if you can share your thoughts or at least send us your test output from "ruby runner.rb" from the compilation on your system (see the thread on compile output). we are comparing several compile options and trying to figure out what problems can arise around leopard usage of ruby 1.9.1.