# Ruby in a C# program

**URL:** <https://www.ruby-forum.com/t/ruby-in-a-c-program/99931>\
**Category:** Ruby\
**Created:** [July 26, 2006, 8:59am UTC](https://www.ruby-forum.com/t/ruby-in-a-c-program/99931 "2006-07-26T08:59:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![leslieviljoen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/3d9bf3/32.png) [@leslieviljoen](https://www.ruby-forum.com/u/leslieviljoen)\
**Post date:** [July 26, 2006, 8:59am UTC](https://www.ruby-forum.com/t/ruby-in-a-c-program/99931/1 "2006-07-26T08:59:14Z")

</div>

Hi!

Is there a way to embed a Ruby interpreter into a C# program? I can  
call Ruby from C# fine, and then parse the console output, but I’m  
wondering if there’s not a better way.

I have tried the Ruby .NET compiler here:  
[http://plas.fit.qut.edu.au/Ruby.NET/Download.aspx](http://plas.fit.qut.edu.au/Ruby.NET/Download.aspx)

…but I get “undefined Resolver in Syck” when trying to compile YAML.

Any ideas?

Les

---

<div class="post-metadata">

**Author:** ![leslieviljoen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/3d9bf3/32.png) [@leslieviljoen](https://www.ruby-forum.com/u/leslieviljoen)\
**Post date:** [July 27, 2006, 3:46pm UTC](https://www.ruby-forum.com/t/ruby-in-a-c-program/99931/2 "2006-07-27T15:46:34Z")

</div>

Hi Les,

The pickaxe book gives a very good example of using Ruby from c. When  
Ruby can be called from C, it can easily be called from C# using  
P/Invoke.

Rgds,  
Christian

Leslie V. skrev:
