[Ironruby-core] r105 broke assembly loading

Ivan Porto Carrero ivan at flanders.co.nz
Tue May 13 21:17:52 EDT 2008


Ok I'm all for features but how do I now require my own homebaked dll  
because registering them in the GAC isn't the way to go IMHO :)

I've tried a bunch of things to get to my dll but it boils down to  
that it doesn't know how to load it. When I copy my assembly into the  
ironruby build folder it does work. That just doesn't seem right to  
me. If there is a new an elegant way to load arbitrary assemblies then  
I'd love to know. In meantime I can hack my source to add assembly  
loading from a path as well

Below the output from my various tries to get my assembly loaded  
without putting it in the ironruby binaries folder

+ C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby
» ir -I C:\projects\lumpr\src\Sylvester.DesktopEdition 
\Sylvester.IronRuby\bin\Sylvester.Contracts.dll

 >>> include Twitter::Model
c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\ModuleOps.cs:642:in  
`ConstantMissing': uninitialized constant Object::
Twitter (NameError)
         from :0:in `Initialize##1'
 >>> exit

+ C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby
» ir -I C:\projects\lumpr\src\Sylvester.DesktopEdition 
\Sylvester.IronRuby\bin

 >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral,  
PublicKeyToken=null'
c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in  
`Require': no such file to load -- Sylvester.Contract
s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError)
         from :0:in `Initialize##1'
 >>> exit

+ C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby
» ir

 >>> Dir.chdir('C:\projects\lumpr\src\Sylvester.DesktopEdition 
\Sylvester.IronRuby\bin')
=> 0
 >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral,  
PublicKeyToken=null'
c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in  
`Require': no such file to load -- Sylvester.Contract
s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError)
         from :0:in `Initialize##7'
 >>> exit

+ C:\projects\lumpr\src\Sylvester.DesktopEdition\Sylvester.IronRuby
» ir -I C:\projects\lumpr\src\Sylvester.DesktopEdition 
\Sylvester.IronRuby\bin

 >>> Dir.chdir('C:\projects\lumpr\src\Sylvester.DesktopEdition 
\Sylvester.IronRuby\bin')
=> 0
 >>> require 'Sylvester.Contracts, Version=1.0.0.0, Culture=neutral,  
PublicKeyToken=null'
c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in  
`Require': no such file to load -- Sylvester.Contract
s, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null (LoadError)
         from :0:in `Initialize##8'
 >>>

Thanks
Ivan

On 14/05/2008, at 10:42 AM, John Lam (IRONRUBY) wrote:

> One more thing, r105 adds support for the -I command line switch, so  
> you can now:
>
> ir -I path-to-your-includes-directory yourapp.rb
>
> Thanks,
> -John
>
>
> -----Original Message-----
> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org 
> ] On Behalf Of Ivan Porto Carrero
> Sent: Tuesday, May 13, 2008 3:32 PM
> To: ironruby-core at rubyforge.org
> Subject: [Ironruby-core] r105 broke assembly loading
>
> Hi
>
> I just updated to r105 and now I can't require assemblies anymore.
>
>>>> require 'bin/System.Net.dll'
> c:\tools\IronRuby\src\IronRuby.Libraries\Builtins\Kernel.cs:272:in
> `Require': Invalid character '?' in expression (Synta
> xError)
>         from :0:in `Initialize##1'
>
> Do I submit a bug for that?
>
> Cheers
> Ivan
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core



More information about the Ironruby-core mailing list