Skip to content

Instantly share code, notes, and snippets.

@leandrosilva
Created September 14, 2012 01:19
Show Gist options
  • Select an option

  • Save leandrosilva/3719217 to your computer and use it in GitHub Desktop.

Select an option

Save leandrosilva/3719217 to your computer and use it in GitHub Desktop.
Embedded IronRuby - Hello World!!!
.DS_Store
*.exe
#!/bin/bash
dmcs -r:/opt/ironruby/bin/IronRuby.dll \
-r:/opt/ironruby/bin/IronRuby.Libraries.dll \
-r:/opt/ironruby/bin/Microsoft.Scripting.dll \
program.cs
using Microsoft.Scripting.Hosting;
class Program {
static void Main(string[] args)
{
ScriptEngine engine = IronRuby.Ruby.CreateEngine();
ScriptSource source = engine.CreateScriptSourceFromString("puts 'Hello from IronRuby'");
source.Execute();
}
}
#!/bin/bash
MONO_PATH=$MONO_PATH:/opt/ironruby/bin
export MONO_PATH
mono program.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment