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