Yes, in the previous versions, the external projects had the option of a build configuration which did not have the SIGNED compilation symbol. This seems to have disappeared. The significance of this is that when you try to create the Ruby runtime it tries to look up the assembly for the language. If SIGNED is set then it looks them up with fully named assemblies (and so expects the assembly to be signed correctly). Obviously we are not provided with the private key to sign the assemblies and so the lookup fails.
For some reason the RubyConsole project stills works even with this compilation symbol set. But if you create your own app then it fails. All you have to do is remove this symbol from the build for the Microsoft.Scripting project and the program will run. The runtime bug you reported is a bug somehow, although I am not sure if there is some other way of creating the Engine that stops multiple engines from being created. It seems to me that the engine is looked up using the language context as a key - in this case a RubyContext object. If you step through the code there are two of these objects and they do not have equivalent HashCodes so that triggers the creation of a new Engine. Either the object comparison for these objects needs to be fixed or the use of multiple RubyContexts needs to be fixed. Pete -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Brotherus Sent: Friday,16 May 16, 2008 08:47 To: [email protected] Subject: Re: [Ironruby-core] IR SVN 107 changes behavior of'require'(compared to SVN 103) Robert Brotherus > If someone can provide instructions on how to compile the simple program I sent without removing the > SIGNED symbols from the libraries, then I can see if I get it working. The SIGNED symbols appeared > somewhere around SVN 103 and broke my program as well but at that time removing the SIGNED allowed > working again (even with the 'require'). I must correct myself: The simple program (attached here again) does COMPILE against all these IR versions but with IR 103+ that are compiled with the default "SIGNED" symbol, it fails runtime: Microsoft.Scripting.Runtime.MissingTypeException: Type 'IronRuby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Ruby.Runtime.RubyContext' is missing or cannot be loaded. ---> System.IO.FileLoadException: Could not load file or assembly 'IronRuby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'IronRuby, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at Microsoft.Scripting.PlatformAdaptationLayer.LoadAssembly(String name) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\PlatformAdaptati onLayer.cs:line 125 at Microsoft.Scripting.Runtime.ScriptDomainManager.LanguageRegistration.Loa dLanguageContext() in C:\programs\IronRuby\trunk\src\Microsoft.Scripting.Core\Runtime\ScriptDo mainManager.cs:line 165 ... at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) in C:\programs\IronRuby\trunk\src\Microsoft.Scripting\Hosting\ScriptSource. cs:line 146 at Program.ExecuteStr(String code) in C:\DATA\IronRubyTest1\Program.cs:line 49 at Program.Run() in C:\DATA\IronRubyTest1\Program.cs:line 21 at Program.Main(String[] args) in C:\DATA\IronRubyTest1\Program.cs:line 9 Press any key to continue . . . ---------------- When SIGNED is turned off, then the programs works correctly at IR 103, but fails at IR 107+ to the reported earlier "System.MemberAccessException: uninitialized constant Object::F". I have now submitted bug (20167) about this. Robert Brotherus Software architect Napa Ltd Email: [EMAIL PROTECTED] www.napa.fi _______________________________________________ Ironruby-core mailing list [email protected] http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list [email protected] http://rubyforge.org/mailman/listinfo/ironruby-core
