Jim Lindley Notes

MacRuby

February 28th, 2008

Apple has just released a development version of MacRuby, Ruby 1.9 built on top of Objective-C. This is very interesting, and is only the second ever Apple language that will have Cocoa support built in from the ground up.

Also, it includes keyword argument support, something missing from current Ruby implementations. It will be interesting to see if this is the first alternate Ruby implementation that will truly fork from the C-based Ruby language. I really hope that it doesn’t end up becoming so.

I’d recommend modifying the Apple installation instructions (adding a directory in your home folder, and then just editing the configure line), like so:

mkdir -p ~/macruby
./configure --enable-shared \
            --prefix=/Users/[username]/macruby \
            --program-prefix=mac

That way ‘ruby’ still points to the current production quality Ruby 1.8.6 installed with Leopard, no gem folders are stepped on, and you can access MacRuby via ‘macruby’, ‘macirb’, etc, if you add the macruby’s bin folder to your path.

    Comments

  1. Jacob Lukas:

    Shouldn’t that first –program-prefix really be –prefix?

  2. Jim Lindley:

    Aaargh, yes, sorry Jacob, I fixed it in the post. I changed it around a little bit after originally posting and mis-copied my changed. Thanks :)

  3. Wayne E. Seguin:

    Thanks for this :D

Sorry, comments are closed for this article.