[Ironruby-core] how to initialize iron ruby from c#

Curt Hagenlocher curth at microsoft.com
Sun Feb 8 14:23:59 EST 2009


Wow, this list is laggy -- I posted this almost 4 hours ago!  Sorry, I obviously didn't read your last paragraph. :(

From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Curt Hagenlocher
Sent: Sunday, February 08, 2009 7:31 AM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] how to initialize iron ruby from c#

Did you add a reference to IronRuby.Libraries.dll to your C# application?

From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Meinrad Recheis
Sent: Sunday, February 08, 2009 3:38 AM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] how to initialize iron ruby from c#

On Sun, Feb 8, 2009 at 12:33 AM, Meinrad Recheis <meinrad.recheis at gmail.com<mailto:meinrad.recheis at gmail.com>> wrote:
Hi there,

I am trying to initialize an iron ruby engine for execution of code snipptes from a c# application. extensive googling has not helped me with the task because there seem to have been much changes in iron ruby lately.

Here is my code:
var runtime = Ruby.CreateRuntime();
var engine = m_runtime.GetEngine("IronRuby"); // <--- InvalidImplementationException is thrown here

This is the inner exception.

{"Could not load file or assembly 'IronRuby.Libraries, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.":"IronRuby.Libraries, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"}

This happens with the latest nightly build of DLR binaries. I did make sure that IronRuby.Libraries.dll is added in the References of the project but it still can't be loaded. Did I miss something obvious?

Hi, I found the cause of the error: IronRuby.Libraries.dll does not get copied to the bin/debug location on build like the other dependencies (i.e. IronRuby.dll, etc. ) despite the fact that they are all correctly listed as references of the project. When I copy it manually everything works fine. Any idea, why it is not copied automatically?
Cheers,
-- henon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090208/a9f171f4/attachment.html>


More information about the Ironruby-core mailing list