Embedding Ruby in c#

Discussion in 'Ruby' started by Leslie Viljoen, Apr 4, 2007.

  1. 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

    --=20
    If you could create a machine that copies hamburgers =97 you put one
    hamburger in and two equally good hamburgers come out the other side =97
    it would be unethical not to do so and make it freely available.
     
    Leslie Viljoen, Apr 4, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Candler

    Embedding ruby - name clashes

    Brian Candler, Jul 22, 2003, in forum: Ruby
    Replies:
    0
    Views:
    97
    Brian Candler
    Jul 22, 2003
  2. Basile STARYNKEVITCH

    embedding ruby - some questions

    Basile STARYNKEVITCH, Aug 31, 2003, in forum: Ruby
    Replies:
    0
    Views:
    124
    Basile STARYNKEVITCH
    Aug 31, 2003
  3. Basile STARYNKEVITCH

    questions about embedding ruby

    Basile STARYNKEVITCH, Sep 1, 2003, in forum: Ruby
    Replies:
    3
    Views:
    140
  4. Basile STARYNKEVITCH
    Replies:
    0
    Views:
    110
    Basile STARYNKEVITCH
    Sep 2, 2003
  5. Charles Comstock
    Replies:
    1
    Views:
    122
    Lyle Johnson
    Jun 25, 2004
Loading...

Share This Page