Forum: Ruby Embedding Ruby in c#

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
37ee5fa90f5eaeef62553629382497f7?d=identicon&s=25 Leslie Viljoen (Guest)
on 2007-04-04 23:35
(Received via mailing list)
Hi All

I have installed RubyDotNet from here:
http://rubydotnet.sourceforge.net/ because I want to embed a Ruby
interpreter in C#. In my C# project I added a reference to
RubyInterpreter.dll and then tried:

RubyDotNet.RubyInterpreter.instance.eval("5");  .. but I got the error:
"unable to load DLL 'c:/ruby180/bin/msvcrt-ruby18.dll'.

Since my Ruby is under c:/ruby, and RubyDotNet's setup.rb had copied
files there, I made a duplicate ruby180 directory and copied the same
files there. I then also copied the msvcrt-ruby18.dll file from my
c:/ruby/bin to my ruby180/bin directory. This produced an
'AccessViolationException', which is some kind of memory corruption.

Perhaps this RubyDotNet is old and based on Ruby 1.8.0 and not my Ruby
1.8.5 one-click installer. Should I bother trying to install an old
1.8.0 Ruby or is this not going to work? Is there some other (better)
way to embed a ruby interpreter in a C# app? I want to embed a
scripting engine so that I can change a rules engine at run-time.

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