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

Claudio Maccari claudio.maccari at gmail.com
Sun Feb 8 06:18:49 EST 2009


I have just downloaded DLR.10476.release.zip from
http://nightlybuilds.cloudapp.net/Project.aspx?project=dlr 

I edit my ir.exe.config as follow. Now ir.exe doesn't crash.

 

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

  <configSections>

    <section name="microsoft.scripting"
type="Microsoft.Scripting.Hosting.Configuration.Section,
Microsoft.Scripting, Version=0.9.5.1, Culture=neutral, PublicKeyToken=null"
requirePermission="false" />

  </configSections>

 

  <microsoft.scripting>

    <languages>

      <language names="IronPython;Python;py" extensions=".py"
displayName="IronPython 2.6 Alpha" type="IronPython.Runtime.PythonContext,
IronPython, Version=2.6.0.1, Culture=neutral, PublicKeyToken=null" />

      <language names="IronRuby;Ruby;rb" extensions=".rb"
displayName="IronRuby 1.0 Alpha" type="IronRuby.Runtime.RubyContext,
IronRuby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />

      <language names="ManagedJScript;JScript;js" extensions=".jsx;.js"
displayName="Managed JScript" type="Microsoft.JScript.Runtime.JSContext,
Microsoft.JScript.Runtime, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null" />

      <language names="ToyScript;ts" extensions=".ts"
type="ToyScript.ToyLanguageContext, ToyScript, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null" />

    </languages>

 

    <options>

      <set language="Ruby" option="LibraryPaths"
value="..\..\Languages\Ruby\libs\;..\..\..\External\Languages\Ruby\ruby-1.8.
6\lib\ruby\site_ruby\1.8\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ru
by\site_ruby\;..\..\..\External\Languages\Ruby\ruby-1.8.6\lib\ruby\1.8\" />

    </options>

  </microsoft.scripting>

</configuration>

 

 

From: ironruby-core-bounces at rubyforge.org
[mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville
Sent: domenica 8 febbraio 2009 8.37
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] how to initialize iron ruby from c#

 

You actually don't need to remove it if you want to use it for $LOAD_PATH
support. Just change the private keys to null, instead of the 31.. number.

 

JD

 

From: ironruby-core-bounces at rubyforge.org
[mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek
Sent: Saturday, February 07, 2009 5:39 PM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] how to initialize iron ruby from c#

 

The release on DLR CodePlex is broken. We are working on a fix. The problem
is in signed assemblies. Removing ir.exe.config (located next to ir.exe)
might help. 

 

Tomas

 

From: ironruby-core-bounces at rubyforge.org
[mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Meinrad Recheis
Sent: Saturday, February 07, 2009 3:34 PM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] how to initialize iron ruby from c#

 

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?

Any help would be much appreciated.

Thanks,

-- Henon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20090208/2d8288b4/attachment-0001.html>


More information about the Ironruby-core mailing list