I used the above code that you provided but it is throwing exceptions:

 static void Main(string[] args)
        {
            var setup = ScriptRuntimeSetup.ReadConfiguration();

            var runtime = Ruby.CreateRuntime(setup); // error is thrown 
here
            var engine = Ruby.GetEngine(runtime);

And the exception is:


Unhandled Exception: System.ArgumentException: Invalid argument value
Parameter name: ScriptRuntimeSetup must have at least one LanguageSetup
   at Microsoft.Scripting.Hosting.ScriptRuntimeSetup.ToConfiguration()
   at Microsoft.Scripting.Hosting.ScriptRuntime..ctor(ScriptRuntimeSetup 
setup)
   at IronRuby.Ruby.CreateRuntime(ScriptRuntimeSetup setup)
   at IronRubyConsoleApp.Program.Main(String[] args) in 
C:\Projects\ILoveIronRub
y\ILoveIronRuby\IronRubyConsoleApp\Program.cs:line 16
Press any key to continue . . .


Jim Deville wrote:
> Is app.config in the same directory as c:\path\to\ir.exe? I'm guessing 
> no. I'm NOT saying it should be. I'm saying use the other hosting method 
> I told you to. I believe that will use IronRuby's exe.config for 
> IronRuby. If you don't want to use my suggestion, then you need to 
> modify the relative paths in your app.config to point to the right 
> location.
> 
> JD

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to