Projects
Home     Blog     Install     New Ticket     View Tickets     Browse Source

Installing MacRuby

Important: MacRuby requires Mac OS X 10.5.2, or later.

Releases

The latest release of MacRuby is 0.3.

Binary releases are available in http://www.macruby.org/files/. You can download the latest archive there and start the installer.

Sources for every release are available in the SVN repository, within the tags directory. For example, to get the sources of the 0.3 release, you do:

$ svn co http://svn.macosforge.org/repository/ruby/MacRuby/tags/0.3 MacRuby-0.3

Testing Branch

It is always possible to try the latest changes by using the testing branch.

$ svn co http://svn.macosforge.org/repository/ruby/MacRuby/branches/testing MacRuby

Periodically, changes from the development branch (trunk) are merged into testing, once they appear to be stable enough to be tested.

If you want to try the development branch, please read MacRubyDevelopment.

Building

Note: Since 0.3, MacRuby doesn't use autotools anymore but rake for its build system. If you are building 0.2 or a version below, please refer to InstallingAutotoolsBasedMacRuby.

Here is the recommended way to build and install MacRuby. This is actually the same way the versions installed by binary installers are built.

$ cd MacRuby
$ rake
$ sudo rake install

This will build MacRuby as a universal library (for both Intel and PPC architectures) and install it as a framework, in /Library/Frameworks/MacRuby.framework.

Executable utilities (such as irb, but also the ruby interpreter) will be available in /usr/local/bin, with a mac prefix to avoid potential collision with your existing environment. For example, the MacRuby interpreter can be executed from the command line like this:

$ /usr/local/bin/macruby -e "p :hello"
:hello

Xcode templates will be installed and immediately available in Xcode.

Examples will be installed in /Developer/Examples/Ruby/MacRuby.

You can configure the build by passing options to rake (pass the -h flag to get help).

If you want to generate and install the RI files for the whole source tree, you can do:

$ sudo rake install_doc

Note that this process is quite slow, which is why it is not performed by the default target. We still plan to work on the performances.

And Now?

Once you're set, you can check out some samples in the /Developer/Examples/Ruby/MacRuby directory, or go ahead and follow the MacRubyTutorial.

Found a problem? Please file a ticket on the MacRuby component.