30DecBuilding IronRuby with Mono on OSX

**** This is a duplicate post of http://rubydoes.net/2008/12/30/building-ironruby-with-mono/ ****

IronRuby comes in 2 flavours of SCM and apparently also with 2 flavours of project layout.

I spend most of my time on the mac and I wanted to be able to test ironruby stuff on it too. I tried to build IronRuby on my mac which doesn’t work straight away you have to patch it a little to make it work.

If you’re using the svn version then you can use the patch created by Seo Sanghyeon.

Michael Letterle has forked the ironruby git repository and created a branch called linux. You can find it on github.

For me the linux branch didn’t want to work and so I forked the ironruby repository too, created a branch called mono. My version is also up on github.

If you’re going to use the git layout of IronRuby, which is practically the same as what the IronRuby team uses at Microsoft. You’ll have to set an environment variable MERLIN_ROOT . I use a .bashrc file and added the following line to it:

export MERLIN_ROOT=’/Users/ivan/src/ironruby/merlin/main’

Now how do you get to those git branches?

Start a terminal session.

I have a directory src in which i download and compile sources. So I navigated into that directory src.

cd src

git clone git://github.com/casualjim/ironruby.git

cd ironruby

git checkout -b mono

git pull origin mono

Compiling IronRuby

cd merlin/main/Languages/Ruby

rake compile mono=1

Update:

You will also need a version of ruby installed, rake and the pathname2 gem

It won’t work with the latest release of mono. I’m using the trunk version of mono to build ironruby.
I’ve got instructions that could show you how to compile mono here.


  1. 1 Aslak Hellesøy15 Jan 2009

    Your GitHub repo doesn’t have a mono branch. The only branch up there is master. Did you delete the branch? Any hints on how to build on OS X as of today?

  2. 2 ivan17 Jan 2009

    Hi Aslak,

    I’ve added the mono branch to my repo again and ensured that it will build on mono (at least on my machine).
    I deleted it earlier because I couldn’t get it to sync properly with the ironruby upstream repo.

  3. 3 konstantin27 Jan 2009

    Doesn’t work for me (on linux – the linux fork you mentioned is no longer available):

    konstantin:~/Workspace/ironruby/ironruby/Merlin/Main/Languages/Ruby (git: mono) $ rake compile mono=1
    (in /home/konstantin/Workspace/ironruby/ironruby/Merlin/Main/Languages/Ruby)
    Cannot find svn.exe on system path.

    ***** Missing commands! You must have the .NET redist and the SDK
    ***** (for resgen.exe) installed. If you are synchronizing source
    ***** trees *inside* Microsoft, you must have both tfs.exe and
    ***** svn.exe on your path.

  4. 4 ivan27 Jan 2009

    @konstantin I’ll fix this tonight.. You can also use the the one from michael letterle


Recent Flickrs

    Blogroll

    Recent Listening

    Scrobbler