Hi All, I''m updating some demos I did for ASP.NET MVC. In particular my "ancient" IronRuby view template (rhtml) demo. You guys have been busy! ;) I wanted to update this wiki entry http://ironruby.rubyforge.org/wiki/wiki.pl?ExecutingIronRubyFromCSharp And I don''t know what recplaces the line: RubyEngine re = RubyEngine.CurrentEngine; Could someone point me in the right direction? Thanks! Phil Haack http://haacked.com/ p.s. Could we get a prominent link to this wiki from http://www.ironruby.net/? p.p.s http://ironruby.net/ doesn''t point to the same place as www.ironruby.net. Could someone fix the DNS? ;)
Curt Hagenlocher
2007-Dec-03 19:35 UTC
[Ironruby-core] What replaces RubyEngine.CurrentEngine?
On 12/3/07, Phil Haack <haacked at gmail.com> wrote:> Hi All, I''m updating some demos I did for 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
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> wrote: > >> Hi All, I''m updating some demos I did for 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 > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >
Tomas Restrepo
2007-Dec-03 20:07 UTC
[Ironruby-core] What replaces RubyEngine.CurrentEngine?
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> 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> wrote: > > > >> Hi All, I''m updating some demos I did for 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 > > _______________________________________________ > > 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 >-- Tomas Restrepo http://www.winterdom.com/weblog/
Thanks Tomas! That got me much further. Now I get the following: 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) || 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> 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> wrote: >>> >>> >>>> Hi All, I''m updating some demos I did for 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 >>> _______________________________________________ >>> 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/20071203/d5dc8121/attachment.html
Peter Bacon Darwin
2007-Dec-03 21:35 UTC
[Ironruby-core] What replaces RubyEngine.CurrentEngine?
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] On Behalf Of Phil Haack Sent: Monday,03 December 03, 2007 21:27 To: 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, 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 <mailto:haacked at gmail.com> <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 <mailto:haacked at gmail.com> <haacked at gmail.com> wrote: Hi All, I''m updating some demos I did for 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 _______________________________________________ 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/20071203/d986391c/attachment-0001.html
Tomas Restrepo
2007-Dec-03 21:41 UTC
[Ironruby-core] What replaces RubyEngine.CurrentEngine?
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> 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] *On Behalf Of *Phil Haack > *Sent:* Monday,03 December 03, 2007 21:27 > *To:* 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, > 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> <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> <haacked at gmail.com> wrote: > > > > > > Hi All, I''m updating some demos I did for 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 > > _______________________________________________ > > 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 > >-- Tomas Restrepo http://www.winterdom.com/weblog/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071203/923e45ad/attachment.html
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 >
John Lam (DLR)
2007-Dec-03 21:52 UTC
[Ironruby-core] What replaces RubyEngine.CurrentEngine?
Tomas Restrepo:> Yep, I think Peter''s right. The relevant piece of code seems to be in > Hosting\ScriptEnvironmentSetup.cs, line 139 in the DLR assembly.Yes - this is a problem with SIGNED leaking into the project files. I need to modify the Rakefile to scrub SIGNED from the generated .csproj files that y''all use. For the time being, just remove SIGNED from the .csproj files and you should be good to go. -John