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/
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.

7 Responses
12.30.2008
It appears the pathname2 gem is needed as well. Unfortunately I got an error building with your instructions on Mono 2.0.1 on OS X:
Actions/DynamicObject.cs(411,32): error CS0121: The call is ambiguous between the following methods or properties: `System.Linq.Expressions.Expression.Block(params System.Linq.Expressions.Expression[])’ and `System.Linq.Expressions.Expression.Block(System.Collections.Generic.IEnumerable, params System.Linq.Expressions.Expression[])’
12.30.2008
I’m sorry I should have mentioned that. I’ll edit the post to include the installation of the pathname2 gem.
I’m also using the trunk version of mono, I’ll include that in the post too.
Thanks
1.6.2009
Or you can install Mono from
http://mono.ximian.com/monobuild/preview/download-preview/
should work as well.
1.26.2009
It doesnt build on a case sensitive filesystem.