Thanks that did it.<div><br></div><div>The System.Web.Mvc.Controller class does have an initialize method with 1 param.<br clear="all">---<br>Met vriendelijke groeten - Best regards - Salutations<br>Ivan Porto Carrero<br>Blog: <a href="http://flanders.co.nz">http://flanders.co.nz</a><br>

Twitter: <a href="http://twitter.com/casualjim">http://twitter.com/casualjim</a><br>Author of IronRuby in Action (<a href="http://manning.com/carrero">http://manning.com/carrero</a>)<br><br>
<br><br><div class="gmail_quote">On Sun, Jul 26, 2009 at 2:38 AM, Tomas Matousek <span dir="ltr">&lt;<a href="mailto:Tomas.Matousek@microsoft.com">Tomas.Matousek@microsoft.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div lang="EN-US" link="blue" vlink="purple"><div><p><span style="font-size:11.0pt;color:#1F497D">If you want an immediate fix go to RubyClass.cs and add </span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">&amp;&amp; initializer <span style="color:blue">is</span> <span style="color:#2B91AF">RubyLibraryMethodInfo </span></span><span style="font-size:11.0pt;color:#1F497D">to the condition on line 1213:</span></p>

<p><span style="font-size:11.0pt;color:#1F497D"> </span></p><p style="text-autospace:none"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue">bool</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"> hasLibraryInitializer = !hasRubyInitializer &amp;&amp; initializer.DeclaringModule != Context.ObjectClass <span style="background:yellow">&amp;&amp; initializer <span style="color:blue">is</span> <span style="color:#2B91AF">RubyLibraryMethodInfo</span></span>;</span></p>

<p><span style="font-size:11.0pt;color:#1F497D"> </span></p><p><span style="font-size:11.0pt;color:#1F497D">That should do the trick.</span></p><p><span style="font-size:11.0pt;color:#1F497D"> </span></p><p><span style="font-size:11.0pt;color:#1F497D">Tomas</span></p>

<p><span style="font-size:11.0pt;color:#1F497D"> </span></p><div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in"><p><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> <a href="mailto:ironruby-core-bounces@rubyforge.org" target="_blank">ironruby-core-bounces@rubyforge.org</a> [mailto:<a href="mailto:ironruby-core-bounces@rubyforge.org" target="_blank">ironruby-core-bounces@rubyforge.org</a>] <b>On Behalf Of </b>Tomas Matousek<br>

<b>Sent:</b> Saturday, July 25, 2009 5:16 PM</span></p><div><div></div><div class="h5"><br><b>To:</b> <a href="mailto:ironruby-core@rubyforge.org" target="_blank">ironruby-core@rubyforge.org</a><br><b>Subject:</b> Re: [Ironruby-core] Can&#39;t create instances</div>

</div><p></p></div></div><div><div></div><div class="h5"><p> </p><p><span style="font-size:11.0pt;color:#1F497D">Does any of the C# subclasses have Initialize method? That might be the problem. I’ll fix it asap.</span></p>

<p><span style="font-size:11.0pt;color:#1F497D"> </span></p><p><span style="font-size:11.0pt;color:#1F497D">Tomas</span></p><p><span style="font-size:11.0pt;color:#1F497D"> </span></p><p><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> <a href="mailto:ironruby-core-bounces@rubyforge.org" target="_blank">ironruby-core-bounces@rubyforge.org</a> [mailto:<a href="mailto:ironruby-core-bounces@rubyforge.org" target="_blank">ironruby-core-bounces@rubyforge.org</a>] <b>On Behalf Of </b>Ivan Porto Carrero<br>

<b>Sent:</b> Saturday, July 25, 2009 4:45 PM<br><b>To:</b> <a href="mailto:ironruby-core@rubyforge.org" target="_blank">ironruby-core@rubyforge.org</a><br><b>Subject:</b> Re: [Ironruby-core] Can&#39;t create instances</span></p>

<p> </p><p>It&#39;s a subclass of RubyController (<a href="http://github.com/casualjim/ironrubymvc/blob/f9b28881187865dcff3389231e627ee2c4f93d14/IronRubyMvc/Controllers/RubyController.cs" target="_blank">http://github.com/casualjim/ironrubymvc/blob/f9b28881187865dcff3389231e627ee2c4f93d14/IronRubyMvc/Controllers/RubyController.cs</a>)</p>

<div><p> </p></div><div><p>There are no constructors defined in any of the class definitions.</p></div><div><p> </p></div><div><p>HomeController.rb:</p></div><div><p><a href="http://github.com/casualjim/ironrubymvc/blob/f9b28881187865dcff3389231e627ee2c4f93d14/IronRubyMvcWeb/Controllers/HomeController.rb" target="_blank">http://github.com/casualjim/ironrubymvc/blob/f9b28881187865dcff3389231e627ee2c4f93d14/IronRubyMvcWeb/Controllers/HomeController.rb</a></p>

</div><div><p> </p></div><div><p>Ruby controller base class:</p></div><div><p><a href="http://github.com/casualjim/ironrubymvc/blob/f9b28881187865dcff3389231e627ee2c4f93d14/IronRubyMvc/Controllers/controller.rb#L360" target="_blank">http://github.com/casualjim/ironrubymvc/blob/f9b28881187865dcff3389231e627ee2c4f93d14/IronRubyMvc/Controllers/controller.rb#L360</a></p>

</div><div><p> </p></div><div><p>RubyController:</p></div><div><p style="margin-bottom:12.0pt"><a href="http://github.com/casualjim/ironrubymvc/blob/f9b28881187865dcff3389231e627ee2c4f93d14/IronRubyMvc/Controllers/RubyController.cs" target="_blank">http://github.com/casualjim/ironrubymvc/blob/f9b28881187865dcff3389231e627ee2c4f93d14/IronRubyMvc/Controllers/RubyController.cs</a><br clear="all">

---<br>Met vriendelijke groeten - Best regards - Salutations<br>Ivan Porto Carrero<br>Blog: <a href="http://flanders.co.nz" target="_blank">http://flanders.co.nz</a><br>Twitter: <a href="http://twitter.com/casualjim" target="_blank">http://twitter.com/casualjim</a><br>

Author of IronRuby in Action (<a href="http://manning.com/carrero" target="_blank">http://manning.com/carrero</a>)<br><br></p><div><p>On Sun, Jul 26, 2009 at 1:30 AM, Tomas Matousek &lt;<a href="mailto:Tomas.Matousek@microsoft.com" target="_blank">Tomas.Matousek@microsoft.com</a>&gt; wrote:</p>

<div><div><p><span style="font-size:11.0pt;color:#1F497D">What is the class being created that fails?</span></p><p><span style="font-size:11.0pt;color:#1F497D"> </span></p><p><span style="font-size:11.0pt;color:#1F497D">Tomas</span></p>

<p><span style="font-size:11.0pt;color:#1F497D"> </span></p><p><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> <a href="mailto:ironruby-core-bounces@rubyforge.org" target="_blank">ironruby-core-bounces@rubyforge.org</a> [mailto:<a href="mailto:ironruby-core-bounces@rubyforge.org" target="_blank">ironruby-core-bounces@rubyforge.org</a>] <b>On Behalf Of </b>Ivan Porto Carrero<br>

<b>Sent:</b> Saturday, July 25, 2009 4:01 PM<br><b>To:</b> ironruby-core<br><b>Subject:</b> [Ironruby-core] Can&#39;t create instances</span></p><div><div><p> </p><p>Hi</p><div><p> </p></div><div><p>I just updated from github and ironrubymvc broke.</p>

</div><div><p> </p></div><div><p>This method would happily execute before the update.</p></div><div><p> </p></div><div><div><p>public object CreateInstance(RubyClass rubyClass)</p></div><div><p>        {</p></div><div><p>

            return Operations.CreateInstance(rubyClass);</p></div><div><p>        }</p></div><div><p> </p></div><div><p>Now it throws an exception. Do I need to change something?</p></div><div><pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;"> </span></pre>

<pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;"> </span></pre><pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">ArgumentException: wrong number of arguments (0 for 1)]</span></pre>

<pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   Microsoft.Scripting.Interpreter.ThrowInstruction.Run(InterpretedFrame frame) +58</span></pre><pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   Microsoft.Scripting.Interpreter.Interpreter.RunInstructions(InterpretedFrame frame) +90</span></pre>

<pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) +104</span></pre><pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   Microsoft.Scripting.Interpreter.LightLambda.Run2(T0 arg0, T1 arg1) +337</span></pre>

<pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   IronRuby.Runtime.Calls.InterpretedFuncDispatcher`2.Invoke(CallSite callSite, T0 arg0) +574</span></pre><pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +1217</span></pre>

<pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   CallSite.Target(Closure , CallSite , Object ) +414</span></pre><pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +1217</span></pre>

<pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   Microsoft.Scripting.Runtime.DynamicOperations.CreateInstance(Object obj, Object[] parameters) +209</span></pre><pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   Microsoft.Scripting.Hosting.ObjectOperations.CreateInstance(Object obj, Object[] parameters) +51</span></pre>

<pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   System.Web.Mvc.IronRuby.Core.RubyEngine.CreateInstance(RubyClass rubyClass) in C:\dev\ironrubymvc\IronRubyMvc\Core\RubyEngine.cs:100</span></pre>

<pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   System.Web.Mvc.IronRuby.Controllers.RubyControllerFactory.ConfigureController(RubyClass rubyClass, RequestContext requestContext) in C:\dev\ironrubymvc\IronRubyMvc\Controllers\RubyControllerFactory.cs:87</span></pre>

<pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   System.Web.Mvc.IronRuby.Controllers.RubyControllerFactory.LoadController(RequestContext requestContext, String controllerName) in C:\dev\ironrubymvc\IronRubyMvc\Controllers\RubyControllerFactory.cs:73</span></pre>

<pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   System.Web.Mvc.IronRuby.Controllers.RubyControllerFactory.CreateController(RequestContext requestContext, String controllerName) in C:\dev\ironrubymvc\IronRubyMvc\Controllers\RubyControllerFactory.cs:40</span></pre>

<pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +128</span></pre><pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +57</span></pre>

<pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +7</span></pre><pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181</span></pre>

<pre><span style="font-size:11.0pt;font-family:&quot;Lucida Console&quot;">   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +75</span></pre></div><p style="margin-bottom:12.0pt">

---<br>Met vriendelijke groeten - Best regards - Salutations<br>Ivan Porto Carrero<br>Blog: <a href="http://flanders.co.nz" target="_blank">http://flanders.co.nz</a><br>Twitter: <a href="http://twitter.com/casualjim" target="_blank">http://twitter.com/casualjim</a><br>

Author of IronRuby in Action (<a href="http://manning.com/carrero" target="_blank">http://manning.com/carrero</a>)</p></div></div></div></div></div><p style="margin-bottom:12.0pt"><br>_______________________________________________<br>

Ironruby-core mailing list<br><a href="mailto:Ironruby-core@rubyforge.org" target="_blank">Ironruby-core@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a></p>

</div><p> </p></div></div></div></div></div><br>_______________________________________________<br>
Ironruby-core mailing list<br>
<a href="mailto:Ironruby-core@rubyforge.org">Ironruby-core@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a><br>
<br></blockquote></div><br></div>