Calling ruby from a windows app?

Hey,

I was looking around for scripting languages that'd enable me to add
some sort of scripting to my application when i stumbled into ruby. it
seems quite an excellent scripting language, however i've not managed
to be able to reference it from the outside much - i may be looking in
the wrong places.

I guess what I'm looking for is some ruby.dll that has
RunScript("gak.rb"); and InvokeMethod("moo",args); and all that, and
also ExposeObject("texgen",mytexgen->objdef); and a callback function
or something like that. Does anything like this exist? Or any way to
fake this behaviour without getting all too hacky?

Egbert

Hi,

At Fri, 7 Oct 2005 18:51:52 +0900,
Egbert Teeselink wrote in [ruby-talk:159497]:

I guess what I'm looking for is some ruby.dll that has
RunScript("gak.rb"); and InvokeMethod("moo",args); and all that, and
also ExposeObject("texgen",mytexgen->objdef); and a callback function
or something like that. Does anything like this exist? Or any way to
fake this behaviour without getting all too hacky?

See README.EXT file.

···

--
Nobu Nakada

I guess what I'm looking for is some ruby.dll that has
RunScript("gak.rb"); and InvokeMethod("moo",args); and all that, and
also ExposeObject("texgen",mytexgen->objdef); and a callback function
or something like that. Does anything like this exist? Or any way to
fake this behaviour without getting all too hacky?

The ruby documentation describes how to do this.
The PickAxe book (get version 2.0) also covers this.

Download the ruby source and take a look at ruby.h. This has all the publicly accessible functions and defines for calling Ruby from C.

Stephen

···

--
Stephen Kellett
Object Media Limited http://www.objmedia.demon.co.uk/software.html
Computer Consultancy, Software Development
Windows C++, Java, Assembler, Performance Analysis, Troubleshooting

Someone wrote a Ruby to .NET bridge, which looks like it can evaluate
Ruby code from a .NET app. YOu have to look at their "EmbeddedSample"
project to see how to do it, though. Their examples only show how to
call .NET from Ruby.

http://www.google.com/url?sa=t&ct=res&cd=1&url=http%3A//www.saltypickle.com/rubydotnet/&ei=7OFGQ4uuE7SIiAGImqSpDA&sig2=B_KAPl3Kb8wKjRJtlMMBcQ

Egbert Teeselink wrote:

···

Hey,

I was looking around for scripting languages that'd enable me to add
some sort of scripting to my application when i stumbled into ruby. it
seems quite an excellent scripting language, however i've not managed
to be able to reference it from the outside much - i may be looking in
the wrong places.

I guess what I'm looking for is some ruby.dll that has
RunScript("gak.rb"); and InvokeMethod("moo",args); and all that, and
also ExposeObject("texgen",mytexgen->objdef); and a callback function
or something like that. Does anything like this exist? Or any way to
fake this behaviour without getting all too hacky?

Egbert