# IronRuby r86 on Mono

**URL:** <https://www.ruby-forum.com/t/ironruby-r86-on-mono/132840>\
**Category:** IronRuby\
**Created:** [March 25, 2008, 7:46am UTC](https://www.ruby-forum.com/t/ironruby-r86-on-mono/132840 "2008-03-25T07:46:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanghyeon\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e56c9b/32.png) [@Sanghyeon\_S](https://www.ruby-forum.com/u/Sanghyeon_S)\
**Post date:** [March 25, 2008, 7:46am UTC](https://www.ruby-forum.com/t/ironruby-r86-on-mono/132840/1 "2008-03-25T07:46:15Z")

</div>

The law of nature dictates that if it is not tested, it is broken. So  
it is only natural that the recent rewrite of IronRuby’s Rakefile  
broke build on Mono. No worry, I guess that’s why I’m on this list.  
🙂

The preliminary fixes are available here:  
[http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/patch-rakefile](http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/patch-rakefile)

Let me go through changes one by one.

- exec “mkdir #{build\_path}”

- mkdir build\_path

If you have defined an abstraction, you better use it. Related is:

- exec\_f “mkdir #{path}”

- if ENV[‘mono’].nil?
- exec\_f “mkdir #{path}”
- else
- exec\_f “mkdir -p #{path}”
- end

On Windows, mkdir command will create any necessary parent  
directories. To get the same effect, you need -p option on Unix.

This change is arguably wrong, since you can use Mono on Windows too.  
But let’s worry about that later. I guess reimlementing “mkdir -p” in  
Ruby would be the way to go. Since such functionality would be  
generally useful, it could be contributed to, say, Ruby standard  
library. Perhaps such functionality is already there…

framework\_path {  
libdir = IO.popen(‘pkg-config --variable=libdir mono’).read.strip

- Pathname.new(libdir) + ‘mono’ + ‘2.0’

- [Pathname.new(libdir) + ‘mono’ + ‘2.0’]  
}

framework\_path should be called with an array, or with a block  
returning _an array_.

- get\_source\_dir(:build) + "/#{clr …

- get\_source\_dir(:build) + "#{clr …

Pathname.new(‘build’) + ‘/release’ produces ‘build\release’ on  
Windows, but ‘/release’ on Unix. PLEASE NO PATH SEPARATOR IN STRING  
WHEN USING PATHNAME.

- compile :dlr, …

- compile :dlr, :references =\> [‘!System.Configuration.dll’], …

Apparently Microsoft C# compiler references System.Configuration.dll  
automatically.

The rest are boring case sensitivity issues. Also, since references to  
framework paths are resolved by calling  
Configuration.get\_references(clr), I let clr return :mono and change  
group(:common) to group(:mono).

---

<div class="post-metadata">

**Author:** ![Sanghyeon\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e56c9b/32.png) [@Sanghyeon\_S](https://www.ruby-forum.com/u/Sanghyeon_S)\
**Post date:** [March 25, 2008, 2:46pm UTC](https://www.ruby-forum.com/t/ironruby-r86-on-mono/132840/2 "2008-03-25T14:46:09Z")

</div>

Awesome! Thanks for the patch. Will integrate ASAP.

-John

---

<div class="post-metadata">

**Author:** ![Sanghyeon\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e56c9b/32.png) [@Sanghyeon\_S](https://www.ruby-forum.com/u/Sanghyeon_S)\
**Post date:** [March 27, 2008, 12:52am UTC](https://www.ruby-forum.com/t/ironruby-r86-on-mono/132840/3 "2008-03-27T00:52:20Z")

</div>

I guess reimlementing “mkdir -p” in

> Ruby would be the way to go. Since such functionality would be  
> generally useful, it could be contributed to, say, Ruby standard  
> library. Perhaps such functionality is already there…

irb(main):001:0\> require ‘fileutils’  
=\> true  
irb(main):002:0\> FileUtils.mkdir\_p ‘foo/bar’  
=\> “foo/bar”

regards,  
Tor Erik
