I'm trying to upgrade some 4 year old code from a blog post that allows IronRuby to import/export MEF parts.
The code is at: https://github.com/JogoShugh/IronRubyMef
Unfortunately, I get this error when attempting to run:
Method not found: 'Microsoft.Scripting.Actions.Calls.OverloadInfo[]
Microsoft.Scripting.Actions.Calls.ReflectionOverloadInfo.CreateArray
(System.Reflection.MemberInfo[])
I only found one reference to this on the IronRuby forum, and sent another note. But, does anyone else have any idea what could cause this?
Thank you
That error is normally caused when calling Object.new from a ruby script. Which should be working of course, IronRuby 1.1.3 seems to come with a bug where if you do Object.methods it actually lists :new but it fails on invocation.
The fix is somewhat simple, just prepend this to your Ruby program initialization, before any requires call:
class System::Object
def initialize
end
end
requires 'some/module'
# Rest of your code...
Now, when any script calls Object.new, it'll work correctly.I wrote a post about this issue: http://marcel.bowlitz.com/continuous-integration/custom-resources-in-visual-studio-test-projects
UPDATE: IronRuby 1.1.4 (found in http://github.com/IronLanguages/main) fixes this issue. You have checkout the code and build.