[Ironruby-core] r105 broke assembly loading

Steve Eichert steve.eichert at gmail.com
Tue May 13 21:27:35 EDT 2008


I haven't tried revision 105 to know if it still works but I've been using
the /paths command line option to tell IronRuby where my assemblies are.

ir.exe paths/:C:\paths\to\my\dlls my_ruby_script.rb

Cheers,
Steve

On Tue, May 13, 2008 at 9:17 PM, Ivan Porto Carrero <ivan at flanders.co.nz>
wrote:

> 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
> >
>
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20080513/9f600ab8/attachment-0001.html>


More information about the Ironruby-core mailing list