Forum: IronRuby NoMethodException

09cda529e2b8268a843342a71d8ad128?d=identicon&s=25 William W. (william_w)
on 2014-04-11 18:38
I am running IronRuby 1.1.3 as installed from NuGet.  It is loading a
very simple script that creates a class and calls a method on that
class.  This exception is thrown:

---

System.MissingMethodException: Method not found:
'Microsoft.Scripting.Actions.Ca
lls.OverloadInfo[]
Microsoft.Scripting.Actions.Calls.ReflectionOverloadInfo.Crea
teArray(System.Reflection.MemberInfo[])'.
   at IronRuby.Builtins.RubyClass.GetConstructors(Type type)
   at
IronRuby.Builtins.RubyClass.BuildObjectConstructionNoFlow(MetaObjectBuilde
r metaBuilder, CallArguments args, String methodName)
   at
IronRuby.Builtins.RubyClass.BuildObjectConstruction(MetaObjectBuilder
meta
Builder, CallArguments args, String methodName)
   at IronRuby.Runtime.Calls.RubyMemberInfo.BuildCall(MetaObjectBuilder
metaBuil
der, CallArguments args, String name)

---

The ruby code being loaded:

class MyClass

    def run
    puts 'Hello, World!'
  end

end

hello = MyClass.new

---
I have all of the required references set IronRuby, IronRuby.Libraries,
IronRuby.Libraries.Yaml, Microsoft.Scripting,
Microsoft.Scripting.Metadata, Microsoft.Dynamic.

I downloaded the binaries and referenced those files directly and still
same issue.

I installed the IronRuby package as well and from the command promp I
get the same error.  Any idea what's going on here?

There was another thread with this same issue but the system told me to
start a new topic as that one was old.

Bill
3a9ff49a9e689dcbfc8242f05180cc31?d=identicon&s=25 Orion Edwards (Guest)
on 2014-04-29 06:52
(Received via mailing list)
Can you give an example of the ruby code that is failing?

The error indicates IronRuby is having trouble finding an appropriate
constructor to call for a C# class
Can you give some more information about the class you're trying to
instantiate? eg
 - What constructors does it have
 - Are they private/protected
 - What parameters does each have
 - anything else that might be relevant

Regards

Orion
This topic is locked and can not be replied to.