Compiling Ruby on Mac OS X Snow Leopard

Posted by gryzzly on Server Fault See other posts from Server Fault or by gryzzly
Published on 2010-06-13T15:40:22Z Indexed on 2010/06/13 15:53 UTC
Read the original article Hit count: 296

Filed under:
|
|
|

Hi,

I am trying to follow this tutorial, on the subject of compiling ruby and rubygems on Snow Leopard:
http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard

I have added this to my ~/.profile:

export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

But if I write: echo $PATH I get:

/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin

But in tutorial it says:

You should see /usr/local/bin at the beginning of the line returned by the system.

I have installed macports sometime ago and plenty of other software, perhaps it has changed the path.

Anyway, I have tried to proceed with the installation, so I have built ruby, I did:

./configure --enable-shared --enable-pthread CFLAGS=-D_XOPEN_SOURCE=1
make
sudo make install
cd ..

But when I do which ruby I get:

/usr/bin/ruby

And according to the tutorial that's wrong. Also if I do ruby -v I get the older version of ruby that was preinstalled on Snow Leopard and not the one I've compiled.

Thanks.

© Server Fault or respective owner

Related posts about ruby

Related posts about compile