[Ironruby-core] Open-Uri Path in App.Config

Mohammad Azam lists at ruby-forum.com
Mon Mar 1 14:04:14 EST 2010

My fault I did not include the App.config settings. So, now I have 
copied everything from ir.exe.config into my App.config and I run the 
application and get the following error:

Unhandled Exception: IronRuby.Builtins.LoadError: no such file to load 
-- open-u
   at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame 
   at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 
arg0, T1 a
   at IronRuby.Runtime.RubyScriptCode.Run(Scope scope, Boolean 
   at IronRuby.Runtime.RubyScriptCode.Run(Scope scope)
   at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink 
   at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope 
   at Microsoft.Scripting.Hosting.ScriptEngine.ExecuteFile(String path)
   at IronRubyConsoleApp.Program.Main(String[] args) in 
y\ILoveIronRuby\IronRubyConsoleApp\Program.cs:line 30
Press any key to continue . . .

Mohammad Azam wrote:
> 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/.

More information about the Ironruby-core mailing list