[Ironruby-core] What replaces RubyEngine.CurrentEngine?
Phil Haack
haacked at gmail.com
Mon Dec 3 16:48:28 EST 2007
Odd, I tried that and still had problems. This is what fixed it for me:
LanguageProvider ruby =
manager.GetLanguageProvider(typeof(RubyLanguageProvider));
I just explicitly passed in the type. All's good now. Thanks for the help!
Tomas Restrepo wrote:
> Yep, I think Peter's right. The relevant piece of code seems to be in
> Hosting\ScriptEnvironmentSetup.cs, line 139 in the DLR assembly.
>
> On 12/3/07, *Peter Bacon Darwin * <bacondarwin at googlemail.com
> <mailto:bacondarwin at googlemail.com>> wrote:
>
> I believe there is a conditional compilation symbols called
> SIGNED. If you remove that from all the projects, then the
> language loading mechanism doesn't try to use the public key. I
> think!
>
> Pete
>
>
>
> *From:* ironruby-core-bounces at rubyforge.org
> <mailto:ironruby-core-bounces at rubyforge.org>
> [mailto:ironruby-core-bounces at rubyforge.org
> <mailto:ironruby-core-bounces at rubyforge.org>] *On Behalf Of *Phil
> Haack
> *Sent:* Monday,03 December 03, 2007 21:27
> *To:* ironruby-core at rubyforge.org <mailto:ironruby-core at rubyforge.org>
> *Subject:* Re: [Ironruby-core] What replaces RubyEngine.CurrentEngine?
>
>
>
> Thanks Tomas! That got me much further. Now I get the following:
>
> Could not load file or assembly 'IronRuby, Version=1.0.0.0
> <http://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)
>
> Line 28: {
>
> Line 29: ScriptDomainManager manager = ScriptDomainManager.CurrentManager;
>
> Line 30: LanguageProvider ruby =
> manager.GetLanguageProvider("ruby");
>
> Line 31: ScriptEngine eng = ruby.GetEngine();
>
> Line 32: RubyEngine rubyEng = ((RubyEngine)eng);
>
>
> I assume that's because I compiled IronRuby and it's not strongly
> signed.
>
>
> Tomas Restrepo wrote:
>
> Hey Phil,
>
>
>
> The way I've been doing it has been:
>
>
>
> ScriptDomainManager manager = ScriptDomainManager.CurrentManager;
>
> LanguageProvider ruby =
>
> manager.GetLanguageProvider
> ("ruby");
>
> ScriptEngine eng = ruby.GetEngine();
>
> RubyEngine rubyEng = ((RubyEngine)eng);
>
>
>
> dunno if that will help you.
>
>
>
> On 12/3/07, Phil Haack
> <haacked at gmail.com> <mailto:haacked at gmail.com> wrote:
>
>
>
> Ha! I'm just preparing it in case I run out of time and need something
>
> else whiz-bang to demo. So if I don't get it working, oh well. I'll
>
>
> dance like a monkey for half an hour.
>
>
>
> I'm using the most recent build. I grabbed from trunk and compiled.
>
> Unless someone has a public interface, I'll cheat and use reflection to
>
>
> grab that. ;)
>
>
>
> Please help! Don't make me cheat. :)
>
>
>
> Phil
>
>
>
> Curt Hagenlocher wrote:
>
>
>
> On 12/3/07, Phil Haack <haacked at gmail.com> <mailto:haacked at gmail.com>
> wrote:
>
>
>
>
>
> Hi All, I'm updating some demos I did for ASP.NET <http://ASP.NET> MVC.
>
>
>
>
>
>
> Better get cracking; only seven hours until the demo! :P
>
>
>
> I don't know the correct answer, but if you were using the most recent
>
> public update of the source code you could still use
>
>
> RubyEngine.CurrentEngine -- you just have to work around the fact that
>
> it's declared "internal".
>
>
>
> --
>
> Curt Hagenlocher
>
>
> curt at hagenlocher.org <mailto:curt at hagenlocher.org>
>
> _______________________________________________
>
> Ironruby-core mailing list
>
>
> Ironruby-core at rubyforge.org <mailto:Ironruby-core at rubyforge.org>
>
> http://rubyforge.org/mailman/listinfo/ironruby-core
> <http://rubyforge.org/mailman/listinfo/ironruby-core>
>
>
>
>
>
> _______________________________________________
>
> Ironruby-core mailing list
>
> Ironruby-core at rubyforge.org
> <mailto:Ironruby-core at rubyforge.org>
>
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org <mailto:Ironruby-core at rubyforge.org>
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
>
>
>
> --
> Tomas Restrepo
> http://www.winterdom.com/weblog/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
More information about the Ironruby-core
mailing list