> Date: Sun, 8 Feb 2009 01:20:48 +0100
>
From: Thibaut Barr?re <[email protected]>
>
Subject: Re: [Ironruby-core] how to initialize iron ruby from c#
>
To: [email protected]
>
Message-ID:
>
<[email protected]>
>
Content-Type: text/plain; charset="iso-8859-1"
>
> >
>
> 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
>
>
>
> not sure if it will solve your issue, but here's what I'm using (worked a
>
few days ago - code snippet sent by Tomas Matousek):
>
> var engine = IronRuby.Ruby.CreateEngine();
>
engine.Execute(code);
>
> hth,
>
> -- Thibaut
Thanks Thibaut, I tried that, and get the same error. Maybe I should try out
older binaries.
Apart from that, I want to make sure, that my approach to embedding IronRuby
in a .NET app is right (didn't find any tutorials on embedding):
1) Add references to IronRuby.dll, IronRuby.Libraries.dll,
Microsoft.Scripting.dll and Microsoft.Scripting.Core.dll
2) Create a engine like this
var engine = IronRuby.Ruby.CreateEngine();
and then executie ruby code on the engine itself with Execute, or compile
code into a ScriptSource and execute that.
Are there any steps missing? ir.exe has a config file. I don't need one to
get iron ruby basically running, do I?
The standard library is embedded in IronRuby.Libraries.dll, so I don't need
to set a load path, right?
I would be willing to write a tutorial on embedding once I got everything
together and working.
Thanks for clarification,
-- henon
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core