What this is, is a small dll which you can add to any .net winforms project. When run, it brings up the interactive console, and you can poke around with your app. It's running live inside your process, so anything your app can do, it can do. I thought this was kind of cool :-)
How to get it going:
- Download and build IronRuby by following the instructions on IronRuby.net - I built this against IronRuby SVN revision 153. As of RIGHT NOW the current revision is 154 which doesn't build.
- Download the Embedded IronRuby project from the following URL - you can use SVN to check it out directly from there. (I'm assuming familiarity with SVN in the interests of brevity)
- Open the EmbeddedIronRuby/EmbeddedIronRuby.sln file in visual studio, and remove/add reference so that it references
IronRuby.Libraries.dll. These will be in the IronRuby
build\debugfolder that you will have built in step 1.
- For some reason, when you compile, Visual Studio will only copy
bin\debugdirectory. It also needs
IronRuby.Libraries.dllin that directory (or in the GAC) to run, otherwise you get a stack overflow in the internal IronRuby code when you run it.
The joys of alpha software I guess :-)
- Run the app and click the button!
EmbeddedRubyConsole.dll, and in your app do this:
Credit: Some of the 'plumbing' code (the
TextWriterStream) come from the excellent IronEditor application. Full credit to and copyright on those files to Ben Hall. Thanks!