From curth at microsoft.com Tue Jun 2 18:13:57 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 2 Jun 2009 15:13:57 -0700 Subject: [Ironruby-core] Code Review: VisibilityFixes1 In-Reply-To: References: Message-ID: Looks good. One small quibble: the comment in RubyModule.ForEachMember "visit the member even if it doesn't have the right visibility so that any overridden member with the right visibility won't later be visited" isn't quite right as the member isn't actually being visited; it's just marked that way in the dict. :) -----Original Message----- From: Tomas Matousek Sent: Tuesday, June 02, 2009 2:55 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: VisibilityFixes1 tfpt review "/shelveset:VisibilityFixes1;REDMOND\tomat" Fixes bugs: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1184: public(:foo) does not work correctly for mixed-in methods http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1060: visibility of send :define_method Title is required Factors super-forwarders into a separate SuperForwarderInfo <: RubyMemberInfo (it used to be just a flag on member info). The super-forwarder needs to remember the name of the method to forward to since that can change if it's aliased (see Visibility2C test case). Tomas From curth at microsoft.com Fri Jun 5 11:42:38 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 5 Jun 2009 08:42:38 -0700 Subject: [Ironruby-core] Code Review: LazyMethods In-Reply-To: References: Message-ID: Looks good overall. Should RubyContext.CallSiteCreated be ThreadLocal? If not, its use by CallSiteTracer looks not-entirely-safe. The variable name "parantScope" in RubyOps.CreateMethodScope is typoed. -----Original Message----- From: Tomas Matousek Sent: Thursday, June 04, 2009 3:32 PM To: IronRuby External Code Reviewers; Rowan Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: LazyMethods tfpt review "/shelveset:LazyMethods;REDMOND\tomat" A simple change in DLR. Ruby: Implements lazy method transformation. Previously a method was transformed to DLR AST as soon as it was defined (def foo; ...; end). We can postpone the transformation until the method is called for the first time. This significantly improves startup time. For example (not NGEN'd): require 'benchmark' Benchmark.bm { |x| x.report { require 'rubygems' } } user system total real eager transformation 1.622410 0.031200 1.653611 ( 1.581316) lazy transformation 1.170008 0.031200 1.201208 ( 1.099220) Although Ruby methods (unlike block) don't close over variables we still need 2 closure variables: the parent lexical runtime scope and the module that the method is declared in (for implementation of super). These were previously DLR closure variables. They are live constants now. Ruby method pre-compilation would require additional work, so we don't support it for now. Tomas From Tomas.Matousek at microsoft.com Fri Jun 5 13:52:57 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 5 Jun 2009 10:52:57 -0700 Subject: [Ironruby-core] Code Review: LazyMethods In-Reply-To: References: Message-ID: Good catch on thread-safety. This delegate is actually experimental (demo-ware :)) so it doesn't matter so much. I'll add a comment that thread-safety needs to be considered. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Friday, June 05, 2009 8:43 AM To: Tomas Matousek; IronRuby External Code Reviewers; Rowan Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: LazyMethods Looks good overall. Should RubyContext.CallSiteCreated be ThreadLocal? If not, its use by CallSiteTracer looks not-entirely-safe. The variable name "parantScope" in RubyOps.CreateMethodScope is typoed. -----Original Message----- From: Tomas Matousek Sent: Thursday, June 04, 2009 3:32 PM To: IronRuby External Code Reviewers; Rowan Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: LazyMethods tfpt review "/shelveset:LazyMethods;REDMOND\tomat" A simple change in DLR. Ruby: Implements lazy method transformation. Previously a method was transformed to DLR AST as soon as it was defined (def foo; ...; end). We can postpone the transformation until the method is called for the first time. This significantly improves startup time. For example (not NGEN'd): require 'benchmark' Benchmark.bm { |x| x.report { require 'rubygems' } } user system total real eager transformation 1.622410 0.031200 1.653611 ( 1.581316) lazy transformation 1.170008 0.031200 1.201208 ( 1.099220) Although Ruby methods (unlike block) don't close over variables we still need 2 closure variables: the parent lexical runtime scope and the module that the method is declared in (for implementation of super). These were previously DLR closure variables. They are live constants now. Ruby method pre-compilation would require additional work, so we don't support it for now. Tomas From sanxiyn at gmail.com Fri Jun 5 22:24:16 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Sat, 6 Jun 2009 11:24:16 +0900 Subject: [Ironruby-core] Can't get ironruby to work correctly. In-Reply-To: References: Message-ID: <5b0248170906051924v1e817e75ra0199239ec05ebe4@mail.gmail.com> 2009/6/6 Jim Deville : > I believe there is even an open bug for it. Please vote for it on CodePlex FYI: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=468 -- Seo Sanghyeon From lists at ruby-forum.com Sat Jun 6 02:59:07 2009 From: lists at ruby-forum.com (Aaron Clauson) Date: Sat, 6 Jun 2009 08:59:07 +0200 Subject: [Ironruby-core] How can I cancel a running script Message-ID: Hi, I have an IronRuby script running that I'd like to be able to cancel from outside the script. Is there any way to do that? ScriptEngine scriptEngine = Ruby.CreateEngine(); ScriptScope scriptScope = scriptEngine.CreateScope(); string script = "print \"1\n\"\n" + "print \"2\n\"\n" + "sleep(10)\n" + "print \"3\n\"\n"; ThreadPool.QueueUserWorkItem(delegate { scriptEngine.Execute(script, scriptScope); }); In the above example how could I cancel the script to stop it getting to 3 without having to resort to aborting the thread it is running on? Regards, Aaron -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Jun 6 04:33:58 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Sat, 6 Jun 2009 10:33:58 +0200 Subject: [Ironruby-core] Net/http post_form problem Message-ID: <74fe6dc32183a8cd5f990d6a5ffa1c06@ruby-forum.com> Hi, I'm trying to execute the next code: require 'net/http' require 'uri' puts "starting..." url = URI.parse('http://localhost/test3/demo.aspx') puts "retrieving..." res = Net::HTTP.post_form(url, {"FullName" => "Shay Friedman"}) puts "writing" File.open("test.txt","w") { |file| file.print res.body } It uses the net/http library to send a post request to the given web site. The problem is that it gets a timeout every single time on the post_form method. I have tried to put a breakpoint on the Page_Load event of the demo.aspx code and the breakpoint is never hit! I tried this code sample using MRI and it worked great... Is it a bug? Thanks, Shay ------------- http://www.ironshay.com The error I receive after waiting for quite a long time: -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Sat Jun 6 09:23:47 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sat, 6 Jun 2009 15:23:47 +0200 Subject: [Ironruby-core] something has changed Message-ID: Hi Since this weeks updates to ironruby ironrubymvc is completely broken. The way overloads are selected now is different. for example asp.net mvc has a bunch of methods defined on Controller that are protected internal ie. protected internal void View(string, string) it also has an overload View(string, object) Then it selects the one with object for example in some cases also I used to be able to call that view method in a ruby subclass of Controller with view nil, 'layout' but now I have to call that with with view '','layout' for it to work for example. It doesn't know that nil can also count as a string object. There are a bunch of other things that are breaking for example it doesn't like protected internals as much as it used to anymore either. codeplex? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From will at hotgazpacho.org Sat Jun 6 10:52:40 2009 From: will at hotgazpacho.org (Will Green) Date: Sat, 6 Jun 2009 10:52:40 -0400 Subject: [Ironruby-core] something has changed In-Reply-To: References: Message-ID: <398d3e0e0906060752g6ff270e6q2a6816042b5f433f@mail.gmail.com> Just curious, but why should nil count as a string object? In C Ruby, nil is an object, and an empty string object is not nil: irb(main):001:0> n = nil => nil irb(main):002:0> s = String.new => "" irb(main):003:0> n.nil? => true irb(main):004:0> s.nil? => false irb(main):005:0> s == n => false irb(main):006:0> n.class => NilClass irb(main):007:0> s.class => String irb(main):008:0> s.eql? n => false -- Will Green http://willgreen.mp/ On Sat, Jun 6, 2009 at 9:23 AM, Ivan Porto Carrero wrote: > Hi > Since this weeks updates to ironruby ironrubymvc is completely broken. > > The way overloads are selected now is different. > > for example asp.net mvc has a bunch of methods defined on Controller that > are protected internal ie. protected internal void View(string, string) > it also has an overload View(string, object) > > Then it selects the one with object for example in some cases > > also I used to be able to call that view method in a ruby subclass of > Controller with view nil, 'layout' > > but now I have to call that with with view '','layout' for it to work for > example. It doesn't know that nil can also count as a string object. > > There are a bunch of other things that are breaking for example it doesn't > like protected internals as much as it used to anymore either. > > codeplex? > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Sat Jun 6 11:05:10 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sat, 6 Jun 2009 17:05:10 +0200 Subject: [Ironruby-core] something has changed In-Reply-To: <398d3e0e0906060752g6ff270e6q2a6816042b5f433f@mail.gmail.com> References: <398d3e0e0906060752g6ff270e6q2a6816042b5f433f@mail.gmail.com> Message-ID: In C# you can pass null to a string parameter and it won't complain I expected this to work from ironruby too because it did before. So I want to find out if that is going to be a permanent change or if it is a bug :) so i'm not talking about an empty instance of String being nil but it's about interop with CLR stuff --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Jun 6, 2009 at 4:52 PM, Will Green wrote: > Just curious, but why should nil count as a string object? In C Ruby, nil > is an object, and an empty string object is not nil: > > irb(main):001:0> n = nil > => nil > irb(main):002:0> s = String.new > => "" > irb(main):003:0> n.nil? > => true > irb(main):004:0> s.nil? > => false > irb(main):005:0> s == n > => false > irb(main):006:0> n.class > => NilClass > irb(main):007:0> s.class > => String > irb(main):008:0> s.eql? n > => false > > -- > Will Green > http://willgreen.mp/ > > > On Sat, Jun 6, 2009 at 9:23 AM, Ivan Porto Carrero wrote: > >> Hi >> Since this weeks updates to ironruby ironrubymvc is completely broken. >> >> The way overloads are selected now is different. >> >> for example asp.net mvc has a bunch of methods defined on Controller that >> are protected internal ie. protected internal void View(string, string) >> it also has an overload View(string, object) >> >> Then it selects the one with object for example in some cases >> >> also I used to be able to call that view method in a ruby subclass of >> Controller with view nil, 'layout' >> >> but now I have to call that with with view '','layout' for it to work for >> example. It doesn't know that nil can also count as a string object. >> >> There are a bunch of other things that are breaking for example it doesn't >> like protected internals as much as it used to anymore either. >> >> codeplex? >> >> --- >> Met vriendelijke groeten - Best regards - Salutations >> Ivan Porto Carrero >> Blog: http://flanders.co.nz >> Twitter: http://twitter.com/casualjim >> Author of IronRuby in Action (http://manning.com/carrero) >> >> >> _______________________________________________ >> 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: From curth at microsoft.com Sat Jun 6 11:15:36 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Sat, 6 Jun 2009 08:15:36 -0700 Subject: [Ironruby-core] something has changed In-Reply-To: References: <398d3e0e0906060752g6ff270e6q2a6816042b5f433f@mail.gmail.com> Message-ID: It would be good to be more specific about the example. Consider class Foo { public void Bar(int, object); public void Bar(int, string); } If I call "Foo.new.Bar 1, nil", then this is an ambiguous call and you should be forced to specify which overload you want. In statically-typed languages, variables have types and the declared type of the variable is used to select an overload at compile time. This obviously doesn't work for a dynamically-typed language calling into a statically-typed API, so we have to use the runtime types to select the overload. C# dynamic calls face the same issue. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Saturday, June 06, 2009 8:05 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] something has changed In C# you can pass null to a string parameter and it won't complain I expected this to work from ironruby too because it did before. So I want to find out if that is going to be a permanent change or if it is a bug :) so i'm not talking about an empty instance of String being nil but it's about interop with CLR stuff --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Jun 6, 2009 at 4:52 PM, Will Green > wrote: Just curious, but why should nil count as a string object? In C Ruby, nil is an object, and an empty string object is not nil: irb(main):001:0> n = nil => nil irb(main):002:0> s = String.new => "" irb(main):003:0> n.nil? => true irb(main):004:0> s.nil? => false irb(main):005:0> s == n => false irb(main):006:0> n.class => NilClass irb(main):007:0> s.class => String irb(main):008:0> s.eql? n => false -- Will Green http://willgreen.mp/ On Sat, Jun 6, 2009 at 9:23 AM, Ivan Porto Carrero > wrote: Hi Since this weeks updates to ironruby ironrubymvc is completely broken. The way overloads are selected now is different. for example asp.net mvc has a bunch of methods defined on Controller that are protected internal ie. protected internal void View(string, string) it also has an overload View(string, object) Then it selects the one with object for example in some cases also I used to be able to call that view method in a ruby subclass of Controller with view nil, 'layout' but now I have to call that with with view '','layout' for it to work for example. It doesn't know that nil can also count as a string object. There are a bunch of other things that are breaking for example it doesn't like protected internals as much as it used to anymore either. codeplex? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) _______________________________________________ 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: From jdeville at microsoft.com Sat Jun 6 11:42:13 2009 From: jdeville at microsoft.com (Jim Deville) Date: Sat, 6 Jun 2009 15:42:13 +0000 Subject: [Ironruby-core] Net/http post_form problem In-Reply-To: <74fe6dc32183a8cd5f990d6a5ffa1c06@ruby-forum.com> References: <74fe6dc32183a8cd5f990d6a5ffa1c06@ruby-forum.com> Message-ID: It wouldn't surprise me if there is a bug. If you look at the Mspec tags, you'll see that a lot of the net/http library is critical (meaning it hangs or crashes the interpreter). Feel free to file a bug, or take a look to start cleaning it up (if the SOAP stuff isn't already keeping you busy ;)) JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Shay Friedman > Sent: Saturday, June 06, 2009 1:34 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Net/http post_form problem > > Hi, > > I'm trying to execute the next code: > require 'net/http' > require 'uri' > > puts "starting..." > url = URI.parse('http://localhost/test3/demo.aspx') > > puts "retrieving..." > res = Net::HTTP.post_form(url, > {"FullName" => "Shay Friedman"}) > > puts "writing" > File.open("test.txt","w") { |file| file.print res.body } > > It uses the net/http library to send a post request to the given web site. The > problem is that it gets a timeout every single time on the post_form method. > > I have tried to put a breakpoint on the Page_Load event of the demo.aspx > code and the breakpoint is never hit! > I tried this code sample using MRI and it worked great... > > Is it a bug? > > Thanks, > Shay > ------------- > http://www.ironshay.com > > > The error I receive after waiting for quite a long time: > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From ivan at flanders.co.nz Sat Jun 6 11:56:58 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sat, 6 Jun 2009 17:56:58 +0200 Subject: [Ironruby-core] something has changed In-Reply-To: References: <398d3e0e0906060752g6ff270e6q2a6816042b5f433f@mail.gmail.com> Message-ID: So the signatures I'm talking about look like this: protected internal void UpdateModel(TModel model) where TModel : class { UpdateModel(model, null, null, null, ValueProvider); } protected internal void UpdateModel(TModel model, string prefix) where TModel : class { UpdateModel(model, prefix, null, null, ValueProvider); } protected internal void UpdateModel(TModel model, string[] includeProperties) where TModel : class { UpdateModel(model, null, includeProperties, null, ValueProvider); } protected internal void UpdateModel(TModel model, string prefix, string[] includeProperties) where TModel : class { UpdateModel(model, prefix, includeProperties, null, ValueProvider); } protected internal void UpdateModel(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) where TModel : class { UpdateModel(model, prefix, includeProperties, excludeProperties, ValueProvider); } protected internal void UpdateModel(TModel model, IDictionary valueProvider) where TModel : class { UpdateModel(model, null, null, null, valueProvider); } protected internal void UpdateModel(TModel model, string prefix, IDictionary valueProvider) where TModel : class { UpdateModel(model, prefix, null, null, valueProvider); } protected internal void UpdateModel(TModel model, string[] includeProperties, IDictionary valueProvider) where TModel : class { UpdateModel(model, null, includeProperties, null, valueProvider); } protected internal void UpdateModel(TModel model, string prefix, string[] includeProperties, IDictionary valueProvider) where TModel : class { UpdateModel(model, prefix, includeProperties, null, valueProvider); } protected internal void UpdateModel(TModel model, string prefix, string[] includeProperties, string[] excludeProperties, IDictionary valueProvider) where TModel : class { bool success = TryUpdateModel(model, prefix, includeProperties, excludeProperties, valueProvider); if (!success) { string message = String.Format(CultureInfo.CurrentUICulture, MvcResources.Controller_UpdateModel_UpdateUnsuccessful, typeof(TModel).FullName); throw new InvalidOperationException(message); } } The methods above are defined in ASP.NET MVC but with the current git build I can't call these methods in an inheriting ruby class it will give me an error. when I work around it with: public new virtual void UpdateModel(TModel model) where TModel : class { UpdateModel(model, null, null, null, ValueProvider); } public new virtual void UpdateModel(TModel model, string prefix) where TModel : class { UpdateModel(model, prefix, null, null, ValueProvider); } public new virtual void UpdateModel(TModel model, string[] includeProperties) where TModel : class { UpdateModel(model, null, includeProperties, null, ValueProvider); } public new virtual void UpdateModel(TModel model, string prefix, string[] includeProperties) where TModel : class { UpdateModel(model, prefix, includeProperties, null, ValueProvider); } public new virtual void UpdateModel(TModel model, string prefix, string[] includeProperties, string[] excludeProperties) where TModel : class { UpdateModel(model, prefix, includeProperties, excludeProperties, ValueProvider); } public new virtual void UpdateModel(TModel model, IDictionary valueProvider) where TModel : class { UpdateModel(model, null, null, null, valueProvider); } public new virtual void UpdateModel(TModel model, string prefix, IDictionary valueProvider) where TModel : class { UpdateModel(model, prefix, null, null, valueProvider); } public new virtual void UpdateModel(TModel model, string[] includeProperties, IDictionary valueProvider) where TModel : class { UpdateModel(model, null, includeProperties, null, valueProvider); } public new virtual void UpdateModel(TModel model, string prefix, string[] includeProperties, IDictionary valueProvider) where TModel : class { UpdateModel(model, prefix, includeProperties, null, valueProvider); } public new virtual void UpdateModel(TModel model, string prefix, string[] includeProperties, string[] excludeProperties, IDictionary valueProvider) where TModel : class { base.UpdateModel(model, prefix, includeProperties,excludeProperties,valueProvider); } things work again in the inheriting controller def save_user(act) *self.method(:update_model).of(User).call(@user, "user")* if @user.is_valid @membership_service.save @user redirect_to_action('index', 'users') else view act.to_s, :layout end end --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Jun 6, 2009 at 5:15 PM, Curt Hagenlocher wrote: > It would be good to be more specific about the example. > > > > Consider class Foo { > > public void Bar(int, object); > > public void Bar(int, string); > > } > > > > If I call "Foo.new.Bar 1, nil", then this is an ambiguous call and you > should be forced to specify which overload you want. > > > > In statically-typed languages, variables have types and the declared type > of the variable is used to select an overload at compile time. This > obviously doesn't work for a dynamically-typed language calling into a > statically-typed API, so we have to use the runtime types to select the > overload. C# dynamic calls face the same issue. > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Saturday, June 06, 2009 8:05 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] something has changed > > > > In C# you can pass null to a string parameter and it won't complain I > expected this to work from ironruby too because it did before. So I want to > find out if that is going to be a permanent change or if it is a bug :) > > so i'm not talking about an empty instance of String being nil but it's > about interop with CLR stuff > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > On Sat, Jun 6, 2009 at 4:52 PM, Will Green wrote: > > Just curious, but why should nil count as a string object? In C Ruby, nil > is an object, and an empty string object is not nil: > > > > irb(main):001:0> n = nil > > => nil > > irb(main):002:0> s = String.new > > => "" > > irb(main):003:0> n.nil? > > => true > > irb(main):004:0> s.nil? > > => false > > irb(main):005:0> s == n > > => false > > irb(main):006:0> n.class > > => NilClass > > irb(main):007:0> s.class > > => String > > irb(main):008:0> s.eql? n > > => false > > > > -- > Will Green > http://willgreen.mp/ > > On Sat, Jun 6, 2009 at 9:23 AM, Ivan Porto Carrero > wrote: > > Hi > > > > Since this weeks updates to ironruby ironrubymvc is completely broken. > > > > The way overloads are selected now is different. > > > > for example asp.net mvc has a bunch of methods defined on Controller that > are protected internal ie. protected internal void View(string, string) > > it also has an overload View(string, object) > > > > Then it selects the one with object for example in some cases > > > > also I used to be able to call that view method in a ruby subclass of > Controller with view nil, 'layout' > > > > but now I have to call that with with view '','layout' for it to work for > example. It doesn't know that nil can also count as a string object. > > > > There are a bunch of other things that are breaking for example it doesn't > like protected internals as much as it used to anymore either. > > > > codeplex? > > > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > _______________________________________________ > 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: From Tomas.Matousek at microsoft.com Sat Jun 6 13:17:39 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 6 Jun 2009 10:17:39 -0700 Subject: [Ironruby-core] How can I cancel a running script In-Reply-To: References: Message-ID: The script itself might check some (global) variable time to time and if it is "on" terminate itself. For example, use Kernel#select with a timeout instead of sleep. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Aaron Clauson Sent: Friday, June 05, 2009 11:59 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] How can I cancel a running script Hi, I have an IronRuby script running that I'd like to be able to cancel from outside the script. Is there any way to do that? ScriptEngine scriptEngine = Ruby.CreateEngine(); ScriptScope scriptScope = scriptEngine.CreateScope(); string script = "print \"1\n\"\n" + "print \"2\n\"\n" + "sleep(10)\n" + "print \"3\n\"\n"; ThreadPool.QueueUserWorkItem(delegate { scriptEngine.Execute(script, scriptScope); }); In the above example how could I cancel the script to stop it getting to 3 without having to resort to aborting the thread it is running on? Regards, Aaron -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From curth at microsoft.com Sat Jun 6 17:04:57 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Sat, 6 Jun 2009 14:04:57 -0700 Subject: [Ironruby-core] Code Review: ProGenFix In-Reply-To: References: Message-ID: Changes look good overall. I'm not sure that Type.IsProtected() is an intuitive name; maybe Type.IsNested() would be clearer? -----Original Message----- From: Tomas Matousek Sent: Saturday, June 06, 2009 12:51 PM To: IronRuby External Code Reviewers; Rowan Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: ProGenFix tfpt review "/shelveset:ProGenFix;REDMOND\tomat" DLR, Python, Ruby. Fixes Ruby calls to protected generic methods. Adds CompilerHelpers.IsProtected() as an alias for IsFamily || IsFamilyOrAssembly. Tomas From Tomas.Matousek at microsoft.com Sat Jun 6 18:56:45 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 6 Jun 2009 15:56:45 -0700 Subject: [Ironruby-core] Code Review: ProGenFix In-Reply-To: References: Message-ID: You mean IsNestedProteced()? "Nested" feels superfluous since only nested types could be protected. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Saturday, June 06, 2009 2:05 PM To: Tomas Matousek; IronRuby External Code Reviewers; Rowan Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: ProGenFix Changes look good overall. I'm not sure that Type.IsProtected() is an intuitive name; maybe Type.IsNested() would be clearer? -----Original Message----- From: Tomas Matousek Sent: Saturday, June 06, 2009 12:51 PM To: IronRuby External Code Reviewers; Rowan Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: ProGenFix tfpt review "/shelveset:ProGenFix;REDMOND\tomat" DLR, Python, Ruby. Fixes Ruby calls to protected generic methods. Adds CompilerHelpers.IsProtected() as an alias for IsFamily || IsFamilyOrAssembly. Tomas From curth at microsoft.com Sat Jun 6 19:25:39 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Sat, 6 Jun 2009 16:25:39 -0700 Subject: [Ironruby-core] Code Review: ProGenFix In-Reply-To: References: Message-ID: Ah, I see. Still, something strikes me as odd about the name, but I don't feel strongly about it. -----Original Message----- From: Tomas Matousek Sent: Saturday, June 06, 2009 3:57 PM To: Curt Hagenlocher; IronRuby External Code Reviewers; Rowan Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: ProGenFix You mean IsNestedProteced()? "Nested" feels superfluous since only nested types could be protected. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Saturday, June 06, 2009 2:05 PM To: Tomas Matousek; IronRuby External Code Reviewers; Rowan Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: ProGenFix Changes look good overall. I'm not sure that Type.IsProtected() is an intuitive name; maybe Type.IsNested() would be clearer? -----Original Message----- From: Tomas Matousek Sent: Saturday, June 06, 2009 12:51 PM To: IronRuby External Code Reviewers; Rowan Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: ProGenFix tfpt review "/shelveset:ProGenFix;REDMOND\tomat" DLR, Python, Ruby. Fixes Ruby calls to protected generic methods. Adds CompilerHelpers.IsProtected() as an alias for IsFamily || IsFamilyOrAssembly. Tomas From lists at ruby-forum.com Sun Jun 7 12:45:21 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Sun, 7 Jun 2009 18:45:21 +0200 Subject: [Ironruby-core] Basic interoperability question Message-ID: Hi, I would like to know why interoperability is such a long word? just kidding! I'm playing with the CLR interoperability and I have some questions: 1. Is "require 'mscorlib'" really essential? 2. Should investigating Clr objects work? For example, this is what happens now: >>> System::Data::DataSet.instance_methods - Class.methods => [] Only after I create a dataset object and access, for instance, the tables property, the "tables" method is added to the instance_methods list. Many thanks! Shay. ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Sun Jun 7 14:49:09 2009 From: jdeville at microsoft.com (Jim Deville) Date: Sun, 7 Jun 2009 18:49:09 +0000 Subject: [Ironruby-core] Basic interoperability question Message-ID: Require 'mscorlib' is not as essential anymore. If you run ir -e "puts System::String.class" it will wolrk just fine. I still use require 'mscorlib' in my scripts tlo signal to other programmers that this scrpt will use .NET interop, but I don't think it is needed. I'll let Tomas answer the second part, and clarify my answer if needed. JD ....there is no try Sent from my phone. Please excuse typos and txtspk. -----Original Message----- From: Shay Friedman Sent: June 07, 2009 9:45 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Basic interoperability question Hi, I would like to know why interoperability is such a long word? just kidding! I'm playing with the CLR interoperability and I have some questions: 1. Is "require 'mscorlib'" really essential? 2. Should investigating Clr objects work? For example, this is what happens now: >>> System::Data::DataSet.instance_methods - Class.methods => [] Only after I create a dataset object and access, for instance, the tables property, the "tables" method is added to the instance_methods list. Many thanks! Shay. ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Sun Jun 7 19:03:43 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sun, 7 Jun 2009 16:03:43 -0700 Subject: [Ironruby-core] Basic interoperability question In-Reply-To: References: Message-ID: As for #2: it doesn't work yet. instance_methods currently only includes Ruby methods and methods that were already called (are cached) but it should indeed include names of all instance CLR members. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Sunday, June 07, 2009 11:49 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Basic interoperability question Require 'mscorlib' is not as essential anymore. If you run ir -e "puts System::String.class" it will wolrk just fine. I still use require 'mscorlib' in my scripts tlo signal to other programmers that this scrpt will use .NET interop, but I don't think it is needed. I'll let Tomas answer the second part, and clarify my answer if needed. JD ....there is no try Sent from my phone. Please excuse typos and txtspk. -----Original Message----- From: Shay Friedman Sent: June 07, 2009 9:45 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Basic interoperability question Hi, I would like to know why interoperability is such a long word? just kidding! I'm playing with the CLR interoperability and I have some questions: 1. Is "require 'mscorlib'" really essential? 2. Should investigating Clr objects work? For example, this is what happens now: >>> System::Data::DataSet.instance_methods - Class.methods => [] Only after I create a dataset object and access, for instance, the tables property, the "tables" method is added to the instance_methods list. Many thanks! Shay. ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. _______________________________________________ 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 From curth at microsoft.com Sun Jun 7 23:52:39 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Sun, 7 Jun 2009 20:52:39 -0700 Subject: [Ironruby-core] Code Review: NewSingletons3 In-Reply-To: References: Message-ID: Looks good. -----Original Message----- From: Tomas Matousek Sent: Saturday, June 06, 2009 9:14 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: NewSingletons3 tfpt review "/shelveset:NewSingletons3;REDMOND\tomat" Initial work to improve singletons. * Improves reflection cache generator - it searches IronRuby.dll for all types marked by [ReflectionCache] attribute and generates ref-cache entries for all their methods and properties marked with [Emitted] attribute. * Merges RubyModule.Subclass into RubyModule, i.e. RubyModule now implements IRubyObject. * IRubyObjects now hold on their immediate class (not nominal class) and that reference might change once from a non-singleton to a singleton class. This change allows IRubyObject singletons (including modules and classes when used in static method calls) to have the same rules as non-singleton objects. The rule no longer needs to hold on such objects. * Implements module freezing: methods, constants, instance and class variables, mixins cannot be modified on a frozen module. Besides, if an object is frozen its singleton class is (recursively) frozen as well. * Fixes object freezing: instance variables cannot be modified on a frozen object (we allowed it). Tomas From Tomas.Matousek at microsoft.com Mon Jun 8 01:24:42 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sun, 7 Jun 2009 22:24:42 -0700 Subject: [Ironruby-core] Net/http post_form problem In-Reply-To: <74fe6dc32183a8cd5f990d6a5ffa1c06@ruby-forum.com> References: <74fe6dc32183a8cd5f990d6a5ffa1c06@ruby-forum.com> Message-ID: It might be related to the spec that is failing: library\net\http\http\post_form_spec.rb critical:Net::HTTP.post_form when passed URI POSTs the passed form data to the given uri I've filed a bug: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1529 Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Saturday, June 06, 2009 1:34 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Net/http post_form problem Hi, I'm trying to execute the next code: require 'net/http' require 'uri' puts "starting..." url = URI.parse('http://localhost/test3/demo.aspx') puts "retrieving..." res = Net::HTTP.post_form(url, {"FullName" => "Shay Friedman"}) puts "writing" File.open("test.txt","w") { |file| file.print res.body } It uses the net/http library to send a post request to the given web site. The problem is that it gets a timeout every single time on the post_form method. I have tried to put a breakpoint on the Page_Load event of the demo.aspx code and the breakpoint is never hit! I tried this code sample using MRI and it worked great... Is it a bug? Thanks, Shay ------------- http://www.ironshay.com The error I receive after waiting for quite a long time: -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From ivan at flanders.co.nz Mon Jun 8 09:04:24 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Mon, 8 Jun 2009 15:04:24 +0200 Subject: [Ironruby-core] IronRuby MVC sample Message-ID: Hi I've built a small sample app over the weekend that uses IronRuby MVC. I tested it running on cassini/webdev server and IIS in both cases it works fine. The SQLite dll included in the dependencies is a 64-bit dll if your system is 32-bit you'll have to change that dll otherwise dataaccess won't work. You can find the really original tasklist application in my account on github: http://github.com/casualjim/ironrubymvc-sample I'll blog about it later. I tried to use ironrubymvc on mono but that was a no go. Mono takes issue with the ExtensionAttribute being defined twice. I've asked for a workaround on the mono-devel list. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Mon Jun 8 12:27:10 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Mon, 8 Jun 2009 18:27:10 +0200 Subject: [Ironruby-core] .Net<->IR Object Mapping Message-ID: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> Hi, Is there a table somewhere defining how .Net objects are mapped to Ruby objects? Thanks, Shay ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Mon Jun 8 12:34:59 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Mon, 8 Jun 2009 18:34:59 +0200 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> Message-ID: http://ironruby.net/Documentation/.NET/Names http://ironruby.net/Documentation/.NET --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Mon, Jun 8, 2009 at 6:27 PM, Shay Friedman wrote: > Hi, > > Is there a table somewhere defining how .Net objects are mapped to Ruby > objects? > > Thanks, > Shay > > ---------------------------- > http://www.ironshay.com > Follow me: http://twitter.com/ironshay > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Mon Jun 8 12:51:58 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Mon, 8 Jun 2009 18:51:58 +0200 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> Message-ID: I meant more like namespaces turn to modules, interfaces to modules, enums to...? constants to...? I'll check it out now and write the results here. Thanks for the reply! Shay. ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Mon Jun 8 13:07:38 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 8 Jun 2009 17:07:38 +0000 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> Message-ID: http://ironruby.net/Documentation/.NET/QA_Plan There is a table there that covers most of these. Let me know if you need something that isn't listed. JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Shay Friedman > Sent: Monday, June 08, 2009 9:52 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] .Net<->IR Object Mapping > > I meant more like namespaces turn to modules, interfaces to modules, > enums to...? constants to...? > > I'll check it out now and write the results here. > > Thanks for the reply! > Shay. > > ---------------------------- > http://www.ironshay.com > Follow me: http://twitter.com/ironshay > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Mon Jun 8 13:57:11 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Mon, 8 Jun 2009 19:57:11 +0200 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> Message-ID: The list on this page is great but it is not complete. Here is what I came up with. Correct me if I'm mistaken: .Net Object Ruby Object ------------------------------------------------------ Namespace Module Interface Module Class Class Enum Class Enum constant Class method Constant Class method Static method Class method Property Getter and setter methods Public method Instance method Protected method Instance method Private method Isn't mapped at all Delegate Class I have to say that the delegate mapping is awesome!!! I can't say why, but using it with a code block is much more fun than writing anonymous methods or lambda expressions in C# :) Thanks, Shay. ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Mon Jun 8 14:13:58 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 8 Jun 2009 18:13:58 +0000 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> Message-ID: Private method will map to a instance method, but only with -X:PrivateBindings. Otherwise that looks great. Could I talk you into updating the table and adding specs to Merlin\Main\Languages\Ruby\Tests\Interop\net? Even just adding them to uncategorized_spec.rb will work, I'll move them around. Thanks, JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Shay Friedman > Sent: Monday, June 08, 2009 10:57 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] .Net<->IR Object Mapping > > The list on this page is great but it is not complete. > > Here is what I came up with. Correct me if I'm mistaken: > > .Net Object Ruby Object > ------------------------------------------------------ > Namespace Module > Interface Module > Class Class > Enum Class > Enum constant Class method > Constant Class method > Static method Class method > Property Getter and setter methods > Public method Instance method > Protected method Instance method > Private method Isn't mapped at all > Delegate Class > > I have to say that the delegate mapping is awesome!!! > I can't say why, but using it with a code block is much more fun than writing > anonymous methods or lambda expressions in C# :) > > Thanks, > Shay. > > ---------------------------- > http://www.ironshay.com > Follow me: http://twitter.com/ironshay > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Mon Jun 8 14:18:32 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Mon, 8 Jun 2009 20:18:32 +0200 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> Message-ID: <903f202085dd1b97b4572b129eee7fb3@ruby-forum.com> Sure. Just give me a few days. I'll let you know when it's done. Shay. ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Mon Jun 8 14:28:06 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 8 Jun 2009 18:28:06 +0000 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: <903f202085dd1b97b4572b129eee7fb3@ruby-forum.com> References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <903f202085dd1b97b4572b129eee7fb3@ruby-forum.com> Message-ID: Thanks! JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Shay Friedman > Sent: Monday, June 08, 2009 11:19 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] .Net<->IR Object Mapping > > Sure. Just give me a few days. > > I'll let you know when it's done. > > Shay. > ---------------------------- > http://www.ironshay.com > Follow me: http://twitter.com/ironshay > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Shri.Borde at microsoft.com Mon Jun 8 14:46:45 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Mon, 8 Jun 2009 11:46:45 -0700 Subject: [Ironruby-core] Cucumber status In-Reply-To: References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <903f202085dd1b97b4572b129eee7fb3@ruby-forum.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E207FEF11@NA-EXMSG-C104.redmond.corp.microsoft.com> With a build from the latest sources, the Cucumber C# example from http://wiki.github.com/aslakhellesoy/cucumber/ironruby-and-net is working. Also, only two of the Cucumber tests fail. One seems to be a test issue, and the other is because of http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=22984. Please try out Cucumber and let us know what your experience is. One usability issue is that Cucumber uses the win32console gem to color-code the results it prints to the console, so that failures are in red, etc. However, the win32console is a native gem and does not work with IronRuby, and so you do not get colored output. It should be quite easy to implement the win32console library in pure Ruby code (but marked with platform="ironruby" as mentioned at http://ironruby.net/Documentation/Real_Ruby_Applications/RubyGems) using the System.Console functionality. Anyone interested in doing this? Shri From sanxiyn at gmail.com Mon Jun 8 20:50:10 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Tue, 9 Jun 2009 09:50:10 +0900 Subject: [Ironruby-core] Cucumber status In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E207FEF11@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <903f202085dd1b97b4572b129eee7fb3@ruby-forum.com> <710DF26F214D2B4BB94287123FFE980A2E207FEF11@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <5b0248170906081750y5a9d9f44q9668a01e30c077cf@mail.gmail.com> 2009/6/9 Shri Borde : > With a build from the latest sources, the Cucumber C# example from http://wiki.github.com/aslakhellesoy/cucumber/ironruby-and-net is working. Also, only two of the Cucumber tests fail. One seems to be a test issue, and the other is because of http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=22984. Please try out Cucumber and let us know what your experience is. Why is the issue filed on Iron*Python*? -- Seo Sanghyeon From Tomas.Matousek at microsoft.com Mon Jun 8 20:59:21 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 8 Jun 2009 17:59:21 -0700 Subject: [Ironruby-core] Cucumber status In-Reply-To: <5b0248170906081750y5a9d9f44q9668a01e30c077cf@mail.gmail.com> References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <903f202085dd1b97b4572b129eee7fb3@ruby-forum.com> <710DF26F214D2B4BB94287123FFE980A2E207FEF11@NA-EXMSG-C104.redmond.corp.microsoft.com> <5b0248170906081750y5a9d9f44q9668a01e30c077cf@mail.gmail.com> Message-ID: That's called dynamic language interop - Dino's fixing bugs in IronRuby :)) I've filled it under IronRuby: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1535 Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Seo Sanghyeon Sent: Monday, June 08, 2009 5:50 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber status 2009/6/9 Shri Borde : > With a build from the latest sources, the Cucumber C# example from http://wiki.github.com/aslakhellesoy/cucumber/ironruby-and-net is working. Also, only two of the Cucumber tests fail. One seems to be a test issue, and the other is because of http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=22984. Please try out Cucumber and let us know what your experience is. Why is the issue filed on Iron*Python*? -- Seo Sanghyeon _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Shri.Borde at microsoft.com Tue Jun 9 01:59:14 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Mon, 8 Jun 2009 22:59:14 -0700 Subject: [Ironruby-core] Cucumber status In-Reply-To: References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <903f202085dd1b97b4572b129eee7fb3@ruby-forum.com> <710DF26F214D2B4BB94287123FFE980A2E207FEF11@NA-EXMSG-C104.redmond.corp.microsoft.com> <5b0248170906081750y5a9d9f44q9668a01e30c077cf@mail.gmail.com> Message-ID: <710DF26F214D2B4BB94287123FFE980A2E207FF154@NA-EXMSG-C104.redmond.corp.microsoft.com> My mistake :) It was not intentional. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Monday, June 08, 2009 5:59 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber status That's called dynamic language interop - Dino's fixing bugs in IronRuby :)) I've filled it under IronRuby: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1535 Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Seo Sanghyeon Sent: Monday, June 08, 2009 5:50 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber status 2009/6/9 Shri Borde : > With a build from the latest sources, the Cucumber C# example from http://wiki.github.com/aslakhellesoy/cucumber/ironruby-and-net is working. Also, only two of the Cucumber tests fail. One seems to be a test issue, and the other is because of http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=22984. Please try out Cucumber and let us know what your experience is. Why is the issue filed on Iron*Python*? -- Seo Sanghyeon _______________________________________________ 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 From lists at ruby-forum.com Tue Jun 9 06:33:00 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Tue, 9 Jun 2009 12:33:00 +0200 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> Message-ID: <2e70ec9cde341581114dda6809d05fcc@ruby-forum.com> By the way, even with "-X:PrivateBinding" I can't access private members. Should it be done in a special way? Thanks, Shay. ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 9 06:35:21 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Tue, 9 Jun 2009 12:35:21 +0200 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: <2e70ec9cde341581114dda6809d05fcc@ruby-forum.com> References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <2e70ec9cde341581114dda6809d05fcc@ruby-forum.com> Message-ID: It also seems like protected methods and internal classes are accessible in IR just like they were public. Is it the correct behavior? Thanks, Shay. ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 9 06:51:00 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Tue, 9 Jun 2009 12:51:00 +0200 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <2e70ec9cde341581114dda6809d05fcc@ruby-forum.com> Message-ID: My mistake - internal classes are accessible only with -X:PrivateBinding. Protected methods are always accessible like public methods. ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 9 08:34:52 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Tue, 9 Jun 2009 14:34:52 +0200 Subject: [Ironruby-core] An Issue with CLR Delegates Message-ID: Hi, Today I'm playing with CLR delegates :) I've run into a strange behavior. Take a look at the next C# block: ----------- public class Printer { public delegate void PrintValue(string value); } ----------- Assuming the above is the content of assembly.dll, take a look at the next IR console output: ----------- >>> require "assembly.dll" => true >>> p = Printer::PrintValue.new { |x| puts x } => Printer+PrintValue >>> p("dsfs") "dsfs" => nil >>> d = Printer::PrintValue.new { |x| puts x } => Printer+PrintValue >>> d("dsfd") :0: undefined method `d' for main:Object (NoMethodError) ------------ Why does p work and d doesn't? BTW, I see that delegates are converted to something called LightLambda. What is that? Many thanks! Shay. ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From Tomas.Matousek at microsoft.com Tue Jun 9 11:10:54 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 9 Jun 2009 08:10:54 -0700 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: <2e70ec9cde341581114dda6809d05fcc@ruby-forum.com> References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <2e70ec9cde341581114dda6809d05fcc@ruby-forum.com> Message-ID: Could you give an example where it doesn't work? Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Tuesday, June 09, 2009 3:33 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] .Net<->IR Object Mapping By the way, even with "-X:PrivateBinding" I can't access private members. Should it be done in a special way? Thanks, Shay. ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Tue Jun 9 11:12:00 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 9 Jun 2009 08:12:00 -0700 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <2e70ec9cde341581114dda6809d05fcc@ruby-forum.com> Message-ID: They are only accessible if called with a receiver that is an instance of a derived class. Or do you observe another behavior? Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Tuesday, June 09, 2009 3:51 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] .Net<->IR Object Mapping My mistake - internal classes are accessible only with -X:PrivateBinding. Protected methods are always accessible like public methods. ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Tue Jun 9 11:38:52 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Tue, 9 Jun 2009 17:38:52 +0200 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <2e70ec9cde341581114dda6809d05fcc@ruby-forum.com> Message-ID: I assumed a reflection like behavior... For example, doing something like: klass.method(:MyPrivateClrMethod).call Can you write a simple example of what you've described? Thanks, Shay. ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 9 12:01:39 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Tue, 9 Jun 2009 18:01:39 +0200 Subject: [Ironruby-core] More Interop Qs (Out, Ref and Structs) Message-ID: <01b76b3ce841ccdf0daabe0a364dc250@ruby-forum.com> Hi there, I've got a few more questions regarding interop scenarios: 1. What happens with out parameters in methods? Currently when I try to use them I get an error: :0: can't convert String into System::Runtime::CompilerServices::StrongBox[System::String] (TypeError) 2. What happens with ref parameters? it doesn't throw an error but it doesn't change the value as well. 3. Structs - they are mapped to Ruby classes, but I can't create new instances of them using the new method. How should it be done? Thanks and sorry for the question flood :) Shay. ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Tue Jun 9 12:18:23 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 9 Jun 2009 16:18:23 +0000 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <2e70ec9cde341581114dda6809d05fcc@ruby-forum.com> Message-ID: That should work: [302] > rbr IronRuby 0.5.0.0 on .NET 2.0.50727.4918 Copyright (c) Microsoft Corporation. All rights reserved. >>> require 'fixtures.generated' => true >>> c = ClassWithMethods.new => ClassWithMethods >>> c.private_method :0: undefined method `private_method' for ClassWithMethods:ClassWithMethods (NoMethodError) >>> c.private_methods => ["initialize", "`", "abort", "Array", "at_exit", "autoload", "autoload?", "binding", "block_given?", "caller", "catch", "eval", "exec", "exit", "exit!", "fail", "Float", "format", "getc", "gets", "global_variables", "initialize_copy", "Integer", "iterator?", "lambda", "load", "load_assembly", "local_variables", "loop", "method_missing", "open", "p", "print", "printf", "proc", "putc", "puts", "raise", "rand", "remove_instance_variable", "require", "select", "set_trace_func", "singleton_method_added", "singleton_method_removed", "singleton_method_undefined", "sleep", "sprintf", "String", "system", "throw", "trap", "warn"] >>> c.method(:private_method) :0:in `method': undefined method `private_method' for class `ClassWithMethods' (NameError) from :0 >>> exit C:\vsl\Merlin\Main\Languages\Ruby\Tests\Interop\net [303] > rbr "-X:PrivateBinding" IronRuby 0.5.0.0 on .NET 2.0.50727.4918 Copyright (c) Microsoft Corporation. All rights reserved. >>> require 'fixtures.generated' => true >>> c = ClassWithMethods.new => ClassWithMethods >>> c.private_method => 'private' >>> c.private_methods => ["initialize", "`", "abort", "Array", "at_exit", "autoload", "autoload?", "binding", "block_given?", "caller", "catch", "eval", "exec", "exit", "exit!", "fail", "Float", "format", "getc", "gets", "global_variables", "initialize_copy", "Integer", "iterator?", "lambda", "load", "load_assembly", "local_variables", "loop", "method_missing", "open", "p", "print", "printf", "proc", "putc", "puts", "raise", "rand", "remove_instance_variable", "require", "select", "set_trace_func", "singleton_method_added", "singleton_method_removed", "singleton_method_undefined", "sleep", "sprintf", "String", "system", "throw", "trap", "warn"] >>> c.method(:private_method) => # >>> c.method(:private_method).call => 'private' >>> c.method(:private_method)[] => 'private' >>> exit C:\vsl\Merlin\Main\Languages\Ruby\Tests\Interop\net [304] > If you want to try with this class, it is defined in the fixtures.generated.dll assembly in Merlin\Main\Languages\Ruby\Tests\Interop\net Thanks, JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Shay Friedman > Sent: Tuesday, June 09, 2009 8:39 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] .Net<->IR Object Mapping > > I assumed a reflection like behavior... For example, doing something > like: > klass.method(:MyPrivateClrMethod).call > > Can you write a simple example of what you've described? > > Thanks, > Shay. > > ---------------------------- > http://www.ironshay.com > Follow me: http://twitter.com/ironshay > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Tue Jun 9 13:30:11 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 9 Jun 2009 10:30:11 -0700 Subject: [Ironruby-core] More Interop Qs (Out, Ref and Structs) In-Reply-To: <01b76b3ce841ccdf0daabe0a364dc250@ruby-forum.com> References: <01b76b3ce841ccdf0daabe0a364dc250@ruby-forum.com> Message-ID: Could you be more specific? It's not helpful if you just say "it doesn't work". Can you include code that you are trying to run and the exact result you get? Out parameters are returned in a CLR object array as a return value: has_value, value = dictionary.try_get_value("foo") Thanks, Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Tuesday, June 09, 2009 9:02 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] More Interop Qs (Out, Ref and Structs) Hi there, I've got a few more questions regarding interop scenarios: 1. What happens with out parameters in methods? Currently when I try to use them I get an error: :0: can't convert String into System::Runtime::CompilerServices::StrongBox[System::String] (TypeError) 2. What happens with ref parameters? it doesn't throw an error but it doesn't change the value as well. 3. Structs - they are mapped to Ruby classes, but I can't create new instances of them using the new method. How should it be done? Thanks and sorry for the question flood :) Shay. ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From jdeville at microsoft.com Tue Jun 9 13:31:56 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 9 Jun 2009 17:31:56 +0000 Subject: [Ironruby-core] An Issue with CLR Delegates In-Reply-To: References: Message-ID: Looks like some odd caching or invalidation. Please file a bug on Codeplex. JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Shay Friedman > Sent: Tuesday, June 09, 2009 5:35 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] An Issue with CLR Delegates > > Hi, > > Today I'm playing with CLR delegates :) > > I've run into a strange behavior. > > Take a look at the next C# block: > ----------- > public class Printer > { > public delegate void PrintValue(string value); } > ----------- > > Assuming the above is the content of assembly.dll, take a look at the next IR > console output: > > ----------- > >>> require "assembly.dll" > => true > >>> p = Printer::PrintValue.new { |x| puts x } > => Printer+PrintValue > >>> p("dsfs") > "dsfs" > => nil > >>> d = Printer::PrintValue.new { |x| puts x } > => Printer+PrintValue > >>> d("dsfd") > :0: undefined method `d' for main:Object (NoMethodError) > ------------ > > Why does p work and d doesn't? > > BTW, I see that delegates are converted to something called LightLambda. > What is that? > > Many thanks! > Shay. > ---------------------------- > http://www.ironshay.com > Follow me: http://twitter.com/ironshay > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Tue Jun 9 14:43:13 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 9 Jun 2009 11:43:13 -0700 Subject: [Ironruby-core] An Issue with CLR Delegates In-Reply-To: References: Message-ID: This is actually correct behavior. p("dsfs") calls Kernel#p with parameter "dsfs" d("dsfs") attempts to call method "d", which doesn't exist. You need to do p.invoke("dsfs") and d.invoke("dsfs") to invoke the delegates. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Tuesday, June 09, 2009 10:32 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] An Issue with CLR Delegates Looks like some odd caching or invalidation. Please file a bug on Codeplex. JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Shay Friedman > Sent: Tuesday, June 09, 2009 5:35 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] An Issue with CLR Delegates > > Hi, > > Today I'm playing with CLR delegates :) > > I've run into a strange behavior. > > Take a look at the next C# block: > ----------- > public class Printer > { > public delegate void PrintValue(string value); } > ----------- > > Assuming the above is the content of assembly.dll, take a look at the next IR > console output: > > ----------- > >>> require "assembly.dll" > => true > >>> p = Printer::PrintValue.new { |x| puts x } > => Printer+PrintValue > >>> p("dsfs") > "dsfs" > => nil > >>> d = Printer::PrintValue.new { |x| puts x } > => Printer+PrintValue > >>> d("dsfd") > :0: undefined method `d' for main:Object (NoMethodError) > ------------ > > Why does p work and d doesn't? > > BTW, I see that delegates are converted to something called LightLambda. > What is that? > > Many thanks! > Shay. > ---------------------------- > http://www.ironshay.com > Follow me: http://twitter.com/ironshay > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > 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 From ivan at flanders.co.nz Tue Jun 9 15:27:47 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 9 Jun 2009 21:27:47 +0200 Subject: [Ironruby-core] CLR interop bug? Message-ID: Hi What is the nitty gritty around monkey patching CLR classes. When I'm monkey patching I should be able to get to the protected members of a class right? And the private members too (I see it kind of like partial classes)? public class AggregatorRepository : RepositoryBase { public AggregatorRepository(UnitOfWorkScopeBase unitOfWorkScope) : base(unitOfWorkScope) { } //Some C# methods here that use Linq and Expressions for querying } Repository base defines a protected property UnitOfWorkScope I monkey patched it like so module MediaAggregator module Models module Lightspeed class AggregatorRepository def users uow.method(:find).of(User).call end def uow self.unit_of_work_scope.current end end end end end Calling the users method result in an error complaining about a protected unit_of_work_scope method. And ironically the error talks about my situation as being the solution: * * *C**LR protected method `unit_of_work_scope' called for MediaAggregator.Models.Lightspeed.AggregatorRepository:MediaAggregator::Models::Lightspeed::AggregatorRepository; CLR protected methods can only be called with a receiver whose class is a subclass of the class declaring the method* Do I put this on codeplex or am I reading the error wrong? As far as I can tell I am subclassing a class. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Tue Jun 9 15:43:29 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 9 Jun 2009 12:43:29 -0700 Subject: [Ironruby-core] CLR interop bug? In-Reply-To: References: Message-ID: The error message might be more clear: CLR protected method `unit_of_work_scope' called for MediaAggregator.Models.Lightspeed.AggregatorRepository:MediaAggregator::Models::Lightspeed::AggregatorRepository; CLR protected methods can only be called with a receiver whose class is a Ruby subclass of the class declaring the method You need to derive a Ruby class from the CLR class and use its instance to call the method. What we need to do internally is emit a CLR subtype of the CLR type that proxies protected method calls coming from Ruby code. When you monkey-patch a CLR method it doesn?t mean you are ?in the type?. You are still outside of the type, so you still have the same visibility restrictions on CLR members as if they were called from any other Ruby/CLR method. IronRuby just overlays Ruby methods over the CLR type, it cannot ?open? the type. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Tuesday, June 09, 2009 12:28 PM To: ironruby-core Subject: [Ironruby-core] CLR interop bug? Hi What is the nitty gritty around monkey patching CLR classes. When I'm monkey patching I should be able to get to the protected members of a class right? And the private members too (I see it kind of like partial classes)? public class AggregatorRepository : RepositoryBase { public AggregatorRepository(UnitOfWorkScopeBase unitOfWorkScope) : base(unitOfWorkScope) { } //Some C# methods here that use Linq and Expressions for querying } Repository base defines a protected property UnitOfWorkScope I monkey patched it like so module MediaAggregator module Models module Lightspeed class AggregatorRepository def users uow.method(:find).of(User).call end def uow self.unit_of_work_scope.current end end end end end Calling the users method result in an error complaining about a protected unit_of_work_scope method. And ironically the error talks about my situation as being the solution: CLR protected method `unit_of_work_scope' called for MediaAggregator.Models.Lightspeed.AggregatorRepository:MediaAggregator::Models::Lightspeed::AggregatorRepository; CLR protected methods can only be called with a receiver whose class is a subclass of the class declaring the method Do I put this on codeplex or am I reading the error wrong? As far as I can tell I am subclassing a class. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Tue Jun 9 16:07:22 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Tue, 9 Jun 2009 22:07:22 +0200 Subject: [Ironruby-core] An Issue with CLR Delegates In-Reply-To: References: Message-ID: lol! Brilliant discovery Tomas! Thanks! ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 9 16:20:02 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 9 Jun 2009 22:20:02 +0200 Subject: [Ironruby-core] How to fire IronRuby Method from C# Message-ID: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> Hi, I am returning an IronRuby object to C#. It is returned as a RubyClass object. I can debug and see that it also has greet() method attached to it but I am having difficulty in calling the greet() method from C#. Here is the code. var scriptingRuntime = IronRuby.Ruby.CreateRuntime(); var engine = scriptingRuntime.GetEngine("rb"); RubyObject rubyPerson = ((RubyObject)engine.Execute(@" class Person def greet() puts 'hello world' end end def getPerson() return Person.new end getPerson() ")); RubyClass rubyPersonClass = rubyPerson.ImmediateClass; -- Posted via http://www.ruby-forum.com/. From Tomas.Matousek at microsoft.com Tue Jun 9 16:24:32 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 9 Jun 2009 13:24:32 -0700 Subject: [Ironruby-core] An Issue with CLR Delegates In-Reply-To: References: Message-ID: Well, it doesn't take much to see these things right away. Just to implement a Ruby VM :) Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Tuesday, June 09, 2009 1:07 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] An Issue with CLR Delegates lol! Brilliant discovery Tomas! Thanks! ---------------------------- http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Tue Jun 9 16:25:19 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Tue, 9 Jun 2009 22:25:19 +0200 Subject: [Ironruby-core] More Interop Qs (Out, Ref and Structs) In-Reply-To: References: <01b76b3ce841ccdf0daabe0a364dc250@ruby-forum.com> Message-ID: <7320b013a8596ea4c82a21b4c1dd3cb6@ruby-forum.com> No problem, here is the list with more details: 1. out parameters: C# ----- public class Class3 { public void Test1(out string str) { str = "From C#"; } } IronRuby ---------- >> s = "a" => "a" >> Class3.new.Test1(s) :0: can't convert String into System::Runtime::CompilerServices::StrongBox[System::String] (TypeError) 2. ref parameters: C# ----- public class Class3 { public void Test2(ref string str) { str = "From C#"; } } IronRuby ---------- >>> s = "a" => "a" >>> Class3.new.Test2(s) => 'From C#' >>> s => "a" (This seems to work like your description to out parameters) 3. Structs C# ------ public struct FullName { public string FirstName; public string LastName; } IronRuby ----------- >>> my_struct = FullName.new :0: allocator undefined for Sample::FullName (TypeError) Let me know if you need more details. Many thanks, Shay ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From Tomas.Matousek at microsoft.com Tue Jun 9 16:39:31 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 9 Jun 2009 13:39:31 -0700 Subject: [Ironruby-core] How to fire IronRuby Method from C# In-Reply-To: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> References: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> Message-ID: This should work: var engine = IronRuby.Ruby.CreateEngine(); engine.Execute(@" class Person def greet() puts 'hello world' end end "); object personClass = engine.Runtime.Globals.GetVariable("Person"); object person = engine.ObjectOperations.CreateInstance(personClass); engine.ObjectOperations.InvokeMember(person, "greet"); Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Tuesday, June 09, 2009 1:20 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] How to fire IronRuby Method from C# Hi, I am returning an IronRuby object to C#. It is returned as a RubyClass object. I can debug and see that it also has greet() method attached to it but I am having difficulty in calling the greet() method from C#. Here is the code. var scriptingRuntime = IronRuby.Ruby.CreateRuntime(); var engine = scriptingRuntime.GetEngine("rb"); RubyObject rubyPerson = ((RubyObject)engine.Execute(@" class Person def greet() puts 'hello world' end end def getPerson() return Person.new end getPerson() ")); RubyClass rubyPersonClass = rubyPerson.ImmediateClass; -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From ivan at flanders.co.nz Tue Jun 9 16:39:52 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 9 Jun 2009 22:39:52 +0200 Subject: [Ironruby-core] How to fire IronRuby Method from C# In-Reply-To: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> References: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> Message-ID: var operations = engine.CreateOperations(); operations.InvokeMember(rubyPerson, "greet"); http://github.com/casualjim/ironrubymvc/blob/ef59166eb4e5e6b06b9d90abf95d637c2126e5ed/IronRubyMvc/Core/RubyEngine.cs#L116 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 9, 2009 at 10:20 PM, Mohammad Azam wrote: > Hi, > > I am returning an IronRuby object to C#. It is returned as a RubyClass > object. I can debug and see that it also has greet() method attached to > it but I am having difficulty in calling the greet() method from C#. > Here is the code. > > var scriptingRuntime = IronRuby.Ruby.CreateRuntime(); > var engine = scriptingRuntime.GetEngine("rb"); > > RubyObject rubyPerson = ((RubyObject)engine.Execute(@" > class Person > > def greet() > puts 'hello world' > end > > end > > def getPerson() > return Person.new > end > > getPerson() > ")); > > RubyClass rubyPersonClass = rubyPerson.ImmediateClass; > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Tue Jun 9 16:44:59 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 9 Jun 2009 22:44:59 +0200 Subject: [Ironruby-core] How to fire IronRuby Method from C# In-Reply-To: References: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> Message-ID: <2f95de52e3236d39e905e78b8025bc45@ruby-forum.com> Awesome thanks! -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Tue Jun 9 16:47:39 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 9 Jun 2009 22:47:39 +0200 Subject: [Ironruby-core] prettier stack traces Message-ID: Hi When I use the console i get pretty error messages or at least error messages without the stacktrace of IronRuby internal calls. How do I get this pretty stack trace when hosting IronRuby in my own application? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Tue Jun 9 16:51:46 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 9 Jun 2009 22:51:46 +0200 Subject: [Ironruby-core] How to fire IronRuby Method from C# In-Reply-To: References: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> Message-ID: <5863aa768ee098515ccdf42c7aeb0372@ruby-forum.com> Thanks Tom! I wonder why dynamic type variable in C# 4.0 is not able to translate the RubyClass and trigger the greet() method. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 9 16:57:33 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 9 Jun 2009 22:57:33 +0200 Subject: [Ironruby-core] How to fire IronRuby Method from C# In-Reply-To: References: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> Message-ID: Is there any special way for calling the ExecuteFile method: engine.ExecuteFile("hello.rb",engine.CreateScope()); And here is the hello.rb file: class Person def greet() puts 'hello world' end end def getPerson() return Person.new end getPerson() -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 9 17:05:00 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Tue, 9 Jun 2009 23:05:00 +0200 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <2e70ec9cde341581114dda6809d05fcc@ruby-forum.com> Message-ID: I can't get it to work... What am I doing wrong? This is my C# code: namespace IRTests { public class IRTest { private void MyMethod() { Console.WriteLine("Hi from C#"); } } } And this is the IR console: >>> t = IRTests::IRTest.new => IRTests.IRTest >>> t.my_method :0: undefined method `my_method' for IRTests.IRTest:IRTests::IRTest (NoMethodError) >>> t.method(:my_method) D:\IronRuby\GitRepository\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\KernelOps.cs:1437:in `method': undefined method `my_method' for class `IRTests::IRTest' (NameError) from :0 Thanks! Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Tue Jun 9 17:35:02 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 9 Jun 2009 21:35:02 +0000 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <2e70ec9cde341581114dda6809d05fcc@ruby-forum.com> Message-ID: Works just fine for me. How are you starting up the console? Here's my method: [201] > ir -X:PrivateBinding IronRuby 0.5.0.0 on .NET 2.0.50727.4918 Copyright (c) Microsoft Corporation. All rights reserved. >>> require 'temp1' => true >>> IRTests::IRTest.new.my_method Hi from C# => nil >>> JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Shay Friedman > Sent: Tuesday, June 09, 2009 2:05 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] .Net<->IR Object Mapping > > I can't get it to work... What am I doing wrong? > > This is my C# code: > namespace IRTests > { > public class IRTest > { > private void MyMethod() { > Console.WriteLine("Hi from C#"); > } > } > } > > And this is the IR console: > > >>> t = IRTests::IRTest.new > => IRTests.IRTest > >>> t.my_method > :0: undefined method `my_method' for IRTests.IRTest:IRTests::IRTest > (NoMethodError) > > >>> t.method(:my_method) > D:\IronRuby\GitRepository\ironruby\Merlin\Main\Languages\Ruby\Libraries > .LCA_RESTRICTED\Builtins\KernelOps.cs:1437:in > `method': undefined method `my_method' for class `IRTests::IRTest' > (NameError) from :0 > > Thanks! > Shay. > ---------------------------- > Shay Friedman > http://www.ironshay.com > Follow me: http://twitter.com/ironshay > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From jdeville at microsoft.com Tue Jun 9 17:41:26 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 9 Jun 2009 21:41:26 +0000 Subject: [Ironruby-core] More Interop Qs (Out, Ref and Structs) In-Reply-To: <7320b013a8596ea4c82a21b4c1dd3cb6@ruby-forum.com> References: <01b76b3ce841ccdf0daabe0a364dc250@ruby-forum.com> <7320b013a8596ea4c82a21b4c1dd3cb6@ruby-forum.com> Message-ID: [204] > ir IronRuby 0.5.0.0 on .NET 2.0.50727.4918 Copyright (c) Microsoft Corporation. All rights reserved. >>> require 'temp1' => true Out: >>> c = Class3.new => Class3 >>> a = c.test1 => 'From C#' >>> a => 'From C#' Ref: >>> b = c.test2 :0: wrong number of arguments (0 for 1) (ArgumentError) >>> b = "a" => "a" >>> c.test2 b => 'From C#' >>> c => Class3 >>> b => "a" >>> b = c.test2 b => 'From C#' >>> b => 'From C#' I'll let Tomas explain refs, since I'm not sure what's going on. It seems like b = c.test2 should work if b has been defined already, but that may be just me. JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Shay Friedman > Sent: Tuesday, June 09, 2009 1:25 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] More Interop Qs (Out, Ref and Structs) > > No problem, here is the list with more details: > > 1. out parameters: > C# > ----- > public class Class3 { > public void Test1(out string str) { > str = "From C#"; > } > } > > IronRuby > ---------- > >> s = "a" > => "a" > >> Class3.new.Test1(s) > :0: can't convert String into > System::Runtime::CompilerServices::StrongBox[System::String] (TypeError) > > 2. ref parameters: > C# > ----- > public class Class3 { > public void Test2(ref string str) { > str = "From C#"; > } > } > > IronRuby > ---------- > >>> s = "a" > => "a" > >>> Class3.new.Test2(s) > => 'From C#' > >>> s > => "a" > > (This seems to work like your description to out parameters) > > 3. Structs > C# > ------ > public struct FullName { > public string FirstName; > public string LastName; > } > > IronRuby > ----------- > >>> my_struct = FullName.new > :0: allocator undefined for Sample::FullName (TypeError) > > Let me know if you need more details. > > Many thanks, > Shay > ---------------------------- > Shay Friedman > http://www.ironshay.com > Follow me: http://twitter.com/ironshay > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From ivan at flanders.co.nz Tue Jun 9 17:49:22 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 9 Jun 2009 23:49:22 +0200 Subject: [Ironruby-core] live demo of ironruby mvc Message-ID: Hi I've put a working demo live on IIS 7 with IronRuby MVC a very simple task list application http://irtodo.koolkraft.net the source can be found: http://github.com/casualjim/ironrubymvc-sample you can login with user: test pass: test1234 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Tue Jun 9 18:00:09 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 10 Jun 2009 00:00:09 +0200 Subject: [Ironruby-core] How to use open-uri Message-ID: Hi, I am using the following code to do some screen scraping but it says "no such file to load open-uri". Here is the code: require 'open-uri' require 'uri' class Person def greet() puts 'hello world' end Thanks, Azam -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 9 18:08:45 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 10 Jun 2009 00:08:45 +0200 Subject: [Ironruby-core] live demo of ironruby mvc In-Reply-To: References: Message-ID: <4ec50c396a485f0bc30c830a4eacd274@ruby-forum.com> When I log in it throws SQLLite error! -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Tue Jun 9 18:14:17 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 9 Jun 2009 22:14:17 +0000 Subject: [Ironruby-core] live demo of ironruby mvc In-Reply-To: References: Message-ID: Got an error (No Such table Users) JD ?there is no try From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Tuesday, June 09, 2009 2:49 PM To: ironruby-core Subject: [Ironruby-core] live demo of ironruby mvc Hi I've put a working demo live on IIS 7 with IronRuby MVC a very simple task list application http://irtodo.koolkraft.net the source can be found: http://github.com/casualjim/ironrubymvc-sample you can login with user: test pass: test1234 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Tue Jun 9 18:26:10 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 10 Jun 2009 00:26:10 +0200 Subject: [Ironruby-core] live demo of ironruby mvc In-Reply-To: References: Message-ID: I forgot to mark the sqlite file as content so it didn't publish :S Thanks. It's working now. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Jun 10, 2009 at 12:14 AM, Jim Deville wrote: > Got an error (No Such table Users) > > > > JD > > > > ?there is no try > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Tuesday, June 09, 2009 2:49 PM > *To:* ironruby-core > *Subject:* [Ironruby-core] live demo of ironruby mvc > > > > Hi > > > > I've put a working demo live on IIS 7 with IronRuby MVC > > a very simple task list application > > http://irtodo.koolkraft.net > > > > the source can be found: > > http://github.com/casualjim/ironrubymvc-sample > > > > you can login with > > user: test > > pass: test1234 > > > > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanxiyn at gmail.com Tue Jun 9 20:51:06 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Wed, 10 Jun 2009 09:51:06 +0900 Subject: [Ironruby-core] How to use open-uri In-Reply-To: References: Message-ID: <5b0248170906091751p4c4e01e0ub43872fbfe69dcdd@mail.gmail.com> 2009/6/10 Mohammad Azam : > I am using the following code to do some screen scraping but it says "no > such file to load open-uri". require 'open-uri' works for me. Which version of IronRuby are you using? -- Seo Sanghyeon From lists at ruby-forum.com Tue Jun 9 21:54:27 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 10 Jun 2009 03:54:27 +0200 Subject: [Ironruby-core] How to use open-uri In-Reply-To: <5b0248170906091751p4c4e01e0ub43872fbfe69dcdd@mail.gmail.com> References: <5b0248170906091751p4c4e01e0ub43872fbfe69dcdd@mail.gmail.com> Message-ID: Thanks for the reply! Actually I am trying to run the open method using C#. Here is the code: dynamic rubyPerson = (engine.Execute(@" require 'open-uri' class Person def greet() puts 'hello world' end end def getPerson() f = open('http://www.azamsharp.com/Default.aspx') end getPerson() ")); And here is the error: no such file to load open-uri -- Posted via http://www.ruby-forum.com/. From curth at microsoft.com Tue Jun 9 22:17:12 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 9 Jun 2009 19:17:12 -0700 Subject: [Ironruby-core] How to use open-uri In-Reply-To: References: <5b0248170906091751p4c4e01e0ub43872fbfe69dcdd@mail.gmail.com> Message-ID: You may need to call ScriptEngine.SearchPaths to initialize the path. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Tuesday, June 09, 2009 6:54 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] How to use open-uri Thanks for the reply! Actually I am trying to run the open method using C#. Here is the code: dynamic rubyPerson = (engine.Execute(@" require 'open-uri' class Person def greet() puts 'hello world' end end def getPerson() f = open('http://www.azamsharp.com/Default.aspx') end getPerson() ")); And here is the error: no such file to load open-uri -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From curth at microsoft.com Tue Jun 9 22:19:53 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 9 Jun 2009 19:19:53 -0700 Subject: [Ironruby-core] How to fire IronRuby Method from C# In-Reply-To: References: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> Message-ID: If this is C# 4 (as you've suggested in another email), you should be able to say object personClass = engine.Runtime.Globals.GetVariable("Person"); dynamic person = engine.ObjectOperations.CreateInstance(personClass); person.greet(); -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Tuesday, June 09, 2009 1:40 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] How to fire IronRuby Method from C# This should work: var engine = IronRuby.Ruby.CreateEngine(); engine.Execute(@" class Person def greet() puts 'hello world' end end "); object personClass = engine.Runtime.Globals.GetVariable("Person"); object person = engine.ObjectOperations.CreateInstance(personClass); engine.ObjectOperations.InvokeMember(person, "greet"); Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Tuesday, June 09, 2009 1:20 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] How to fire IronRuby Method from C# Hi, I am returning an IronRuby object to C#. It is returned as a RubyClass object. I can debug and see that it also has greet() method attached to it but I am having difficulty in calling the greet() method from C#. Here is the code. var scriptingRuntime = IronRuby.Ruby.CreateRuntime(); var engine = scriptingRuntime.GetEngine("rb"); RubyObject rubyPerson = ((RubyObject)engine.Execute(@" class Person def greet() puts 'hello world' end end def getPerson() return Person.new end getPerson() ")); RubyClass rubyPersonClass = rubyPerson.ImmediateClass; -- Posted via http://www.ruby-forum.com/. _______________________________________________ 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 From lists at ruby-forum.com Tue Jun 9 22:23:34 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 10 Jun 2009 04:23:34 +0200 Subject: [Ironruby-core] How to fire IronRuby Method from C# In-Reply-To: References: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> Message-ID: Awesome! I will try it out! -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 9 22:26:39 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 10 Jun 2009 04:26:39 +0200 Subject: [Ironruby-core] How to use open-uri In-Reply-To: References: <5b0248170906091751p4c4e01e0ub43872fbfe69dcdd@mail.gmail.com> Message-ID: <41f7cd23f83d317954dcb2bf42c795bb@ruby-forum.com> I am using the following now: var paths = new List(); paths.Add(@"C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs"); scriptEngine.SetSearchPaths(paths); But still the same error! -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 9 22:31:00 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 10 Jun 2009 04:31:00 +0200 Subject: [Ironruby-core] How to fire IronRuby Method from C# In-Reply-To: References: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> Message-ID: <138aef8f4573e1e78b1ce04dd1cfee70@ruby-forum.com> Curt Hagenlocher wrote: > If this is C# 4 (as you've suggested in another email), you should be > able to say > > object personClass = engine.Runtime.Globals.GetVariable("Person"); > dynamic person = engine.ObjectOperations.CreateInstance(personClass); > person.greet(); I tried and it did not work out. First engine does not have ObjectOperations. There is engine.Operations which I used but I get the error when doing person.greet(). Error 5 Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpBinaryOperationBinder..ctor' ConsoleApplication1 Error 73 One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll? C:\Documents and Settings\AzamSharp\My Documents\Visual Studio 10\Projects\testvs2010\ConsoleApplication1\Program.cs 80 13 ConsoleApplication1 -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 9 22:41:27 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 10 Jun 2009 04:41:27 +0200 Subject: [Ironruby-core] How to use open-uri In-Reply-To: <41f7cd23f83d317954dcb2bf42c795bb@ruby-forum.com> References: <5b0248170906091751p4c4e01e0ub43872fbfe69dcdd@mail.gmail.com> <41f7cd23f83d317954dcb2bf42c795bb@ruby-forum.com> Message-ID: <8ab4b4e7f26d4707d09b16c30529dd6b@ruby-forum.com> Thanks I got it working using the following path: var paths = new List(); paths.Add(@"C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs"); paths.Add(@"C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\redist-libs\ruby\1.8"); -- Posted via http://www.ruby-forum.com/. From curth at microsoft.com Tue Jun 9 23:29:18 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 9 Jun 2009 20:29:18 -0700 Subject: [Ironruby-core] How to fire IronRuby Method from C# In-Reply-To: <138aef8f4573e1e78b1ce04dd1cfee70@ruby-forum.com> References: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> <138aef8f4573e1e78b1ce04dd1cfee70@ruby-forum.com> Message-ID: Yes, sorry, you're right -- it's Engine.Operations (but the name of the class is "ObjectOperations"). The error message tells you exactly what you need to do! Make sure you've added references to Microsoft.CSharp.dll and System.Core.dll to your project. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Tuesday, June 09, 2009 7:31 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] How to fire IronRuby Method from C# Curt Hagenlocher wrote: > If this is C# 4 (as you've suggested in another email), you should be > able to say > > object personClass = engine.Runtime.Globals.GetVariable("Person"); > dynamic person = engine.ObjectOperations.CreateInstance(personClass); > person.greet(); I tried and it did not work out. First engine does not have ObjectOperations. There is engine.Operations which I used but I get the error when doing person.greet(). Error 5 Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpBinaryOperationBinder..ctor' ConsoleApplication1 Error 73 One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll? C:\Documents and Settings\AzamSharp\My Documents\Visual Studio 10\Projects\testvs2010\ConsoleApplication1\Program.cs 80 13 ConsoleApplication1 -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Tue Jun 9 23:36:53 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 10 Jun 2009 05:36:53 +0200 Subject: [Ironruby-core] How to fire IronRuby Method from C# In-Reply-To: References: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> <138aef8f4573e1e78b1ce04dd1cfee70@ruby-forum.com> Message-ID: <7aafaf410546f9345510a3c950ac7395@ruby-forum.com> Curt Hagenlocher wrote: > Yes, sorry, you're right -- it's Engine.Operations (but the name of the > class is "ObjectOperations"). > > The error message tells you exactly what you need to do! Make sure > you've added references to Microsoft.CSharp.dll and System.Core.dll to > your project. The error is now gone! but I got the new error which says: RubyObject does not contain the definition for greet! object personClass = engine.Runtime.Globals.GetVariable("Person"); dynamic person = engine.Operations.CreateInstance(personClass); person.greet(); -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Jun 10 00:25:16 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Wed, 10 Jun 2009 06:25:16 +0200 Subject: [Ironruby-core] .Net<->IR Object Mapping In-Reply-To: References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <2e70ec9cde341581114dda6809d05fcc@ruby-forum.com> Message-ID: <720c01fcbd9963aea4cadd19647286b1@ruby-forum.com> I had an old version (3-4 week old). After I got the latest source and compiles it really works. Sorry for that. Thanks! Shay. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Jun 10 13:10:58 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Wed, 10 Jun 2009 19:10:58 +0200 Subject: [Ironruby-core] More Interop Qs (Out, Ref and Structs) In-Reply-To: References: <01b76b3ce841ccdf0daabe0a364dc250@ruby-forum.com> <7320b013a8596ea4c82a21b4c1dd3cb6@ruby-forum.com> Message-ID: <4e0f71341f2fcea34e5dc3cb73851a49@ruby-forum.com> Thanks Jim! Tomas, do you have an insight about ref params? Thanks, Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From Tomas.Matousek at microsoft.com Wed Jun 10 01:19:14 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 9 Jun 2009 22:19:14 -0700 Subject: [Ironruby-core] More Interop Qs (Out, Ref and Structs) In-Reply-To: References: <01b76b3ce841ccdf0daabe0a364dc250@ruby-forum.com> <7320b013a8596ea4c82a21b4c1dd3cb6@ruby-forum.com> Message-ID: 1), 2) ref/out params C#: bool TryGetValue(string key, out int value) Ruby call: result, value = dict.try_get_value('key') I.e. arguments for out parameters are omitted, the values returned via out parameters are stored in an array returned by the method. The return value of the method is the first element of that array and is followed by out and ref parameter return values in the order in which they are declared. Another example: bool Foo(string a, out string b, string c, ref string d, string e, out string f); result, b_out, d_out, f_out = foo('a_in ', 'c_in ', 'd_in', 'e_in ') 3) This is a bug. I have a fix for it, so it will work soon. However, I'd strongly recommend not to use mutable structs. The struct data are copied when boxed/unboxed and it might not be obvious where this happens - for example if you pass a struct instance from Ruby to C# method that accepts it as a strongly typed parameter the struct get unboxed and its data are copied. Tomas > -----Original Message----- > 1. out parameters: > C# > ----- > public class Class3 { > public void Test1(out string str) { > str = "From C#"; > } > } > > IronRuby > ---------- > >> s = "a" > => "a" > >> Class3.new.Test1(s) > :0: can't convert String into > System::Runtime::CompilerServices::StrongBox[System::String] (TypeError) > 2. ref parameters: > C# > ----- > public class Class3 { > public void Test2(ref string str) { > str = "From C#"; > } > } > > IronRuby > ---------- > >>> s = "a" > => "a" > >>> Class3.new.Test2(s) > => 'From C#' > >>> s > => "a" > > (This seems to work like your description to out parameters) > > 3. Structs > C# > ------ > public struct FullName { > public string FirstName; > public string LastName; > } > > IronRuby > ----------- > >>> my_struct = FullName.new > :0: allocator undefined for Sample::FullName (TypeError) > > Let me know if you need more details. > > Many thanks, > Shay > ---------------------------- > Shay Friedman > http://www.ironshay.com > Follow me: http://twitter.com/ironshay > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > 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 From lists at ruby-forum.com Wed Jun 10 13:27:23 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Wed, 10 Jun 2009 19:27:23 +0200 Subject: [Ironruby-core] More Interop Qs (Out, Ref and Structs) In-Reply-To: References: <01b76b3ce841ccdf0daabe0a364dc250@ruby-forum.com> <7320b013a8596ea4c82a21b4c1dd3cb6@ruby-forum.com> Message-ID: Thanks so much Tomas! ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Jun 10 12:55:09 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 10 Jun 2009 18:55:09 +0200 Subject: [Ironruby-core] engine.ExecuteFile gives errors Message-ID: I am using the following code to execute a Ruby file from C# but it gives me the error: var runtime = IronRuby.Ruby.CreateRuntime(); var engine = runtime.GetEngine("rb"); engine.ExecuteFile("../../HelloWorld.rb"); And here is the error: Unhandled Exception: Microsoft.Scripting.SyntaxErrorException: syntax error, une xpected END, expecting END_OF_FILE at Microsoft.Scripting.ErrorSink.Add(SourceUnit source, String message, Sourc eSpan span, Int32 errorCode, Severity severity) at Microsoft.Scripting.ErrorCounter.Add(SourceUnit source, String message, So urceSpan span, Int32 errorCode, Severity severity) at IronRuby.Compiler.Parser.ReportSyntaxError(String message) at IronRuby.Compiler.Parser.ErrorRecovery() at IronRuby.Compiler.Parser.Parse() at IronRuby.Compiler.Parser.Parse(SourceUnit sourceUnit, RubyCompilerOptions options, ErrorSink errorSink) at IronRuby.Runtime.RubyContext.ParseSourceCode[T](SourceUnit sourceUnit, Rub yCompilerOptions options, ErrorSink errorSink) at IronRuby.Runtime.RubyContext.CompileSourceCode(SourceUnit sourceUnit, Comp ilerOptions options, ErrorSink errorSink) at Microsoft.Scripting.SourceUnit.Compile(CompilerOptions options, ErrorSink errorSink) And here is the Ruby file: class Person def foo() puts 'hello world' end end person = Person.new() person.foo() -- Posted via http://www.ruby-forum.com/. From curth at microsoft.com Wed Jun 10 13:38:12 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Wed, 10 Jun 2009 10:38:12 -0700 Subject: [Ironruby-core] How to fire IronRuby Method from C# In-Reply-To: <7aafaf410546f9345510a3c950ac7395@ruby-forum.com> References: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> <138aef8f4573e1e78b1ce04dd1cfee70@ruby-forum.com> <7aafaf410546f9345510a3c950ac7395@ruby-forum.com> Message-ID: Odd. It works for me. Here's my complete code: namespace ConsoleApplication2 { class Program { static void Main(string[] args) { var engine = IronRuby.Ruby.CreateEngine(); engine.Execute(@" class Person def greet() puts 'hello world' end end "); object personClass = engine.Runtime.Globals.GetVariable("Person"); dynamic person = engine.Operations.CreateInstance(personClass); person.greet(); System.Console.ReadLine(); } } } -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Tuesday, June 09, 2009 8:37 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] How to fire IronRuby Method from C# Curt Hagenlocher wrote: > Yes, sorry, you're right -- it's Engine.Operations (but the name of the > class is "ObjectOperations"). > > The error message tells you exactly what you need to do! Make sure > you've added references to Microsoft.CSharp.dll and System.Core.dll to > your project. The error is now gone! but I got the new error which says: RubyObject does not contain the definition for greet! object personClass = engine.Runtime.Globals.GetVariable("Person"); dynamic person = engine.Operations.CreateInstance(personClass); person.greet(); -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Wed Jun 10 13:50:21 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 10 Jun 2009 19:50:21 +0200 Subject: [Ironruby-core] How to fire IronRuby Method from C# In-Reply-To: References: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> <138aef8f4573e1e78b1ce04dd1cfee70@ruby-forum.com> <7aafaf410546f9345510a3c950ac7395@ruby-forum.com> Message-ID: <050271010fb312f67a9b1d82365baf18@ruby-forum.com> This is very strange! I copy pasted your code and it is giving me compile time errors: Here is the code: var rubyPerson = (engine.Execute(@" require 'open-uri' class Person def greet() puts 'hello world' end end Person.new() ")); object personClass = engine.Runtime.Globals.GetVariable("Person"); dynamic person = engine.Operations.CreateInstance(personClass); person.greet(); And here is the error: Error 1 Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpBinaryOperationBinder..ctor' ConsoleApplication1 Error 61 One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll? C:\Documents and Settings\AzamSharp\My Documents\Visual Studio 10\Projects\testvs2010\ConsoleApplication1\Program.cs 56 12 ConsoleApplication1 I have already added references to both the dll libraries. -- Posted via http://www.ruby-forum.com/. From suppakilla at gmail.com Wed Jun 10 02:54:02 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Wed, 10 Jun 2009 08:54:02 +0200 Subject: [Ironruby-core] live demo of ironruby mvc In-Reply-To: References: Message-ID: <3bf20550906092354v3a4edd3egde30bafc31ef5a57@mail.gmail.com> Hi Ivan, if I try to register myself into IR-Todo, the application throws a missing method exception when it tries to create my user. Everything works fine when I login using the credentials for "test" and create my user via "Users -> Add user". Here is the full stacktrace for that exception: http://gist.github.com/127061 I've also tried to create a new task, but the validation keeps telling me: Task update was unsuccessful. Please correct the errors and try again. * Due Date must be between 01/01/1753 00:00:00 and 12/31/9999 23:59:59 * Assigned To is required * User is invalid PS: I had to manually remove the cookie to logout from IR-Todo, I could not find a "logout" link ;-) On Wed, Jun 10, 2009 at 00:26, Ivan Porto Carrero wrote: > I forgot to mark the sqlite file as content so it didn't publish :S > Thanks. It's working now. > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Wed, Jun 10, 2009 at 12:14 AM, Jim Deville > wrote: >> >> Got an error (No Such table Users) >> >> >> >> JD >> >> >> >> ?there is no try >> >> >> >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero >> Sent: Tuesday, June 09, 2009 2:49 PM >> To: ironruby-core >> Subject: [Ironruby-core] live demo of ironruby mvc >> >> >> >> Hi >> >> >> >> I've put a working demo live on IIS 7 with IronRuby MVC >> >> a very simple task list application >> >> http://irtodo.koolkraft.net >> >> >> >> the source can be found: >> >> http://github.com/casualjim/ironrubymvc-sample >> >> >> >> you can login with >> >> user: test >> >> pass: test1234 >> >> >> >> --- >> Met vriendelijke groeten - Best regards - Salutations >> Ivan Porto Carrero >> Blog: http://flanders.co.nz >> Twitter: http://twitter.com/casualjim >> Author of IronRuby in Action (http://manning.com/carrero) >> >> _______________________________________________ >> 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 > > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From lists at ruby-forum.com Wed Jun 10 15:47:12 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Wed, 10 Jun 2009 21:47:12 +0200 Subject: [Ironruby-core] Looking for documentation about special clr related methods Message-ID: Hi, I've seen that IR objects have special methods like to_clr_type, clr_member, clr_ctor and more. String also has its own to_clr_string method. Is there a document or site or a piece of paper that has a list of these methods and what their purpose is? Thanks! Shay ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From Jimmy.Schementi at microsoft.com Wed Jun 10 20:04:58 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 11 Jun 2009 00:04:58 +0000 Subject: [Ironruby-core] Looking for documentation about special clr related methods Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC14373443@tk5ex14mbxc106.redmond.corp.microsoft.com> Not docs yet, but they are coming. They are all for better .NET integration. Let me give you a little bit of the docs I'm working on: to_clr_type is to get the actual CLR Type object from a constant, if that constant represents a CLR Type. For example: >>> System::String.class => Class In .NET, String is of type System.RuntimeType, but Ruby says it's a Class, because it is mapped to a Ruby class. To get the actual CLR type, you use to_clr_type: >>> System::String.to_clr_type.class => System::RuntimeType clr_member is the get the actual member (property, field, method, etc) from a .NET type. When you do System::String.method(:Replace), you'll get a method object pointing to the "Replace" method on Ruby's String class. However, you can't be sure it's the method from System::String since "Replace" could have been monkey-patched on Ruby's String. clr_member will ensure you get the method object from the CLR Type. >>> class System::String ... def Replace(a, b) ... raise "BOOM" ... end ... end => nil >>> System::String.new("a").method(:Replace).call("a", "b") :2:in `Replace': BOOM (RuntimeError) from :0 >>> System::String.new("a").clr_member(:Replace).call("a", "b") => 'b' clr_ctor lets you explicitly call a CLR types constructor. There are some CLR types which map directly to Ruby types (for example: System.Threading.Thread -> Thread ... call "Thread.to_clr_type"). So: >>> System::Threading::Thread.new :0:in `start': must be called with a block (ThreadError) from :0 Eek! What happened? Because the classes are mapped, this actually calls Ruby's Thread constructor. Doing System::Threading::Thread.clr_ctor will give you the method object for the actual CLR constructor, allowing you to call it directly. to_clr_string is a convenience method on String which is basically this: class String def to_clr_string System::String.new(self) end end This is needed since a Ruby string is mutable, and a CLR string is immutable, so they don't map on to each other. You can still call any immutable Ruby methods on a CLR string, but they are different types. So for interop with CLR code which expects a CLR string, it's useful to do "foo".to_clr_string. However, I think we do conversions between these today, it's not necessary, but still good to have. Hope that helps. Let me know if you need any further clarification. Also, if anyone sees anything incorrect, please let me know, as I just wrote it =) ~js -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Wednesday, June 10, 2009 12:47 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Looking for documentation about special clr related methods Hi, I've seen that IR objects have special methods like to_clr_type, clr_member, clr_ctor and more. String also has its own to_clr_string method. Is there a document or site or a piece of paper that has a list of these methods and what their purpose is? Thanks! Shay ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Thu Jun 11 00:20:38 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Thu, 11 Jun 2009 06:20:38 +0200 Subject: [Ironruby-core] Looking for documentation about special clr related methods In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC14373443@tk5ex14mbxc106.redmond.corp.microsoft.com> References: <0047ECBFA2E0DF4A834AA369282A5AFC14373443@tk5ex14mbxc106.redmond.corp.microsoft.com> Message-ID: <300f710b0e379d425bf508c7bdbe5c6f@ruby-forum.com> Wow that's just awesome! Thanks so much Jimmy!!! ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Thu Jun 11 13:08:45 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Thu, 11 Jun 2009 19:08:45 +0200 Subject: [Ironruby-core] Looking for documentation about special clr related methods In-Reply-To: <300f710b0e379d425bf508c7bdbe5c6f@ruby-forum.com> References: <0047ECBFA2E0DF4A834AA369282A5AFC14373443@tk5ex14mbxc106.redmond.corp.microsoft.com> <300f710b0e379d425bf508c7bdbe5c6f@ruby-forum.com> Message-ID: <92b0b3421d11072a81eb70a37384bc59@ruby-forum.com> Hey, After further investigation I have one correction and two more additions: clr_constructor and clr_ctor - they do not execute the CLR constructor, they return an array of ConstructorInfo objects (one for each constructor ocerload). clr_new - executes the CLR constructor. The Method class retrieves two new methods as well: clr_members - returns an array of RunTimeMethodInfo, one for each method overload. overloads - given types as arguments, it returns the matching overloaded CLR method. Corrections/Comments/Treats/LotsOfMoney will be gladly accepted. Thanks, Shay ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Thu Jun 11 13:21:55 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Thu, 11 Jun 2009 19:21:55 +0200 Subject: [Ironruby-core] Looking for documentation about special clr related methods In-Reply-To: <92b0b3421d11072a81eb70a37384bc59@ruby-forum.com> References: <0047ECBFA2E0DF4A834AA369282A5AFC14373443@tk5ex14mbxc106.redmond.corp.microsoft.com> <300f710b0e379d425bf508c7bdbe5c6f@ruby-forum.com> <92b0b3421d11072a81eb70a37384bc59@ruby-forum.com> Message-ID: <1f477dde2f50dce889732b2aa4df1042@ruby-forum.com> Found one mistake already :) clr_constructor and clr_ctor return a Method object representing the constructors (clr_members and overloads can then be used in order to further investigate the constructors). ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Thu Jun 11 16:22:23 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 11 Jun 2009 22:22:23 +0200 Subject: [Ironruby-core] problems with the irtodo application Message-ID: Most of the bugs should be out now, don't really know what happened but I reserve the right to call on programmer excuse #12: It works on my machine how weird ;) --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Thu Jun 11 23:31:20 2009 From: lists at ruby-forum.com (Kevin Radcliffe) Date: Fri, 12 Jun 2009 05:31:20 +0200 Subject: [Ironruby-core] How to fire IronRuby Method from C# In-Reply-To: <050271010fb312f67a9b1d82365baf18@ruby-forum.com> References: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> <138aef8f4573e1e78b1ce04dd1cfee70@ruby-forum.com> <7aafaf410546f9345510a3c950ac7395@ruby-forum.com> <050271010fb312f67a9b1d82365baf18@ruby-forum.com> Message-ID: <6f044baaf4f0c4076c94c857ce30d198@ruby-forum.com> Are you sure you have the appropriate version of IronRuby? There is a special build just for .NET 4.0. I was getting an error like the one you are until I used the .NET 4.0 build here: http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27606 Mohammad Azam wrote: > This is very strange! I copy pasted your code and it is giving me > compile time errors: > Error 1 Missing compiler required member > 'Microsoft.CSharp.RuntimeBinder.CSharpBinaryOperationBinder..ctor' > ConsoleApplication1 > > Error 61 One or more types required to compile a dynamic expression > cannot be found. Are you missing references to Microsoft.CSharp.dll and > System.Core.dll? C:\Documents and Settings\AzamSharp\My > Documents\Visual Studio > 10\Projects\testvs2010\ConsoleApplication1\Program.cs 56 12 > ConsoleApplication1 > > > I have already added references to both the dll libraries. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Jun 12 03:28:23 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Fri, 12 Jun 2009 09:28:23 +0200 Subject: [Ironruby-core] Creating a .Net Array in IR Message-ID: Hi, I'd like to create a .Net array of a certain type inside IronRuby. It's needed, for example, for the overloads method. For instance, try to retrieve the String.Trim(Char[]) method overload from IronRuby... how do you achieve that? Many thanks, Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Fri Jun 12 03:43:48 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 12 Jun 2009 09:43:48 +0200 Subject: [Ironruby-core] Creating a .Net Array in IR In-Reply-To: References: Message-ID: One way would be to do something like this System::String.trim "a string".to_clr_string.to_char_array just about every class collection class in .NET allows you to initialize it with an IEnumerable of some sort so you can just use that constructor with a ruby array of objects --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Jun 12, 2009 at 9:28 AM, Shay Friedman wrote: > Hi, > > I'd like to create a .Net array of a certain type inside IronRuby. It's > needed, for example, for the overloads method. > For instance, try to retrieve the String.Trim(Char[]) method overload > from IronRuby... how do you achieve that? > > Many thanks, > Shay. > ---------------------------- > Shay Friedman > http://www.ironshay.com > Follow me: http://twitter.com/ironshay > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Fri Jun 12 03:53:10 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 12 Jun 2009 00:53:10 -0700 Subject: [Ironruby-core] Creating a .Net Array in IR In-Reply-To: References: Message-ID: System::Array.of(System::Char).new(10) instantiates an array of 10 characters. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Friday, June 12, 2009 12:28 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Creating a .Net Array in IR Hi, I'd like to create a .Net array of a certain type inside IronRuby. It's needed, for example, for the overloads method. For instance, try to retrieve the String.Trim(Char[]) method overload from IronRuby... how do you achieve that? Many thanks, Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Fri Jun 12 03:56:33 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Fri, 12 Jun 2009 09:56:33 +0200 Subject: [Ironruby-core] Creating a .Net Array in IR In-Reply-To: References: Message-ID: <0603d3e5b0c73ed8c9fe49a59e546d4c@ruby-forum.com> Great! Thanks guys! Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Jun 12 11:22:12 2009 From: lists at ruby-forum.com (Michael Delaney) Date: Fri, 12 Jun 2009 17:22:12 +0200 Subject: [Ironruby-core] Calling Explicit Interfaces Message-ID: <278edf5bf3d08154e92d7ec8cd3b8961@ruby-forum.com> Hi, Is this still a bug i.e. bug #23494. i'm trying to use cucumber test a WPF app using the WPFAutomation. there's an explicit interface implementation of System.Windows.Automation.Provider.IInvokeProvider on the ButtonAutomationPeer class. at the moment i'm getting around it by creating a helper object in c# namespace UIAutomation { public class InvokeHelper { private readonly IInvokeProvider _provider; public InvokeHelper(IInvokeProvider provider) { _provider = provider; } public void Invoke(){ _provider.Invoke(); } } } and then call in IR: ih = InvokeHelper.new bp ih.invoke Is there another way to do this?? Regads. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Jun 12 12:33:01 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Fri, 12 Jun 2009 18:33:01 +0200 Subject: [Ironruby-core] How to fire IronRuby Method from C# In-Reply-To: <6f044baaf4f0c4076c94c857ce30d198@ruby-forum.com> References: <10dd786d6be33bcc2873c7827daaae6b@ruby-forum.com> <138aef8f4573e1e78b1ce04dd1cfee70@ruby-forum.com> <7aafaf410546f9345510a3c950ac7395@ruby-forum.com> <050271010fb312f67a9b1d82365baf18@ruby-forum.com> <6f044baaf4f0c4076c94c857ce30d198@ruby-forum.com> Message-ID: Yup! that did the trick! Thanks a million :) -- Posted via http://www.ruby-forum.com/. From curth at microsoft.com Fri Jun 12 13:41:10 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 12 Jun 2009 10:41:10 -0700 Subject: [Ironruby-core] engine.ExecuteFile gives errors In-Reply-To: References: Message-ID: Is it possible that you've saved the file as UTF-8 or Unicode? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Wednesday, June 10, 2009 9:55 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] engine.ExecuteFile gives errors I am using the following code to execute a Ruby file from C# but it gives me the error: var runtime = IronRuby.Ruby.CreateRuntime(); var engine = runtime.GetEngine("rb"); engine.ExecuteFile("../../HelloWorld.rb"); And here is the error: Unhandled Exception: Microsoft.Scripting.SyntaxErrorException: syntax error, une xpected END, expecting END_OF_FILE at Microsoft.Scripting.ErrorSink.Add(SourceUnit source, String message, Sourc eSpan span, Int32 errorCode, Severity severity) at Microsoft.Scripting.ErrorCounter.Add(SourceUnit source, String message, So urceSpan span, Int32 errorCode, Severity severity) at IronRuby.Compiler.Parser.ReportSyntaxError(String message) at IronRuby.Compiler.Parser.ErrorRecovery() at IronRuby.Compiler.Parser.Parse() at IronRuby.Compiler.Parser.Parse(SourceUnit sourceUnit, RubyCompilerOptions options, ErrorSink errorSink) at IronRuby.Runtime.RubyContext.ParseSourceCode[T](SourceUnit sourceUnit, Rub yCompilerOptions options, ErrorSink errorSink) at IronRuby.Runtime.RubyContext.CompileSourceCode(SourceUnit sourceUnit, Comp ilerOptions options, ErrorSink errorSink) at Microsoft.Scripting.SourceUnit.Compile(CompilerOptions options, ErrorSink errorSink) And here is the Ruby file: class Person def foo() puts 'hello world' end end person = Person.new() person.foo() -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Fri Jun 12 13:52:26 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Fri, 12 Jun 2009 19:52:26 +0200 Subject: [Ironruby-core] engine.ExecuteFile gives errors In-Reply-To: References: Message-ID: <4b41635e53e7892845adab1b74c9aeef@ruby-forum.com> Curt Hagenlocher wrote: > Is it possible that you've saved the file as UTF-8 or Unicode? Well I just created a text file with ".rb" extension. -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Fri Jun 12 14:03:54 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 12 Jun 2009 20:03:54 +0200 Subject: [Ironruby-core] engine.ExecuteFile gives errors In-Reply-To: <4b41635e53e7892845adab1b74c9aeef@ruby-forum.com> References: <4b41635e53e7892845adab1b74c9aeef@ruby-forum.com> Message-ID: That is a problem because visual studio adds UTF-8 encoding to that file. I created one file in notepad and made a template from that file and I use that template to create new ruby files in visual studio. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Jun 12, 2009 at 7:52 PM, Mohammad Azam wrote: > Curt Hagenlocher wrote: > > Is it possible that you've saved the file as UTF-8 or Unicode? > > Well I just created a text file with ".rb" extension. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From curth at microsoft.com Fri Jun 12 14:04:30 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 12 Jun 2009 11:04:30 -0700 Subject: [Ironruby-core] Code Review: FixNonPublicNested In-Reply-To: References: Message-ID: All of yesterday's changes :) look good. -----Original Message----- From: Tomas Matousek Sent: Thursday, June 11, 2009 6:45 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: FixNonPublicNested tfpt review "/shelveset:FixNonPublicNested;REDMOND\tomat" Comment : Fixes bug http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1506: -X:PrivateBinding does not enable referring to classes that have internal visibility Title is required. Tomas From curth at microsoft.com Fri Jun 12 14:07:00 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Fri, 12 Jun 2009 11:07:00 -0700 Subject: [Ironruby-core] engine.ExecuteFile gives errors In-Reply-To: <4b41635e53e7892845adab1b74c9aeef@ruby-forum.com> References: <4b41635e53e7892845adab1b74c9aeef@ruby-forum.com> Message-ID: Here's the easiest way I know how to check: 1. Open the file in Notepad 2. Choose "File | Save As" 3. Look at the value for "Encoding". If it's anything other than "ANSI", change the encoding to ANSI, save the file and try again. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Friday, June 12, 2009 10:52 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] engine.ExecuteFile gives errors Curt Hagenlocher wrote: > Is it possible that you've saved the file as UTF-8 or Unicode? Well I just created a text file with ".rb" extension. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Fri Jun 12 14:14:56 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Fri, 12 Jun 2009 20:14:56 +0200 Subject: [Ironruby-core] engine.ExecuteFile gives errors In-Reply-To: References: <4b41635e53e7892845adab1b74c9aeef@ruby-forum.com> Message-ID: <9b0263af7a5aecb5760814f20dcc52f7@ruby-forum.com> Awesome guys I got it working! Thanks a million! :) -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Jun 12 14:21:56 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Fri, 12 Jun 2009 20:21:56 +0200 Subject: [Ironruby-core] Calling super in virtual method implementation Message-ID: Hi, I'm trying to implement a CLR virtual method in IronRuby and call super within it (so the default implementation will be executed as well). I then get this error: mscorlib:0:in `get_MethodHandle': The requested operation is invalid for DynamicMethod. (TypeError) Is it a bug or a by design behavior? Thanks! Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Jun 13 01:25:05 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Sat, 13 Jun 2009 07:25:05 +0200 Subject: [Ironruby-core] Error on Names documentation page Message-ID: <2ac0b3f59866795001ef5eba6c948e84@ruby-forum.com> Hi, On the Names page in IronRuby.net: http://www.ironruby.net/Documentation/.NET/Names I think there is a mistake. Bullet #4 says you must implement virtual methods with their rubyesque name. I tried using the CLR name and it seems to work great as well. FYI, Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Jun 13 02:15:59 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Sat, 13 Jun 2009 08:15:59 +0200 Subject: [Ironruby-core] Error on Names documentation page In-Reply-To: <2ac0b3f59866795001ef5eba6c948e84@ruby-forum.com> References: <2ac0b3f59866795001ef5eba6c948e84@ruby-forum.com> Message-ID: However, it is right when overriding CLR static methods. Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From Tomas.Matousek at microsoft.com Sat Jun 13 03:35:05 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 13 Jun 2009 00:35:05 -0700 Subject: [Ironruby-core] Error on Names documentation page In-Reply-To: References: <2ac0b3f59866795001ef5eba6c948e84@ruby-forum.com> Message-ID: Can you give an example? I'm not sure what do you mean by "overriding" static methods. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Friday, June 12, 2009 11:16 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Error on Names documentation page However, it is right when overriding CLR static methods. Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Sat Jun 13 04:11:19 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Sat, 13 Jun 2009 10:11:19 +0200 Subject: [Ironruby-core] Error on Names documentation page In-Reply-To: References: <2ac0b3f59866795001ef5eba6c948e84@ruby-forum.com> Message-ID: <1f15c4e5da1b06ca0de13e65891b6004@ruby-forum.com> Sure. C#: public class Something { public static Create() { Console.WriteLine("Creating Something"); return new Something(); } public Something() { } } IR: class SomeSomething < Something def self.create puts "Creating SomeSomething!" super end end SomeSomething.create # prints "Creating SomeSomething! # Creating Something" If the IR method was named self.Create (with a capital C), the next will happen: SomeSomething.create # prints "Creating Something" Thanks, Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Jun 13 04:22:11 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Sat, 13 Jun 2009 10:22:11 +0200 Subject: [Ironruby-core] Sealed method can be overriden Message-ID: <8c8d78710a72991712e5f7310c5e0ed1@ruby-forum.com> Hi guys, I'm trying to override a sealed method in IR and I succeed. For example: C#: public class Shape { public virtual int GetNumberOfSizes() { return 0; } } public class Square : Shape { public override sealed int GetNumberOfSizes() { return 4; } } IR: class NewSquare < Square def get_number_of_sizes return 99 end end puts NewSquare.new.get_number_of_sizes # => 99 Bug or by design? Thanks, Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Jun 13 07:17:18 2009 From: lists at ruby-forum.com (Michael Delaney) Date: Sat, 13 Jun 2009 13:17:18 +0200 Subject: [Ironruby-core] IDE, Tools etc. Message-ID: <18b8736f7669b796fadba1104ddd00c0@ruby-forum.com> hi, i was wondering what people are using tool wise at the moment.. in rails development i've been using textmate & rubymine but on windows i've been using powershell and notepad++. i've got visual studio installed and gave the ruby in steel thing a try which looks ok but doesnt seem to run ir.exe. i'm going to give e-texteditor a go too.. are people also using vim??? cheers. -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Sat Jun 13 10:48:55 2009 From: jdeville at microsoft.com (Jim Deville) Date: Sat, 13 Jun 2009 14:48:55 +0000 Subject: [Ironruby-core] IDE, Tools etc. Message-ID: I'm using gvim for most of my development. I use PowerShell for my command line. -----Original Message----- From: Michael Delaney Sent: June 13, 2009 4:43 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] IDE, Tools etc. hi, i was wondering what people are using tool wise at the moment.. in rails development i've been using textmate & rubymine but on windows i've been using powershell and notepad++. i've got visual studio installed and gave the ruby in steel thing a try which looks ok but doesnt seem to run ir.exe. i'm going to give e-texteditor a go too.. are people also using vim??? cheers. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From ivan at flanders.co.nz Sat Jun 13 11:10:51 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sat, 13 Jun 2009 17:10:51 +0200 Subject: [Ironruby-core] IDE, Tools etc. In-Reply-To: References: Message-ID: I'm mostly using rubymine these days but mostly as editor.all interactive stuff i do in powershell --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Jun 13, 2009 at 4:48 PM, Jim Deville wrote: > I'm using gvim for most of my development. I use PowerShell for my command > line. > > -----Original Message----- > From: Michael Delaney > Sent: June 13, 2009 4:43 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] IDE, Tools etc. > > > hi, > > i was wondering what people are using tool wise at the moment.. > in rails development i've been using textmate & rubymine > but on windows i've been using powershell and notepad++. > i've got visual studio installed and gave the ruby in steel thing a try > which looks ok but doesnt seem to run ir.exe. > > i'm going to give e-texteditor a go too.. > are people also using vim??? > > cheers. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > 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: From Tomas.Matousek at microsoft.com Sat Jun 13 12:19:45 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 13 Jun 2009 09:19:45 -0700 Subject: [Ironruby-core] Error on Names documentation page In-Reply-To: <1f15c4e5da1b06ca0de13e65891b6004@ruby-forum.com> References: <2ac0b3f59866795001ef5eba6c948e84@ruby-forum.com> <1f15c4e5da1b06ca0de13e65891b6004@ruby-forum.com> Message-ID: I see what you mean. I wouldn't call this "overriding" because these two methods are completely unrelated. So it's like you defined two Ruby methods Create and create. On the other hand, when a virtual method is overridden the override is bound to the virtual one. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Saturday, June 13, 2009 1:11 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Error on Names documentation page Sure. C#: public class Something { public static Create() { Console.WriteLine("Creating Something"); return new Something(); } public Something() { } } IR: class SomeSomething < Something def self.create puts "Creating SomeSomething!" super end end SomeSomething.create # prints "Creating SomeSomething! # Creating Something" If the IR method was named self.Create (with a capital C), the next will happen: SomeSomething.create # prints "Creating Something" Thanks, Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Sat Jun 13 12:32:37 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Sat, 13 Jun 2009 18:32:37 +0200 Subject: [Ironruby-core] Sealed method can be overriden In-Reply-To: References: <8c8d78710a72991712e5f7310c5e0ed1@ruby-forum.com> <43769a4a0906130136p17eccfa1o9478530224495041@mail.gmail.com> Message-ID: <42dc5dd98c4cdfc5e4ba8c7d48bc0847@ruby-forum.com> Is there something special that needs to be done when overriding CLR methods (like C#'s override keyword)? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Jun 13 12:36:01 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Sat, 13 Jun 2009 18:36:01 +0200 Subject: [Ironruby-core] IDE, Tools etc. In-Reply-To: References: Message-ID: I use NetBeans (even though it doesn't want to play nice with ir.exe). Also SciTE, which comes with the Ruby installation package, is good for small apps and scripts. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sat Jun 13 13:09:56 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Sat, 13 Jun 2009 19:09:56 +0200 Subject: [Ironruby-core] Sealed method can be overriden In-Reply-To: <42dc5dd98c4cdfc5e4ba8c7d48bc0847@ruby-forum.com> References: <8c8d78710a72991712e5f7310c5e0ed1@ruby-forum.com> <43769a4a0906130136p17eccfa1o9478530224495041@mail.gmail.com> <42dc5dd98c4cdfc5e4ba8c7d48bc0847@ruby-forum.com> Message-ID: <3adf4d0b7deee111910ee4cf20b7d0c7@ruby-forum.com> And also - with regular methods (not abstract, virtual sealed or whatever), when I inherit them in IR - are the just hidden like the static methods? Thanks! Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From Tomas.Matousek at microsoft.com Sat Jun 13 14:23:01 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 13 Jun 2009 11:23:01 -0700 Subject: [Ironruby-core] Sealed method can be overriden In-Reply-To: <42dc5dd98c4cdfc5e4ba8c7d48bc0847@ruby-forum.com> References: <8c8d78710a72991712e5f7310c5e0ed1@ruby-forum.com> <43769a4a0906130136p17eccfa1o9478530224495041@mail.gmail.com> <42dc5dd98c4cdfc5e4ba8c7d48bc0847@ruby-forum.com> Message-ID: No. We override the method if there is a non-sealed virtual in the base class that has the same or un-mangled name. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Saturday, June 13, 2009 9:33 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Sealed method can be overriden Is there something special that needs to be done when overriding CLR methods (like C#'s override keyword)? -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Sat Jun 13 14:24:35 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 13 Jun 2009 11:24:35 -0700 Subject: [Ironruby-core] Sealed method can be overriden In-Reply-To: <3adf4d0b7deee111910ee4cf20b7d0c7@ruby-forum.com> References: <8c8d78710a72991712e5f7310c5e0ed1@ruby-forum.com> <43769a4a0906130136p17eccfa1o9478530224495041@mail.gmail.com> <42dc5dd98c4cdfc5e4ba8c7d48bc0847@ruby-forum.com> <3adf4d0b7deee111910ee4cf20b7d0c7@ruby-forum.com> Message-ID: Yes, sealed virtual and "regular" methods have the same behavior. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Saturday, June 13, 2009 10:10 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Sealed method can be overriden And also - with regular methods (not abstract, virtual sealed or whatever), when I inherit them in IR - are the just hidden like the static methods? Thanks! Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Sat Jun 13 15:03:21 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Sat, 13 Jun 2009 21:03:21 +0200 Subject: [Ironruby-core] Sealed method can be overriden In-Reply-To: References: <8c8d78710a72991712e5f7310c5e0ed1@ruby-forum.com> <43769a4a0906130136p17eccfa1o9478530224495041@mail.gmail.com> <42dc5dd98c4cdfc5e4ba8c7d48bc0847@ruby-forum.com> <3adf4d0b7deee111910ee4cf20b7d0c7@ruby-forum.com> Message-ID: <531f0ab99f10c2e3389b515690984e11@ruby-forum.com> There is a slight difference though. In the example: puts NewSquare.new.get_number_of_sizes # => 99 puts NewSquare.new.GetNumberOfSizes # => 4 If I change the example to a regular method (not sealed), the output is slightly different: puts NewSquare.new.get_number_of_sizes # => 99 puts NewSquare.new.GetNumberOfSizes # => 99 Thanks, Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From Tomas.Matousek at microsoft.com Sat Jun 13 15:28:13 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 13 Jun 2009 12:28:13 -0700 Subject: [Ironruby-core] Sealed method can be overriden In-Reply-To: <531f0ab99f10c2e3389b515690984e11@ruby-forum.com> References: <8c8d78710a72991712e5f7310c5e0ed1@ruby-forum.com> <43769a4a0906130136p17eccfa1o9478530224495041@mail.gmail.com> <42dc5dd98c4cdfc5e4ba8c7d48bc0847@ruby-forum.com> <3adf4d0b7deee111910ee4cf20b7d0c7@ruby-forum.com> <531f0ab99f10c2e3389b515690984e11@ruby-forum.com> Message-ID: That's expected. If you change "sealed override" to just "override" the method is virtual and Ruby subclasses will override it. In both cases NewSquare.new.GetNumberOfSizes finds CLR method Square::GetNumberOfSizes and invokes it. In the first case, the method is not overridden and therefore the implementation in Square gets executed. Without "sealed" the method is overridden by NewSquare#get_number_of_sizes and therefore the virtual dispatch executes NewSquare's implementation. In both cases NewSquare.new.get_number_of_sizes finds Ruby method NewSquare#get_number_of_sizes and executes it. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Saturday, June 13, 2009 12:03 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Sealed method can be overriden There is a slight difference though. In the example: puts NewSquare.new.get_number_of_sizes # => 99 puts NewSquare.new.GetNumberOfSizes # => 4 If I change the example to a regular method (not sealed), the output is slightly different: puts NewSquare.new.get_number_of_sizes # => 99 puts NewSquare.new.GetNumberOfSizes # => 99 Thanks, Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Sat Jun 13 15:35:49 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Sat, 13 Jun 2009 21:35:49 +0200 Subject: [Ironruby-core] Sealed method can be overriden In-Reply-To: References: <8c8d78710a72991712e5f7310c5e0ed1@ruby-forum.com> <43769a4a0906130136p17eccfa1o9478530224495041@mail.gmail.com> <42dc5dd98c4cdfc5e4ba8c7d48bc0847@ruby-forum.com> <3adf4d0b7deee111910ee4cf20b7d0c7@ruby-forum.com> <531f0ab99f10c2e3389b515690984e11@ruby-forum.com> Message-ID: The same happens with non-virtual methods as well. By the way, should you be able to call super when you override a virtual method? Thanks, Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From Tomas.Matousek at microsoft.com Sat Jun 13 15:49:22 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 13 Jun 2009 12:49:22 -0700 Subject: [Ironruby-core] Sealed method can be overriden In-Reply-To: References: <8c8d78710a72991712e5f7310c5e0ed1@ruby-forum.com> <43769a4a0906130136p17eccfa1o9478530224495041@mail.gmail.com> <42dc5dd98c4cdfc5e4ba8c7d48bc0847@ruby-forum.com> <3adf4d0b7deee111910ee4cf20b7d0c7@ruby-forum.com> <531f0ab99f10c2e3389b515690984e11@ruby-forum.com> Message-ID: C#: public class C { public int FooBar() { return 123; } } Ruby: require 'x.dll' class D < C def foo_bar 48 end end p D.new.FooBar # => 123 p D.new.foo_bar # => 48 The same rules hold here: foo_bar does NOT override FooBar (since FooBar is not virtual) and therefore is an unrelated method. So the first call resolves to C::FooBar and invokes it. The second call resolves to D#foo_bar and invokes it. Only if there wasn't foo_bar or FooBar defined in D this call would resolve to C::FooBar. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Saturday, June 13, 2009 12:36 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Sealed method can be overriden The same happens with non-virtual methods as well. By the way, should you be able to call super when you override a virtual method? Thanks, Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From Tomas.Matousek at microsoft.com Sat Jun 13 16:10:59 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 13 Jun 2009 13:10:59 -0700 Subject: [Ironruby-core] Sealed method can be overriden In-Reply-To: References: <8c8d78710a72991712e5f7310c5e0ed1@ruby-forum.com> <43769a4a0906130136p17eccfa1o9478530224495041@mail.gmail.com> <42dc5dd98c4cdfc5e4ba8c7d48bc0847@ruby-forum.com> <3adf4d0b7deee111910ee4cf20b7d0c7@ruby-forum.com> <531f0ab99f10c2e3389b515690984e11@ruby-forum.com> Message-ID: Yes, super should work if the calling method is in a Ruby base class. C#: public class C { public virtual int FooBar() { return 123; } } Ruby: class D < C def foo_bar 10 * super end end p D.new.FooBar p D.new.foo_bar (there is a bug in the current bits that makes it throw an exception: `get_MethodHandle': The requested operation is invalid for DynamicMethod. (TypeError), I'll fix it asap). Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Saturday, June 13, 2009 12:36 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Sealed method can be overriden The same happens with non-virtual methods as well. By the way, should you be able to call super when you override a virtual method? Thanks, Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Sat Jun 13 16:13:54 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Sat, 13 Jun 2009 22:13:54 +0200 Subject: [Ironruby-core] Sealed method can be overriden In-Reply-To: References: <8c8d78710a72991712e5f7310c5e0ed1@ruby-forum.com> <43769a4a0906130136p17eccfa1o9478530224495041@mail.gmail.com> <42dc5dd98c4cdfc5e4ba8c7d48bc0847@ruby-forum.com> <3adf4d0b7deee111910ee4cf20b7d0c7@ruby-forum.com> <531f0ab99f10c2e3389b515690984e11@ruby-forum.com> Message-ID: <8a17bd3785892a5c1eef663ec6d6cda0@ruby-forum.com> Thanks so much for the answers Tomas! ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From sanxiyn at gmail.com Sat Jun 13 20:58:17 2009 From: sanxiyn at gmail.com (Seo Sanghyeon) Date: Sun, 14 Jun 2009 09:58:17 +0900 Subject: [Ironruby-core] IDE, Tools etc. In-Reply-To: <18b8736f7669b796fadba1104ddd00c0@ruby-forum.com> References: <18b8736f7669b796fadba1104ddd00c0@ruby-forum.com> Message-ID: <5b0248170906131758r796980a6ie1bea004fb2c6a48@mail.gmail.com> 2009/6/13 Michael Delaney : > i was wondering what people are using tool wise at the moment.. I am using Vim with cmd.exe on Windows, bash on Linux. -- Seo Sanghyeon From will at hotgazpacho.org Sun Jun 14 01:48:26 2009 From: will at hotgazpacho.org (Will Green) Date: Sun, 14 Jun 2009 01:48:26 -0400 Subject: [Ironruby-core] Cucumber status In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E207FEF11@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <903f202085dd1b97b4572b129eee7fb3@ruby-forum.com> <710DF26F214D2B4BB94287123FFE980A2E207FEF11@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <398d3e0e0906132248n29d1f27g28a2ba14ce1a883f@mail.gmail.com> I just wrote up a blog post detailing, step by step, the process I followed to get Cucumber working with IronRuby. May be old hat to some of you, but I figured that documenting my process might help others going forward. http://hotgazpacho.org/2009/06/cucumber-and-ironruby-it-runs/ -- Will Green http://willgreen.mp/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Sun Jun 14 14:42:55 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Sun, 14 Jun 2009 18:42:55 +0000 Subject: [Ironruby-core] Cucumber status In-Reply-To: <398d3e0e0906132248n29d1f27g28a2ba14ce1a883f@mail.gmail.com> References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <903f202085dd1b97b4572b129eee7fb3@ruby-forum.com> <710DF26F214D2B4BB94287123FFE980A2E207FEF11@NA-EXMSG-C104.redmond.corp.microsoft.com> <398d3e0e0906132248n29d1f27g28a2ba14ce1a883f@mail.gmail.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC14389FE6@tk5ex14mbxc105.redmond.corp.microsoft.com> Thanks for the post! It will be very useful to people wanting to use it. Mind if I put something similar on the ?Real Ruby applications and libraries? page? http://ironruby.net/Documentation/Real_Ruby_Applications I have comment about the last section: SUPER IMPORTANT NOTE! Any time you rebuild IronRuby, the C# compiler will erase the contents of the directory C:\Development\IronRuby\Merlin\Main\Bin\Debug. This includes the cucumber and cucumber.bat files. The only way I know to rectify this is to igem install -?no-rdoc -?no-ri cucumber once again. To avoid doing this, just have people create the cucumber.bat/cucumber files in Merlin/Main/Languages/Ruby/Scripts/bin, where all the other files like that are (rails.bat, rake.bat, etc). I believe that directory already copies to a build?s $(TargetDir), but if not you can either just add it to the path or make it copy. ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Will Green Sent: Saturday, June 13, 2009 10:48 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber status I just wrote up a blog post detailing, step by step, the process I followed to get Cucumber working with IronRuby. May be old hat to some of you, but I figured that documenting my process might help others going forward. http://hotgazpacho.org/2009/06/cucumber-and-ironruby-it-runs/ -- Will Green http://willgreen.mp/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From will at hotgazpacho.org Sun Jun 14 15:29:28 2009 From: will at hotgazpacho.org (Will Green) Date: Sun, 14 Jun 2009 15:29:28 -0400 Subject: [Ironruby-core] Cucumber status In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC14389FE6@tk5ex14mbxc105.redmond.corp.microsoft.com> References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <903f202085dd1b97b4572b129eee7fb3@ruby-forum.com> <710DF26F214D2B4BB94287123FFE980A2E207FEF11@NA-EXMSG-C104.redmond.corp.microsoft.com> <398d3e0e0906132248n29d1f27g28a2ba14ce1a883f@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC14389FE6@tk5ex14mbxc105.redmond.corp.microsoft.com> Message-ID: <294BDDB1-0FBA-40E6-AE03-D769C1F3C654@hotgazpacho.org> My pleasure! I hope others will find the guide helpful. Pleas feel free to link to the post and publicize it any way you see fit. As for the cucumber executables (cucumber & cucumber.bat), or any gem that installs executable commands, these files are installed by the gem command, by default, in the same directory as the ruby executable. Perhaps some combination of setting GEM_HOME and GEM_PATH could allow them to be installed elsewhere? My RubyGems-foo is not yet advanced enough. I would hate for this to be a manual process for every gem install, every time you rebuild IronRuby. I'm open to suggestions on automating this, and ammending the post. -- Will Green http://willgreen.mp/ On Jun 14, 2009, at 2:42 PM, Jimmy Schementi wrote: > Thanks for the post! It will be very useful to people wanting to use > it. Mind if I put something similar on the ?Real Ruby applications a > nd libraries? page? http://ironruby.net/Documentation/Real_Ruby_Applicatio > ns > > > > I have comment about the last section: > > SUPER IMPORTANT NOTE! > > Any time you rebuild IronRuby, the C# compiler will erase the > contents of the directory C:\Development\IronRuby\Merlin\Main\Bin > \Debug. This includes the cucumber and cucumber.bat files. The only > way I know to rectify this is to igem install -?no-rdoc -?no-ri > cucumber once again. > > To avoid doing this, just have people create the cucumber.bat/ > cucumber files in Merlin/Main/Languages/Ruby/Scripts/bin, where all > the other files like that are (rails.bat, rake.bat, etc). I believe > that directory already copies to a build?s $(TargetDir), but if not > you can either just add it to the path or make it copy. > > > > ~js > > > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org > ] On Behalf Of Will Green > Sent: Saturday, June 13, 2009 10:48 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber status > > > > I just wrote up a blog post detailing, step by step, the process I > followed to get Cucumber working with IronRuby. May be old hat to > some of you, but I figured that documenting my process might help > others going forward. > > > > http://hotgazpacho.org/2009/06/cucumber-and-ironruby-it-runs/ > > > > -- > > Will Green > http://willgreen.mp/ > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From will at hotgazpacho.org Sun Jun 14 20:36:45 2009 From: will at hotgazpacho.org (Will Green) Date: Sun, 14 Jun 2009 20:36:45 -0400 Subject: [Ironruby-core] Cucumber status In-Reply-To: References: Message-ID: <398d3e0e0906141736j230e5e8dhcb766ca2a2955baa@mail.gmail.com> Looks like the GEM_BIN environment variable is one way folks swap between 1.8.6 and 1.9.1 of MRI on the same machine: http://www.jurisgalang.com/articles/show/Dual%20Ruby%20Installation I'll investigate setting this, along with GEM_HOME and GEM_PATH in dev.bat to the directory tree Jimmy suggested, and report back. Thanks for the pointer! -- Will Green http://willgreen.mp/ On Sun, Jun 14, 2009 at 6:25 PM, Jim Deville wrote: > One option is the bin folder that Jimmy suggested which is put into your path by the dev.bat script. > > I also want to say there is a GEMBIN environment variable or config option (for .gemrc or the gem command line), but I don't remember for certain. > > JD > > -----Original Message----- > From: Will Green > Sent: June 14, 2009 12:29 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber status > > > My pleasure! I hope others will find the guide helpful. Pleas feel free > to link to the post and publicize it any way you see fit. > > As for the cucumber executables (cucumber & cucumber.bat), or any gem > that installs executable commands, these files are installed by the gem > command, by default, in the same directory as the ruby executable. Perhaps > some combination of setting GEM_HOME and GEM_PATH could allow them to be > installed elsewhere? My RubyGems-foo is not yet advanced enough. > > I would hate for this to be a manual process for every gem install, every > time you rebuild IronRuby. I'm open to suggestions on automating this, and > ammending the post. > > -- Will Green > http://willgreen.mp/ > > > > On Jun 14, 2009, at 2:42 PM, Jimmy Schementi < > Jimmy.Schementi at microsoft.com> wrote: > > Thanks for the post! It will be very useful to people wanting to use > it. Mind if I put something similar on the ?Real Ruby applications and > libraries? page? > > http://ironruby.net/Documentation/Real_Ruby_Applications > > > > I have comment about the last section: > > *SUPER IMPORTANT NOTE!* > > Any time you rebuild IronRuby, the C# compiler will erase the contents of > the directory C:\Development\IronRuby\Merlin\Main\Bin\Debug. This includes > the cucumber and cucumber.bat files. The only way I know to rectify this is > to igem install -?no-rdoc -?no-ri cucumber once again. > > To avoid doing this, just have people create the cucumber.bat/cucumberfiles in Merlin/Main/Languages/Ruby/Scripts/bin, where all the other files > like that are (rails.bat, rake.bat, etc). I believe that directory already > copies to a build?s $(TargetDir), but if not you can either just add it to > the path or make it copy. > > > > ~js > > > > *From:* ironruby-core-bounces at rubyforge.org [ > mailto:ironruby-core-bounces at rubyforge.org] > *On Behalf Of *Will Green > *Sent:* Saturday, June 13, 2009 10:48 PM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Cucumber status > > > > I just wrote up a blog post detailing, step by step, the process I followed > to get Cucumber working with IronRuby. May be old hat to some of you, but I > figured that documenting my process might help others going forward. > > > > > http://hotgazpacho.org/2009/06/cucumber-and-ironruby-it-runs/ > > > > -- > > Will Green > http://willgreen.mp/ > > _______________________________________________ > 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: From will at hotgazpacho.org Mon Jun 15 00:22:03 2009 From: will at hotgazpacho.org (Will Green) Date: Mon, 15 Jun 2009 00:22:03 -0400 Subject: [Ironruby-core] Cucumber status In-Reply-To: <398d3e0e0906141736j230e5e8dhcb766ca2a2955baa@mail.gmail.com> References: <398d3e0e0906141736j230e5e8dhcb766ca2a2955baa@mail.gmail.com> Message-ID: <398d3e0e0906142122t500d911ejb6aff90417e605fb@mail.gmail.com> Ah ha! The key is to pass a --bindir argument to igem. I've updated my post to reflect this change. Thanks, Jimmy and Jim! -- Will Green http://willgreen.mp/ On Sun, Jun 14, 2009 at 8:36 PM, Will Green wrote: > Looks like the GEM_BIN environment variable is one way folks swap between > 1.8.6 and 1.9.1 of MRI on the same machine: > http://www.jurisgalang.com/articles/show/Dual%20Ruby%20Installation > > I'll > investigate setting this, along with GEM_HOME and GEM_PATH in dev.bat to the > directory tree Jimmy suggested, and report back. Thanks for the pointer! > > -- > Will Green > http://willgreen.mp/ > > > On Sun, Jun 14, 2009 at 6:25 PM, Jim Deville wrote: > >> One option is the bin folder that Jimmy suggested which is put into your path by the dev.bat script. >> >> I also want to say there is a GEMBIN environment variable or config option (for .gemrc or the gem command line), but I don't remember for certain. >> >> JD >> >> -----Original Message----- >> From: Will Green >> Sent: June 14, 2009 12:29 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] Cucumber status >> >> >> My pleasure! I hope others will find the guide helpful. Pleas feel free >> to link to the post and publicize it any way you see fit. >> >> As for the cucumber executables (cucumber & cucumber.bat), or any gem >> that installs executable commands, these files are installed by the gem >> command, by default, in the same directory as the ruby executable. Perhaps >> some combination of setting GEM_HOME and GEM_PATH could allow them to be >> installed elsewhere? My RubyGems-foo is not yet advanced enough. >> >> I would hate for this to be a manual process for every gem install, >> every time you rebuild IronRuby. I'm open to suggestions on automating this, >> and ammending the post. >> >> -- Will Green >> http://willgreen.mp/ >> >> >> >> On Jun 14, 2009, at 2:42 PM, Jimmy Schementi < >> Jimmy.Schementi at microsoft.com> wrote: >> >> Thanks for the post! It will be very useful to people wanting to use >> it. Mind if I put something similar on the ?Real Ruby applications and >> libraries? page? >> >> http://ironruby.net/Documentation/Real_Ruby_Applications >> >> >> >> I have comment about the last section: >> >> *SUPER IMPORTANT NOTE!* >> >> Any time you rebuild IronRuby, the C# compiler will erase the contents of >> the directory C:\Development\IronRuby\Merlin\Main\Bin\Debug. This >> includes the cucumber and cucumber.bat files. The only way I know to rectify >> this is to igem install -?no-rdoc -?no-ri cucumber once again. >> >> To avoid doing this, just have people create the cucumber.bat/cucumberfiles in Merlin/Main/Languages/Ruby/Scripts/bin, where all the other files >> like that are (rails.bat, rake.bat, etc). I believe that directory already >> copies to a build?s $(TargetDir), but if not you can either just add it to >> the path or make it copy. >> >> >> >> ~js >> >> >> >> *From:* ironruby-core-bounces at rubyforge.org [ >> mailto:ironruby-core-bounces at rubyforge.org] >> *On Behalf Of *Will Green >> *Sent:* Saturday, June 13, 2009 10:48 PM >> *To:* ironruby-core at rubyforge.org >> *Subject:* Re: [Ironruby-core] Cucumber status >> >> >> >> I just wrote up a blog post detailing, step by step, the process I >> followed to get Cucumber working with IronRuby. May be old hat to some of >> you, but I figured that documenting my process might help others going >> forward. >> >> >> >> >> http://hotgazpacho.org/2009/06/cucumber-and-ironruby-it-runs/ >> >> >> >> -- >> >> Will Green >> http://willgreen.mp/ >> >> _______________________________________________ >> 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: From robert.brotherus at napa.fi Tue Jun 16 07:01:05 2009 From: robert.brotherus at napa.fi (Robert Brotherus) Date: Tue, 16 Jun 2009 14:01:05 +0300 Subject: [Ironruby-core] Method name case mungling broken in latest IR? In-Reply-To: References: <0047ECBFA2E0DF4A834AA369282A5AFC1438D418@tk5ex14mbxc105.redmond.corp.microsoft.com> Message-ID: <16A7DD08F0425648AB80B28A3453C40B1AF07F@NW60R2.napa.fi> With IR 0.3 release we have: c:\work\napa.net\NapaRuby>\work\tools\ruby\ironruby-0.3.0\bin\ir.exe IronRuby 0.3.0.0 on .NET 2.0.50727.3074 Copyright (c) Microsoft Corporation. All rights reserved. >>> x="abc".to_clr_string => 'abc' We can call x.GetType method in "ruby case": >>> x.get_type => # With a recent codebase from: http://www.codeplex.com/dlr/SourceControl/ListDownloadableCommits.aspx ChangeSet 25140 c:\work\napa.net\NapaRuby>ir IronRuby 0.5.0.0 on .NET 2.0.50727.3074 Copyright (c) Microsoft Corporation. All rights reserved. >>> x=System::String.new('abc') => 'abc' >>> x.get_type :0:in `__send__': undefined method `get_type' for "abc":String (NoMethodError) from C:\...\IronRuby.Libraries\Builtins\KernelOps.cs:1421:in `SendMessageOpt' We can still use the original method name: >>> x.GetType => System.String I suppose the apparent dropping of support for name-mungling is not intentional? Robert J. Brotherus Napa Inc. From Tomas.Matousek at microsoft.com Tue Jun 16 11:49:25 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 16 Jun 2009 08:49:25 -0700 Subject: [Ironruby-core] Method name case mungling broken in latest IR? In-Reply-To: <16A7DD08F0425648AB80B28A3453C40B1AF07F@NW60R2.napa.fi> References: <0047ECBFA2E0DF4A834AA369282A5AFC1438D418@tk5ex14mbxc105.redmond.corp.microsoft.com> <16A7DD08F0425648AB80B28A3453C40B1AF07F@NW60R2.napa.fi> Message-ID: It is in fact intentional - mangled names are disabled for built-in types (Object, Fixnum, String, etc.) since there were problems with name conflicts in various Ruby apps. The mangling is still on for other CLR types. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Robert Brotherus Sent: Tuesday, June 16, 2009 4:01 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Method name case mungling broken in latest IR? With IR 0.3 release we have: c:\work\napa.net\NapaRuby>\work\tools\ruby\ironruby-0.3.0\bin\ir.exe IronRuby 0.3.0.0 on .NET 2.0.50727.3074 Copyright (c) Microsoft Corporation. All rights reserved. >>> x="abc".to_clr_string => 'abc' We can call x.GetType method in "ruby case": >>> x.get_type => # With a recent codebase from: http://www.codeplex.com/dlr/SourceControl/ListDownloadableCommits.aspx ChangeSet 25140 c:\work\napa.net\NapaRuby>ir IronRuby 0.5.0.0 on .NET 2.0.50727.3074 Copyright (c) Microsoft Corporation. All rights reserved. >>> x=System::String.new('abc') => 'abc' >>> x.get_type :0:in `__send__': undefined method `get_type' for "abc":String (NoMethodError) from C:\...\IronRuby.Libraries\Builtins\KernelOps.cs:1421:in `SendMessageOpt' We can still use the original method name: >>> x.GetType => System.String I suppose the apparent dropping of support for name-mungling is not intentional? Robert J. Brotherus Napa Inc. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Tue Jun 16 12:04:14 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 16 Jun 2009 18:04:14 +0200 Subject: [Ironruby-core] Accessing Enumeration in IronRuby Message-ID: <19e62bbc95916aab8b55702a8a94b5bc@ruby-forum.com> Hi, I am using IR to do some IronRuby programing and enjoying it! I created a Form like this: Form = System::Windows::Forms::Form form = Form.new form.ShowDialog() Now, I need to assign BackColor to the Form. I tried the following: form.BackColor = System::Drawing::Color::DeekPink But it is not able to recognize the Color class. >>> form.BackColor = System::Drawing::Color::DeepPink :0:in `const_missing': uninitialized constant System::Drawing::Color::DeepPink ( NameError) from :0 Any ideas! -- Posted via http://www.ruby-forum.com/. From curth at microsoft.com Tue Jun 16 12:10:14 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 16 Jun 2009 09:10:14 -0700 Subject: [Ironruby-core] Accessing Enumeration in IronRuby In-Reply-To: <19e62bbc95916aab8b55702a8a94b5bc@ruby-forum.com> References: <19e62bbc95916aab8b55702a8a94b5bc@ruby-forum.com> Message-ID: You're close; you want "System::Drawing::Color.DeepPink". -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Tuesday, June 16, 2009 9:04 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Accessing Enumeration in IronRuby Hi, I am using IR to do some IronRuby programing and enjoying it! I created a Form like this: Form = System::Windows::Forms::Form form = Form.new form.ShowDialog() Now, I need to assign BackColor to the Form. I tried the following: form.BackColor = System::Drawing::Color::DeekPink But it is not able to recognize the Color class. >>> form.BackColor = System::Drawing::Color::DeepPink :0:in `const_missing': uninitialized constant System::Drawing::Color::DeepPink ( NameError) from :0 Any ideas! -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From ivan at flanders.co.nz Tue Jun 16 12:10:01 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 16 Jun 2009 18:10:01 +0200 Subject: [Ironruby-core] Accessing Enumeration in IronRuby In-Reply-To: <19e62bbc95916aab8b55702a8a94b5bc@ruby-forum.com> References: <19e62bbc95916aab8b55702a8a94b5bc@ruby-forum.com> Message-ID: try System::Drawing::Color.deep_pink :) --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 16, 2009 at 6:04 PM, Mohammad Azam wrote: > Hi, > > I am using IR to do some IronRuby programing and enjoying it! > > I created a Form like this: > > Form = System::Windows::Forms::Form > form = Form.new > form.ShowDialog() > > Now, I need to assign BackColor to the Form. I tried the following: > > form.BackColor = System::Drawing::Color::DeekPink > > But it is not able to recognize the Color class. > > > >>> form.BackColor = System::Drawing::Color::DeepPink > :0:in `const_missing': uninitialized constant > System::Drawing::Color::DeepPink ( > NameError) > from :0 > > Any ideas! > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Tue Jun 16 12:17:25 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 16 Jun 2009 18:17:25 +0200 Subject: [Ironruby-core] Accessing Enumeration in IronRuby In-Reply-To: References: <19e62bbc95916aab8b55702a8a94b5bc@ruby-forum.com> Message-ID: <2acdde0be42322cc5b7e0ac0238ed94b@ruby-forum.com> Thanks it worked! But why the inconsistency with the deep_pink instead of DeepPink? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 16 12:21:55 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 16 Jun 2009 18:21:55 +0200 Subject: [Ironruby-core] Accessing Enumeration in IronRuby In-Reply-To: References: <19e62bbc95916aab8b55702a8a94b5bc@ruby-forum.com> Message-ID: <261f36e665e072a596ad8dac44ed847d@ruby-forum.com> Curt Hagenlocher wrote: > You're close; you want "System::Drawing::Color.DeepPink". Thanks Curt! It worked out :) -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Tue Jun 16 12:23:32 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 16 Jun 2009 18:23:32 +0200 Subject: [Ironruby-core] Accessing Enumeration in IronRuby In-Reply-To: References: <19e62bbc95916aab8b55702a8a94b5bc@ruby-forum.com> Message-ID: So what is up with naming conventions.. are it ruby naming conventions or CLR naming conventions? I'm going to argue in favor of ruby naming conventions. Is there going to be a definitive list for this? (naming conventions being a pet peeve of mine) --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 16, 2009 at 6:10 PM, Curt Hagenlocher wrote: > You're close; you want "System::Drawing::Color.DeepPink". > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Tuesday, June 16, 2009 9:04 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Accessing Enumeration in IronRuby > > Hi, > > I am using IR to do some IronRuby programing and enjoying it! > > I created a Form like this: > > Form = System::Windows::Forms::Form > form = Form.new > form.ShowDialog() > > Now, I need to assign BackColor to the Form. I tried the following: > > form.BackColor = System::Drawing::Color::DeekPink > > But it is not able to recognize the Color class. > > > >>> form.BackColor = System::Drawing::Color::DeepPink > :0:in `const_missing': uninitialized constant > System::Drawing::Color::DeepPink ( > NameError) > from :0 > > Any ideas! > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > 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: From jdeville at microsoft.com Tue Jun 16 12:24:57 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 16 Jun 2009 16:24:57 +0000 Subject: [Ironruby-core] Accessing Enumeration in IronRuby In-Reply-To: <2acdde0be42322cc5b7e0ac0238ed94b@ruby-forum.com> References: <19e62bbc95916aab8b55702a8a94b5bc@ruby-forum.com> <2acdde0be42322cc5b7e0ac0238ed94b@ruby-forum.com> Message-ID: IronRuby does "name mangling" on many methods to look more Rubyish. The standard idiom in Ruby is to have methods with snake_case names, so this fits with that. Both DeepPink and deep_pink should work in this case. JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Tuesday, June 16, 2009 9:17 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Accessing Enumeration in IronRuby > > Thanks it worked! > > But why the inconsistency with the deep_pink instead of DeepPink? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From jdeville at microsoft.com Tue Jun 16 12:47:30 2009 From: jdeville at microsoft.com (Jim Deville) Date: Tue, 16 Jun 2009 16:47:30 +0000 Subject: [Ironruby-core] Accessing Enumeration in IronRuby In-Reply-To: References: <19e62bbc95916aab8b55702a8a94b5bc@ruby-forum.com> Message-ID: Not sure what you mean. For .NET methods on most types, we mangle both ways. You can call deep_pink or DeepPink. There are certain CLR classes (ones that map to Ruby Builtins) that don?t mangle to avoid conflicts, but for the most part, it is up to the developer. That said, I prefer to stick with what I see as the Ruby community coding standards: ? 2 space indent ? snake_case method names ? parenthesis for method definitions ? no parenthesis for method calls unless it is chained or ambiguous And others listed on this page http://www.caliban.org/ruby/rubyguide.shtml JD ?there is no try From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Tuesday, June 16, 2009 9:24 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Accessing Enumeration in IronRuby So what is up with naming conventions.. are it ruby naming conventions or CLR naming conventions? I'm going to argue in favor of ruby naming conventions. Is there going to be a definitive list for this? (naming conventions being a pet peeve of mine) --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 16, 2009 at 6:10 PM, Curt Hagenlocher > wrote: You're close; you want "System::Drawing::Color.DeepPink". -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Tuesday, June 16, 2009 9:04 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Accessing Enumeration in IronRuby Hi, I am using IR to do some IronRuby programing and enjoying it! I created a Form like this: Form = System::Windows::Forms::Form form = Form.new form.ShowDialog() Now, I need to assign BackColor to the Form. I tried the following: form.BackColor = System::Drawing::Color::DeekPink But it is not able to recognize the Color class. >>> form.BackColor = System::Drawing::Color::DeepPink :0:in `const_missing': uninitialized constant System::Drawing::Color::DeepPink ( NameError) from :0 Any ideas! -- Posted via http://www.ruby-forum.com/. _______________________________________________ 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: From curth at microsoft.com Tue Jun 16 13:00:31 2009 From: curth at microsoft.com (Curt Hagenlocher) Date: Tue, 16 Jun 2009 10:00:31 -0700 Subject: [Ironruby-core] Accessing Enumeration in IronRuby In-Reply-To: References: <19e62bbc95916aab8b55702a8a94b5bc@ruby-forum.com> Message-ID: Without thinking, I just used the same convention as the original question and didn?t mean to imply anything by it. I mostly live in other languages, so it didn?t even stand out. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Tuesday, June 16, 2009 9:24 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Accessing Enumeration in IronRuby So what is up with naming conventions.. are it ruby naming conventions or CLR naming conventions? I'm going to argue in favor of ruby naming conventions. Is there going to be a definitive list for this? (naming conventions being a pet peeve of mine) --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 16, 2009 at 6:10 PM, Curt Hagenlocher > wrote: You're close; you want "System::Drawing::Color.DeepPink". -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Tuesday, June 16, 2009 9:04 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Accessing Enumeration in IronRuby Hi, I am using IR to do some IronRuby programing and enjoying it! I created a Form like this: Form = System::Windows::Forms::Form form = Form.new form.ShowDialog() Now, I need to assign BackColor to the Form. I tried the following: form.BackColor = System::Drawing::Color::DeekPink But it is not able to recognize the Color class. >>> form.BackColor = System::Drawing::Color::DeepPink :0:in `const_missing': uninitialized constant System::Drawing::Color::DeepPink ( NameError) from :0 Any ideas! -- Posted via http://www.ruby-forum.com/. _______________________________________________ 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: From ivan at flanders.co.nz Tue Jun 16 15:01:13 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 16 Jun 2009 21:01:13 +0200 Subject: [Ironruby-core] Accessing Enumeration in IronRuby In-Reply-To: References: <19e62bbc95916aab8b55702a8a94b5bc@ruby-forum.com> Message-ID: I was also a bit short in my answer.. realised I was running late for a meeting with a guy about cash-bootstrapping my new business; not exactly what I want to be running late for :) I do prefer the ruby naming conventions too :) I just want to document those things properly in the book so that there are no surprises. Something like: I advice to use ruby naming conventions except in the following cases..... I guess the exceptions will be on the wiki --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 16, 2009 at 7:00 PM, Curt Hagenlocher wrote: > Without thinking, I just used the same convention as the original question > and didn?t mean to imply anything by it. I mostly live in other languages, > so it didn?t even stand out. > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Tuesday, June 16, 2009 9:24 AM > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Accessing Enumeration in IronRuby > > > > So what is up with naming conventions.. are it ruby naming conventions or > CLR naming conventions? > > > > I'm going to argue in favor of ruby naming conventions. > > Is there going to be a definitive list for this? (naming conventions being > a pet peeve of mine) > > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > On Tue, Jun 16, 2009 at 6:10 PM, Curt Hagenlocher > wrote: > > You're close; you want "System::Drawing::Color.DeepPink". > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Tuesday, June 16, 2009 9:04 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Accessing Enumeration in IronRuby > > Hi, > > I am using IR to do some IronRuby programing and enjoying it! > > I created a Form like this: > > Form = System::Windows::Forms::Form > form = Form.new > form.ShowDialog() > > Now, I need to assign BackColor to the Form. I tried the following: > > form.BackColor = System::Drawing::Color::DeekPink > > But it is not able to recognize the Color class. > > > >>> form.BackColor = System::Drawing::Color::DeepPink > :0:in `const_missing': uninitialized constant > System::Drawing::Color::DeepPink ( > NameError) > from :0 > > Any ideas! > -- > > Posted via http://www.ruby-forum.com/. > _______________________________________________ > 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: From lists at ruby-forum.com Tue Jun 16 17:46:03 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 16 Jun 2009 23:46:03 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory Message-ID: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> Hi, I am have placed open-uri in the same directory as my application and I am trying to include open-uri in my application using the require attribute. require File.dirname(__FILE__) + '/open-uri' It throws the following error: C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs>ir test.rb :0:in `require': no such file to load -- uri (LoadError) from ./open-uri.rb:1 from test.rb:4 from :0:in `require' Thanks, -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Jun 17 00:11:46 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Wed, 17 Jun 2009 06:11:46 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> Message-ID: <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> Hi Mohammad, It happens because open-uri tries to load the uri library and it fails to find it. I couldn't reproduce this behavior on my end... The uri library should be located at \External.LCA_RESTRICTED\Languages\Ruby\redist-libs\ruby\1.8\uri.rb Is there a chance you're changing the $LOAD_PATH array? By the way, why would you want to copy the open-uri lib to your application directory? The standard library folder is a part of the file lookup paths, so no matter where your application is installed to, the standard libraries (like open-uri) will still be available. Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From Jimmy.Schementi at microsoft.com Wed Jun 17 01:52:23 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 17 Jun 2009 05:52:23 +0000 Subject: [Ironruby-core] Calling Explicit Interfaces In-Reply-To: <278edf5bf3d08154e92d7ec8cd3b8961@ruby-forum.com> References: <278edf5bf3d08154e92d7ec8cd3b8961@ruby-forum.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC1438EDA5@tk5ex14mbxc105.redmond.corp.microsoft.com> Yep, still looks like an issue. Tomas, the bug Michael refers to is a RubyForge bug you opened in January: http://rubyforge.org/tracker/index.php?func=detail&aid=23494&group_id=4359&atid=16798 So I created a CodePlex bug for it: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1594 In the future, if there is a RubyForge bug that anyone cares about, please move it over to CodePlex. ~js > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Michael Delaney > Sent: Friday, June 12, 2009 8:22 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Calling Explicit Interfaces > > Hi, > > Is this still a bug i.e. bug #23494. > > i'm trying to use cucumber test a WPF app using the WPFAutomation. > > there's an explicit interface implementation of > System.Windows.Automation.Provider.IInvokeProvider on the > ButtonAutomationPeer class. > > at the moment i'm getting around it by creating a helper object in c# > > namespace UIAutomation { > public class InvokeHelper { > private readonly IInvokeProvider _provider; > public InvokeHelper(IInvokeProvider provider) { > _provider = provider; > } > public void Invoke(){ > _provider.Invoke(); > } > } > } > > and then call in IR: > ih = InvokeHelper.new bp > ih.invoke > > > Is there another way to do this?? > Regads. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Jimmy.Schementi at microsoft.com Wed Jun 17 01:54:31 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 17 Jun 2009 05:54:31 +0000 Subject: [Ironruby-core] IronRuby MVC sample In-Reply-To: References: Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC1438EDC0@tk5ex14mbxc105.redmond.corp.microsoft.com> Did you hear anything about the mono work-around for ExtensionAttribute being defined twice? I think IronPython works fine, so I?m wondering what?s going on. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Monday, June 08, 2009 6:04 AM To: ironruby-core Subject: [Ironruby-core] IronRuby MVC sample Hi I've built a small sample app over the weekend that uses IronRuby MVC. I tested it running on cassini/webdev server and IIS in both cases it works fine. The SQLite dll included in the dependencies is a 64-bit dll if your system is 32-bit you'll have to change that dll otherwise dataaccess won't work. You can find the really original tasklist application in my account on github: http://github.com/casualjim/ironrubymvc-sample I'll blog about it later. I tried to use ironrubymvc on mono but that was a no go. Mono takes issue with the ExtensionAttribute being defined twice. I've asked for a workaround on the mono-devel list. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Wed Jun 17 03:40:25 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 17 Jun 2009 09:40:25 +0200 Subject: [Ironruby-core] IronRuby MVC sample In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC1438EDC0@tk5ex14mbxc105.redmond.corp.microsoft.com> References: <0047ECBFA2E0DF4A834AA369282A5AFC1438EDC0@tk5ex14mbxc105.redmond.corp.microsoft.com> Message-ID: I built mono from trunk over the weekend and there it works :D --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Jun 17, 2009 at 7:54 AM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > Did you hear anything about the mono work-around for ExtensionAttribute > being defined twice? I think IronPython works fine, so I?m wondering what?s > going on. > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Monday, June 08, 2009 6:04 AM > *To:* ironruby-core > *Subject:* [Ironruby-core] IronRuby MVC sample > > > > Hi > > > > I've built a small sample app over the weekend that uses IronRuby MVC. > > > > I tested it running on cassini/webdev server and IIS in both cases it works > fine. > > The SQLite dll included in the dependencies is a 64-bit dll if your system > is 32-bit you'll have to change that dll otherwise dataaccess won't work. > > > > You can find the really original tasklist application in my account on > github: > > http://github.com/casualjim/ironrubymvc-sample > > > > I'll blog about it later. > > > > > > I tried to use ironrubymvc on mono but that was a no go. Mono takes issue > with the ExtensionAttribute being defined twice. I've asked for a workaround > on the mono-devel list. > > > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Wed Jun 17 03:47:13 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 17 Jun 2009 09:47:13 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> Message-ID: it can be useful when you want to deploy your application to systems where you don't know if ironruby is installed etc. I'm doing the same for an ironrubymvc application. I still have to find a nicer solution to that maybe by reusing the ironruby configuration to make those paths configurable. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Jun 17, 2009 at 6:11 AM, Shay Friedman wrote: > Hi Mohammad, > > It happens because open-uri tries to load the uri library and it fails > to find it. > > I couldn't reproduce this behavior on my end... > The uri library should be located at > > \External.LCA_RESTRICTED\Languages\Ruby\redist-libs\ruby\1.8\uri.rb > Is there a chance you're changing the $LOAD_PATH array? > > By the way, why would you want to copy the open-uri lib to your > application directory? The standard library folder is a part of the file > lookup paths, so no matter where your application is installed to, the > standard libraries (like open-uri) will still be available. > > Shay. > ---------------------------- > Shay Friedman > http://www.ironshay.com > Follow me: http://twitter.com/ironshay > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Wed Jun 17 04:06:04 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Wed, 17 Jun 2009 10:06:04 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> Message-ID: <8c227a2b6d32be21fbc82a384fa3bdcc@ruby-forum.com> How can IronRuby work if it's not installed? -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Wed Jun 17 04:15:04 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 17 Jun 2009 10:15:04 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: <8c227a2b6d32be21fbc82a384fa3bdcc@ruby-forum.com> References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> <8c227a2b6d32be21fbc82a384fa3bdcc@ruby-forum.com> Message-ID: it are just DLL's you could host them inside your own application.ir.exe also calls out to those libraries to do its work --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Jun 17, 2009 at 10:06 AM, Shay Friedman wrote: > How can IronRuby work if it's not installed? > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Wed Jun 17 10:34:02 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 17 Jun 2009 16:34:02 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> Message-ID: I am using the following code to scrape the webpage. button = Button.new button.Text = 'Scrape URL' button.Location = System::Drawing::Point.new(108,61) button.click do |sender,args| page = File.open("http://www.azamsharp.com/Default.aspx") System::Windows::Forms::MessageBox.Show(page.read) end I get the following error message: Invalid argument - URI formats are not supported -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Wed Jun 17 10:48:18 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 17 Jun 2009 16:48:18 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> Message-ID: if you have openuri required just remove the File that should work or uri = URI.parse("http://somewhere.com/default.aspx") uri.open do |f| #some logic here end or you could just use open("http://somewhere.com/default.aspx") do |f| # some logic here end taken from http://www.ruby-doc.org/stdlib/libdoc/open-uri/rdoc/classes/OpenURI.html --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Jun 17, 2009 at 4:34 PM, Mohammad Azam wrote: > > I am using the following code to scrape the webpage. > > button = Button.new > button.Text = 'Scrape URL' > button.Location = System::Drawing::Point.new(108,61) > button.click do |sender,args| > > page = File.open("http://www.azamsharp.com/Default.aspx") > System::Windows::Forms::MessageBox.Show(page.read) > > end > > I get the following error message: > > Invalid argument - URI formats are not supported > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Wed Jun 17 11:13:57 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Wed, 17 Jun 2009 17:13:57 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> Message-ID: You're trying to use the File class to open URIs which is not supported. Try open instead of File.open (and add require "open-uri" as well). Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From will at hotgazpacho.org Wed Jun 17 12:48:16 2009 From: will at hotgazpacho.org (Will Green) Date: Wed, 17 Jun 2009 12:48:16 -0400 Subject: [Ironruby-core] Command line Option Parsing broken Message-ID: <398d3e0e0906170948l250fdbf2laa2ab7ebf36c44c9@mail.gmail.com> Hot on the heels of my blog post about getting Cucumber working with IronRuby, I've discovered that some change in the last 2 weeks has caused igem to stop parsing command line arguments correctly. The problem is that it sees arguments like --bindir as the name of a gem to install, rather than a command line argument. I came to this conclusion be attaching the debugger at %MERLIN_ROOT%\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\IoOps.cs to the running ir.exe process. This doesn't stop Cucumber from installing; you just omit the command line args, but the executable wrappers get installed to %MERLIN_ROOT%\Bin\Debug, which, as I pointed out, gets clobbered every time you recompile. I have filed a bug report on Codeplex: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1585 Let me know if any more detail would be helpful. -- Will Green http://willgreen.mp/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Wed Jun 17 12:55:31 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 17 Jun 2009 18:55:31 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> Message-ID: <9d61c5f587297798e1666e70c1ec9ca5@ruby-forum.com> If I put: require 'open-uri' then it throws the error that error locating the file 'open-uri'. I used the following code: def scrape_page() uri = URI.parse("http://somewhere.com/default.aspx") end And now it throws the exception: Unintitialzied constant Object: URI Ivan Porto carrero wrote: > if you have openuri required > just remove the File that should work > or > > uri = URI.parse("http://somewhere.com/default.aspx") > uri.open do |f| > #some logic here > end > > or > > you could just use > > open("http://somewhere.com/default.aspx") do |f| > # some logic here > end > > taken from > http://www.ruby-doc.org/stdlib/libdoc/open-uri/rdoc/classes/OpenURI.html > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Jun 17 13:00:31 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 17 Jun 2009 19:00:31 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> Message-ID: I tried to add a require 'open-uri' but for some reason it is not able to locate the open-uri files. I have placed the open-uri in the libs folder and I said: require 'libs/open-uri' but it is not able to locate the file. -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Wed Jun 17 13:21:50 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 17 Jun 2009 19:21:50 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: <9d61c5f587297798e1666e70c1ec9ca5@ruby-forum.com> References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> <9d61c5f587297798e1666e70c1ec9ca5@ruby-forum.com> Message-ID: what version of ironruby are you using?it looks like your search paths are messed up. for example does require File.dirname(__FILE__) + '/libs/open-uri' work? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Jun 17, 2009 at 6:55 PM, Mohammad Azam wrote: > > If I put: > > require 'open-uri' > > then it throws the error that error locating the file 'open-uri'. > > I used the following code: > > def scrape_page() > > uri = URI.parse("http://somewhere.com/default.aspx") > > end > > And now it throws the exception: > > Unintitialzied constant Object: URI > > > > Ivan Porto carrero wrote: > > if you have openuri required > > just remove the File that should work > > or > > > > uri = URI.parse("http://somewhere.com/default.aspx") > > uri.open do |f| > > #some logic here > > end > > > > or > > > > you could just use > > > > open("http://somewhere.com/default.aspx") do |f| > > # some logic here > > end > > > > taken from > > http://www.ruby-doc.org/stdlib/libdoc/open-uri/rdoc/classes/OpenURI.html > > --- > > Met vriendelijke groeten - Best regards - Salutations > > Ivan Porto Carrero > > Blog: http://flanders.co.nz > > Twitter: http://twitter.com/casualjim > > Author of IronRuby in Action (http://manning.com/carrero) > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Wed Jun 17 13:22:35 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Wed, 17 Jun 2009 19:22:35 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> Message-ID: Can you check if the open-uri.rb file exists in the folder: \External.LCA_RESTRICTED\Languages\Ruby\redist-libs\ruby\1.8\ -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Jun 17 13:24:15 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 17 Jun 2009 19:24:15 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> <9d61c5f587297798e1666e70c1ec9ca5@ruby-forum.com> Message-ID: <1b38cbb30f0f54f020d3c0488c938ff4@ruby-forum.com> I have placed the open-uri file in the libs folder within the project. But for some reason it blows up and says unable to locate open-uri file. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Jun 17 13:25:46 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 17 Jun 2009 19:25:46 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> <9d61c5f587297798e1666e70c1ec9ca5@ruby-forum.com> Message-ID: <3395f651ae289810a0e5223eaa1c8e8e@ruby-forum.com> I tried with the path and got the following error: require File.dirname(__FILE__) + '/libs/open-uri' C:\IronRubyProjects\IronRubyTaskListApplication>ir main_form.rb :0:in `require': no such file to load -- uri (LoadError) from ./libs/open-uri.rb:1 from main_form.rb:4 from :0:in `require' Ivan Porto carrero wrote: > what version of ironruby are you using?it looks like your search paths > are > messed up. > > for example does require File.dirname(__FILE__) + '/libs/open-uri' work? > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Jun 17 13:26:48 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 17 Jun 2009 19:26:48 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> <9d61c5f587297798e1666e70c1ec9ca5@ruby-forum.com> Message-ID: Here is the version: C:\IronRubyProjects\IronRubyTaskListApplication>ir -v IronRuby 0.5.0.0 on .NET 2.0.0.0 -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Wed Jun 17 13:28:09 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 17 Jun 2009 19:28:09 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: <3395f651ae289810a0e5223eaa1c8e8e@ruby-forum.com> References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> <9d61c5f587297798e1666e70c1ec9ca5@ruby-forum.com> <3395f651ae289810a0e5223eaa1c8e8e@ruby-forum.com> Message-ID: ok you also need the uri file open-uri has a dependency on that file. But still I think your search paths are messed up. how does you config look like? Where is ironruby located did you pick a release or build from git? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Jun 17, 2009 at 7:25 PM, Mohammad Azam wrote: > > I tried with the path and got the following error: > > require File.dirname(__FILE__) + '/libs/open-uri' > > C:\IronRubyProjects\IronRubyTaskListApplication>ir main_form.rb > :0:in `require': no such file to load -- uri (LoadError) > from ./libs/open-uri.rb:1 > from main_form.rb:4 > from :0:in `require' > > > Ivan Porto carrero wrote: > > what version of ironruby are you using?it looks like your search paths > > are > > messed up. > > > > for example does require File.dirname(__FILE__) + '/libs/open-uri' work? > > > > --- > > Met vriendelijke groeten - Best regards - Salutations > > Ivan Porto Carrero > > Blog: http://flanders.co.nz > > Twitter: http://twitter.com/casualjim > > Author of IronRuby in Action (http://manning.com/carrero) > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Wed Jun 17 13:38:57 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 17 Jun 2009 19:38:57 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> <9d61c5f587297798e1666e70c1ec9ca5@ruby-forum.com> Message-ID: are you hosting ironruby in your application or are you using the ir command to run it? Are the paths correct in ir.exe.config? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Jun 17, 2009 at 7:26 PM, Mohammad Azam wrote: > > Here is the version: > > > C:\IronRubyProjects\IronRubyTaskListApplication>ir -v > IronRuby 0.5.0.0 on .NET 2.0.0.0 > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Wed Jun 17 13:48:35 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 17 Jun 2009 19:48:35 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> <9d61c5f587297798e1666e70c1ec9ca5@ruby-forum.com> Message-ID: I am using ir command to run it. It is all ruby code. I went to the C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\redist-libs\ruby\1.8 folder and run the following code: require 'open-uri' it asked for stringio (not sure why it was missing) so I placed it in the 1.8 folder and ran again and it worked. But now when I use the same files for my project libs/stringio.rb it does not work. C:\IronRubyProjects\IronRubyTaskListApplication>ir main_form.rb :0:in `require': no such file to load -- uri (LoadError) from ./libs/open-uri.rb:1 from main_form.rb:4 from :0:in `require' -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Jun 17 14:00:54 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 17 Jun 2009 20:00:54 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> <9d61c5f587297798e1666e70c1ec9ca5@ruby-forum.com> Message-ID: <0a46a2d157937019db050c177603c739@ruby-forum.com> Actually I checked using the ir.exe command line and it did not work either. It seems like the C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\redist-libs\ruby\1.8 and C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs contains duplicate rb files. One open-uri is for url and other is for file system. I think the dependencies are messed up! -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Wed Jun 17 14:07:46 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 17 Jun 2009 20:07:46 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> <9d61c5f587297798e1666e70c1ec9ca5@ruby-forum.com> Message-ID: for me the compiled binaries end up in: C:\tools\ironruby\merlin\main\bin\debug and this is how the relevant tag looks like in that ir.exe.config file I know it's lame but it works for me. + C:\tools\ironruby (master) ? ir IronRuby 0.5.0.0 on .NET 2.0.50727.4918 Copyright (c) Microsoft Corporation. All rights reserved. >>> require 'open-uri' => true >>> --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Jun 17, 2009 at 7:48 PM, Mohammad Azam wrote: > I am using ir command to run it. It is all ruby code. > > I went to the > > C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\redist-libs\ruby\1.8 > folder and run the following code: > > require 'open-uri' > > it asked for stringio (not sure why it was missing) so I placed it in > the 1.8 folder and ran again and it worked. But now when I use the same > files for my project libs/stringio.rb it does not work. > > > C:\IronRubyProjects\IronRubyTaskListApplication>ir main_form.rb > :0:in `require': no such file to load -- uri (LoadError) > from ./libs/open-uri.rb:1 > from main_form.rb:4 > from :0:in `require' > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Wed Jun 17 14:20:45 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 17 Jun 2009 20:20:45 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> <9d61c5f587297798e1666e70c1ec9ca5@ruby-forum.com> Message-ID: I have the exact same path in the ir.exe.config file. But I can only run the open-uri if I am in the lib folder where the file is physically located. This is really strange! -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Jun 17 14:22:16 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 17 Jun 2009 20:22:16 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> <9d61c5f587297798e1666e70c1ec9ca5@ruby-forum.com> Message-ID: <4f253db4bc24f4a74693b860fcf8864d@ruby-forum.com> Here is the part of the ir.exe.config file. -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Wed Jun 17 14:14:17 2009 From: jdeville at microsoft.com (Jim Deville) Date: Wed, 17 Jun 2009 18:14:17 +0000 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: <0a46a2d157937019db050c177603c739@ruby-forum.com> References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> <9d61c5f587297798e1666e70c1ec9ca5@ruby-forum.com> <0a46a2d157937019db050c177603c739@ruby-forum.com> Message-ID: Usually, the one in > C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs Contains hacks or workarounds to load the correct one from > C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\re > dist-libs\ruby\1.8 In other cases, the first one may simply load code from C#. What does your ir.exe.config look like? Thanks, JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Wednesday, June 17, 2009 11:01 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Accessing open-uri from the same directory > > Actually I checked using the ir.exe command line and it did not work either. It > seems like the > > C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\re > dist-libs\ruby\1.8 > > and > > C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs > > contains duplicate rb files. One open-uri is for url and other is for file system. > I think the dependencies are messed up! > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Wed Jun 17 14:27:33 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 17 Jun 2009 20:27:33 +0200 Subject: [Ironruby-core] Accessing open-uri from the same directory In-Reply-To: References: <5e586b77fc73883fcba78dbe10125b7b@ruby-forum.com> <681f4d771bf6c7c77f0c134ab5e76944@ruby-forum.com> <9d61c5f587297798e1666e70c1ec9ca5@ruby-forum.com> <0a46a2d157937019db050c177603c739@ruby-forum.com> Message-ID: <450bb69c1d94c4fbdf2548d5e83bee77@ruby-forum.com> Here is the complete ir.exe.config file:
-- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Jun 17 15:13:36 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 17 Jun 2009 21:13:36 +0200 Subject: [Ironruby-core] Accessing Database Using IronRuby Message-ID: <464509289df0a20e248e6a5d92f70e81@ruby-forum.com> Hi, I am trying to find a way to access database (SQL SERVER) using IronRuby. One option is to use C# and ADO.NET classes to access the database but was wondering if IronRuby has a build in support for dynamic SQL so I don't have to deal with ADO.NET for database access. -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Wed Jun 17 15:15:53 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 17 Jun 2009 21:15:53 +0200 Subject: [Ironruby-core] is there a way to pick a method overload? Message-ID: Hi Is there a way to pick a CLR method overload? var query = new Query(); UnitOfWorkScope.Current.Find(query); That find method takes a Query type or a ProcedureQuery type where ProcedureQuery would be a stored proc call. Also ProcedureQuery is a more specialized version of a Query class. Currently this method fails because IronRuby picks the overload with the ProcedureQuery and I'd like to be able to tell it to take the overload that takes Query. Can that be done? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Wed Jun 17 15:19:35 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Wed, 17 Jun 2009 21:19:35 +0200 Subject: [Ironruby-core] Accessing Database Using IronRuby In-Reply-To: <464509289df0a20e248e6a5d92f70e81@ruby-forum.com> References: <464509289df0a20e248e6a5d92f70e81@ruby-forum.com> Message-ID: You can use any OR/M in the .NET space to connect to databases.Writing queries will be somewhat challenging though :) Jimmy also wrote a sql server adapter for activerecord that comes with rails so you could also use the rails OR/M ActiveRecord http://github.com/jschementi/activerecord-mssql-adapter/tree/master So you could use a ruby OR/M --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Jun 17, 2009 at 9:13 PM, Mohammad Azam wrote: > Hi, > > I am trying to find a way to access database (SQL SERVER) using > IronRuby. One option is to use C# and ADO.NET classes to access the > database but was wondering if IronRuby has a build in support for > dynamic SQL so I don't have to deal with ADO.NET for database access. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Wed Jun 17 15:28:23 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 17 Jun 2009 19:28:23 +0000 Subject: [Ironruby-core] Accessing Database Using IronRuby In-Reply-To: <464509289df0a20e248e6a5d92f70e81@ruby-forum.com> References: <464509289df0a20e248e6a5d92f70e81@ruby-forum.com> Message-ID: You could use the ActiveRecord SQLServer adapter ... Look for documentation under the Rails section in ironruby.net/documentation. ~Jimmy Sent from my phone On Jun 17, 2009, at 12:13 PM, "Mohammad Azam" wrote: > Hi, > > I am trying to find a way to access database (SQL SERVER) using > IronRuby. One option is to use C# and ADO.NET classes to access the > database but was wondering if IronRuby has a build in support for > dynamic SQL so I don't have to deal with ADO.NET for database access. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From lists at ruby-forum.com Wed Jun 17 15:29:55 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 17 Jun 2009 21:29:55 +0200 Subject: [Ironruby-core] Accessing Database Using IronRuby In-Reply-To: References: <464509289df0a20e248e6a5d92f70e81@ruby-forum.com> Message-ID: Thanks! yeah I might be interested in using any .NET ORM! I will try out Jimmy Rails ORM ActiveRecord. I think it will also work for a windows application. Let me check out the dbi module. Ivan Porto carrero wrote: > You can use any OR/M in the .NET space to connect to databases.Writing > queries will be somewhat challenging though :) > > Jimmy also wrote a sql server adapter for activerecord that comes with > rails > so you could also use the rails OR/M ActiveRecord > > http://github.com/jschementi/activerecord-mssql-adapter/tree/master > > So you could use a ruby OR/M > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Jun 17 15:33:11 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 17 Jun 2009 21:33:11 +0200 Subject: [Ironruby-core] Accessing Database Using IronRuby In-Reply-To: References: <464509289df0a20e248e6a5d92f70e81@ruby-forum.com> Message-ID: <1438fdfb9c197fb8dd169520f095591c@ruby-forum.com> Hi Jimmy, Can I use the ActiveRecord SQL SERVER with Window Forms projects? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Jun 17 16:33:25 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Wed, 17 Jun 2009 22:33:25 +0200 Subject: [Ironruby-core] Accessing Database Using IronRuby In-Reply-To: References: <464509289df0a20e248e6a5d92f70e81@ruby-forum.com> Message-ID: <175557bcfd5c4199bdea72a36decb47c@ruby-forum.com> Just wanted to share basic code to insert first_name and last_name into the database. require 'mscorlib' require 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' SqlConnection = System::Data::SqlClient::SqlConnection SqlCommand = System::Data::SqlClient::SqlCommand class CustomerRepository def save(customer) connection = SqlConnection.new('Server=localhost;Database=TestDatabase;Trusted_Connection=true') connection.Open() command = SqlCommand.new("insert into customers(first_name,last_name) values(@first_name, at last_name)",connection) command.Parameters.AddWithValue("@first_name",customer.first_name) command.Parameters.AddWithValue("@last_name",customer.last_name) command.ExecuteNonQuery() connection.Close() end end -- Posted via http://www.ruby-forum.com/. From Jimmy.Schementi at microsoft.com Wed Jun 17 17:03:59 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 17 Jun 2009 21:03:59 +0000 Subject: [Ironruby-core] Accessing Database Using IronRuby In-Reply-To: <175557bcfd5c4199bdea72a36decb47c@ruby-forum.com> References: <464509289df0a20e248e6a5d92f70e81@ruby-forum.com> <175557bcfd5c4199bdea72a36decb47c@ruby-forum.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC1438F8A3@tk5ex14mbxc105.redmond.corp.microsoft.com> Thanks! I've added this to the IronRuby .NET documentation just as a placeholder: http://ironruby.net/Documentation/.NET/SQL ~js > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Wednesday, June 17, 2009 1:33 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Accessing Database Using IronRuby > > Just wanted to share basic code to insert first_name and last_name into the > database. > > > require 'mscorlib' > require 'System.Data, Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089' > > SqlConnection = System::Data::SqlClient::SqlConnection > SqlCommand = System::Data::SqlClient::SqlCommand > > class CustomerRepository > > def save(customer) > > connection = > SqlConnection.new('Server=localhost;Database=TestDatabase;Trusted_Con > nection=true') > connection.Open() > command = SqlCommand.new("insert into > customers(first_name,last_name) > values(@first_name, at last_name)",connection) > > command.Parameters.AddWithValue("@first_name",customer.first_name) > command.Parameters.AddWithValue("@last_name",customer.last_name) > > command.ExecuteNonQuery() > connection.Close() > > end > > end > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Wed Jun 17 18:32:00 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Thu, 18 Jun 2009 00:32:00 +0200 Subject: [Ironruby-core] Converting an Object to Collection to Bind to DataGridView Message-ID: <6b673ad509e4fdd73502ddf44643b1d5@ruby-forum.com> Hi, I have the following code which I am using to bind an object to the Window Forms dataGridView control: def bind_customes_to_grid(customer) $gvCustomers.DataSource = customer end Now, I need to convert the customer into a collection so it can be binding to the DataGridview control. How can I do that? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Jun 17 18:34:20 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Thu, 18 Jun 2009 00:34:20 +0200 Subject: [Ironruby-core] Converting an Object to Collection to Bind to DataGridVi In-Reply-To: <6b673ad509e4fdd73502ddf44643b1d5@ruby-forum.com> References: <6b673ad509e4fdd73502ddf44643b1d5@ruby-forum.com> Message-ID: Here is one possible solution: def bind_customes_to_grid(customer) list = Array.new list[0] = customer $gvCustomers.DataSource = list end -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Jun 17 18:36:15 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Thu, 18 Jun 2009 00:36:15 +0200 Subject: [Ironruby-core] Converting an Object to Collection to Bind to DataGridVi In-Reply-To: References: <6b673ad509e4fdd73502ddf44643b1d5@ruby-forum.com> Message-ID: <9b708ceaca17492ef17a9f020aa542ce@ruby-forum.com> Here is another version: def bind_customes_to_grid(customer) $gvCustomers.DataSource = Array.new.push(customer) end -- Posted via http://www.ruby-forum.com/. From Jimmy.Schementi at microsoft.com Wed Jun 17 17:58:54 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 17 Jun 2009 21:58:54 +0000 Subject: [Ironruby-core] Accessing Database Using IronRuby In-Reply-To: <1438fdfb9c197fb8dd169520f095591c@ruby-forum.com> References: <464509289df0a20e248e6a5d92f70e81@ruby-forum.com> <1438fdfb9c197fb8dd169520f095591c@ruby-forum.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC1438FBD8@tk5ex14mbxc105.redmond.corp.microsoft.com> Definitely, WinForms isn't anything special to restrict using SQLServer. I actually show this briefly here: http://blog.jimmy.schementi.com/2009/05/ironruby-at-railsconf-2009.html#sql Source code is here: http://github.com/jschementi/railsconf09/tree/master/8-ardb ~js > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Wednesday, June 17, 2009 12:33 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Accessing Database Using IronRuby > > Hi Jimmy, > > Can I use the ActiveRecord SQL SERVER with Window Forms projects? > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From Jimmy.Schementi at microsoft.com Wed Jun 17 18:56:42 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Wed, 17 Jun 2009 22:56:42 +0000 Subject: [Ironruby-core] Converting an Object to Collection to Bind to DataGridVi In-Reply-To: <9b708ceaca17492ef17a9f020aa542ce@ruby-forum.com> References: <6b673ad509e4fdd73502ddf44643b1d5@ruby-forum.com> <9b708ceaca17492ef17a9f020aa542ce@ruby-forum.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC1438FDEF@tk5ex14mbxc105.redmond.corp.microsoft.com> Did you take a look at how the example I sent you worked? http://github.com/jschementi/railsconf09/blob/master/8-ardb/app.rb ~js > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Wednesday, June 17, 2009 3:36 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Converting an Object to Collection to Bind to > DataGridVi > > Here is another version: > > def bind_customes_to_grid(customer) > > $gvCustomers.DataSource = Array.new.push(customer) > > end > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Wed Jun 17 20:43:38 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Thu, 18 Jun 2009 02:43:38 +0200 Subject: [Ironruby-core] Accessing Database Using IronRuby In-Reply-To: <1653092d0906171625s5e2639f0pf0e8aeb0fe9fe885@mail.gmail.com> References: <464509289df0a20e248e6a5d92f70e81@ruby-forum.com> <175557bcfd5c4199bdea72a36decb47c@ruby-forum.com> <0047ECBFA2E0DF4A834AA369282A5AFC1438F8A3@tk5ex14mbxc105.redmond.corp.microsoft.com> <1653092d0906171625s5e2639f0pf0e8aeb0fe9fe885@mail.gmail.com> Message-ID: <7d662c627edc8116ea454869ba380970@ruby-forum.com> Thanks! -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Wed Jun 17 23:40:21 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Thu, 18 Jun 2009 05:40:21 +0200 Subject: [Ironruby-core] Why IronRuby? Message-ID: <260ad445712ebf292ad94d4a733a6cf1@ruby-forum.com> I have been having fun playing around with IronRuby but one question keeps coming to my mind which is Why IronRuby? What purpose does it serve? I know we can use the simplicity of the IronRuby language to call .NET API's. This means we have two powers combined but will the IronRuby interoperability with .NET get faster since currently it is extremely slow. I need feedback from more experienced developers that what will IronRuby bring to the table of development? -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Thu Jun 18 04:11:14 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 18 Jun 2009 10:11:14 +0200 Subject: [Ironruby-core] Why IronRuby? In-Reply-To: <43d756720906180048j2528ddcdsc17a68ac8e9ca44d@mail.gmail.com> References: <260ad445712ebf292ad94d4a733a6cf1@ruby-forum.com> <43d756720906180048j2528ddcdsc17a68ac8e9ca44d@mail.gmail.com> Message-ID: way faster delivery times. For example it takes me only a fraction of the time to build some fairly complex things in Ruby than it would take me to build in C#. For example I wouldn't have been able to build a mocker that resembles the design I've got in Caricature now in under 2 weeks with a language like C#. Neither is it as doable in C# to build something like ironnails which took me about 3-4 weeks to build in IronRuby. The performance hit mostly occurs at startup time after that IronRuby is fine IMO. Most applications I make wouldn't be benefitting from a fast language because most of them consume webservices/databases/read files and those are where most of the delays come from If it's a fat client app like winforms I guess it would even matter less because you generally don't have to deal with many concurrent calls as you have to do with some server architectures. If you really need the extra performance you can go for a language like C# or something. Extensibility of existing applications would be a big one too. Metaprogramming some bits and pieces of your application etc... --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Thu, Jun 18, 2009 at 9:48 AM, Meinrad Recheis wrote: > We use IronRuby to provide user scripting and light weight plugins for our > C# applications. > Cheers, > -- Henon > > > > > On Thu, Jun 18, 2009 at 5:40 AM, Mohammad Azam wrote: > >> I have been having fun playing around with IronRuby but one question >> keeps coming to my mind which is Why IronRuby? What purpose does it >> serve? >> >> I know we can use the simplicity of the IronRuby language to call .NET >> API's. This means we have two powers combined but will the IronRuby >> interoperability with .NET get faster since currently it is extremely >> slow. >> >> I need feedback from more experienced developers that what will IronRuby >> bring to the table of development? >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> > > > > -- > Git# --> Git for .NET > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Thu Jun 18 08:51:13 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Thu, 18 Jun 2009 14:51:13 +0200 Subject: [Ironruby-core] Linq in IronRuby Message-ID: Is it possible? Thanks, Shay. -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Thu Jun 18 08:57:39 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Thu, 18 Jun 2009 14:57:39 +0200 Subject: [Ironruby-core] Linq in IronRuby In-Reply-To: References: Message-ID: the short answer: No You could build something that builds expression trees that you can pass to the Enumberable extension methods. And you would have to provide a wrapper for the Enumerable implementation that doesn't use extension methods, but this may change or I may do that wrong. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Thu, Jun 18, 2009 at 2:51 PM, Shay Friedman wrote: > Is it possible? > > Thanks, > Shay. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Fri Jun 19 10:02:30 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 19 Jun 2009 16:02:30 +0200 Subject: [Ironruby-core] script for building the silverlight support Message-ID: Hi Is there a script somewhere to build Chiron and friends to get silverlight support? Or do I go through visual studio and fiddle around with the references until they are right? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Fri Jun 19 13:42:14 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Fri, 19 Jun 2009 19:42:14 +0200 Subject: [Ironruby-core] Still Problems with open-uri Message-ID: <9318f1a8f750b9877543f019980f43e1@ruby-forum.com> I have not found a solution for the open-uri problem. It does not recognize that the parameter is a URL and not a file on disk. It keeps throwing URI is not supported error! -- Posted via http://www.ruby-forum.com/. From Jimmy.Schementi at microsoft.com Fri Jun 19 13:55:51 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Fri, 19 Jun 2009 17:55:51 +0000 Subject: [Ironruby-core] script for building the silverlight support In-Reply-To: References: Message-ID: The easiest way is to copy the DLLs from c:\program files\microsoft silverlight\2.0.40115 to merlin\utilities\silverlight\x86ret. Then building the "Silverlight debug/release configurations" from VS or msbuild will work. I believe there are also cmdline shortcuts like bsrbd and bsrbr to do the builds. Let me know if you have any issues. I'll put this on the dev wiki shortly. ~Jimmy Sent from my phone On Jun 19, 2009, at 7:15 AM, "Ivan Porto Carrero" > wrote: Hi Is there a script somewhere to build Chiron and friends to get silverlight support? Or do I go through visual studio and fiddle around with the references until they are right? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Fri Jun 19 14:15:52 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Fri, 19 Jun 2009 20:15:52 +0200 Subject: [Ironruby-core] script for building the silverlight support In-Reply-To: References: Message-ID: yes I should have thought of that :)Instead I took the long road and went in the the project files to edit the silverlight path variable. Anyway I now have a build against SL3 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Jun 19, 2009 at 7:55 PM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > The easiest way is to copy the DLLs from c:\program files\microsoft > silverlight\2.0.40115 to merlin\utilities\silverlight\x86ret. Then building > the "Silverlight debug/release configurations" from VS or msbuild will work. > I believe there are also cmdline shortcuts like bsrbd and bsrbr to do the > builds. > > Let me know if you have any issues. I'll put this on the dev wiki shortly. > > ~JimmySent from my phone > > On Jun 19, 2009, at 7:15 AM, "Ivan Porto Carrero" > wrote: > > Hi > Is there a script somewhere to build Chiron and friends to get silverlight > support? Or do I go through visual studio and fiddle around with the > references until they are right? > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action ( > http://manning.com/carrero) > > _______________________________________________ > 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: From Jimmy.Schementi at microsoft.com Fri Jun 19 14:37:24 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Fri, 19 Jun 2009 18:37:24 +0000 Subject: [Ironruby-core] script for building the silverlight support In-Reply-To: References: Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC18AEF4A6@tk5ex14mbxc106.redmond.corp.microsoft.com> You can also provide a MSBuild variable (or environment variable) ?SilverlightPath? which will change the default path if you don?t want to copy DLLs: msbuild Ruby.sln /p:Configuration=?Silverlight Debug? /p:SilverlightPath=?C:\Program Files\Microsoft Silverlight\3.0.xxxxx Any aliases for building will be in Merlin/Main/Scripts/Bat/Alias.txt, and the ?bsrb/bspy? aliases aren?t there yet. They will be shortly. ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Friday, June 19, 2009 11:16 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] script for building the silverlight support yes I should have thought of that :) Instead I took the long road and went in the the project files to edit the silverlight path variable. Anyway I now have a build against SL3 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Jun 19, 2009 at 7:55 PM, Jimmy Schementi > wrote: The easiest way is to copy the DLLs from c:\program files\microsoft silverlight\2.0.40115 to merlin\utilities\silverlight\x86ret. Then building the "Silverlight debug/release configurations" from VS or msbuild will work. I believe there are also cmdline shortcuts like bsrbd and bsrbr to do the builds. Let me know if you have any issues. I'll put this on the dev wiki shortly. ~Jimmy Sent from my phone On Jun 19, 2009, at 7:15 AM, "Ivan Porto Carrero" > wrote: Hi Is there a script somewhere to build Chiron and friends to get silverlight support? Or do I go through visual studio and fiddle around with the references until they are right? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) _______________________________________________ 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: From will at hotgazpacho.org Sat Jun 20 10:03:08 2009 From: will at hotgazpacho.org (Will Green) Date: Sat, 20 Jun 2009 10:03:08 -0400 Subject: [Ironruby-core] Cucumber status In-Reply-To: <710DF26F214D2B4BB94287123FFE980A2E207FEF11@NA-EXMSG-C104.redmond.corp.microsoft.com> References: <476923c8e320b7c7651a849948217ecd@ruby-forum.com> <903f202085dd1b97b4572b129eee7fb3@ruby-forum.com> <710DF26F214D2B4BB94287123FFE980A2E207FEF11@NA-EXMSG-C104.redmond.corp.microsoft.com> Message-ID: <398d3e0e0906200703u3826a99ftd039de931e0aa201@mail.gmail.com> Shri, I am very interested in using cucumber for my .Net projects, so I'm willing to give it a go at porting win32console. To that end, I've created a git repo for it on GitHub: http://github.com/hotgazpacho/ironruby-win32console Any guidance anyone can offer would be appreciated. Thanks! -- Will Green http://willgreen.mp/ On Mon, Jun 8, 2009 at 2:46 PM, Shri Borde wrote: > With a build from the latest sources, the Cucumber C# example from > http://wiki.github.com/aslakhellesoy/cucumber/ironruby-and-net is working. > Also, only two of the Cucumber tests fail. One seems to be a test issue, and > the other is because of > http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=22984. Please > try out Cucumber and let us know what your experience is. > > One usability issue is that Cucumber uses the win32console gem to > color-code the results it prints to the console, so that failures are in > red, etc. However, the win32console is a native gem and does not work with > IronRuby, and so you do not get colored output. It should be quite easy to > implement the win32console library in pure Ruby code (but marked with > platform="ironruby" as mentioned at > http://ironruby.net/Documentation/Real_Ruby_Applications/RubyGems) using > the System.Console functionality. Anyone interested in doing this? > > Shri > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Mon Jun 22 10:51:39 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 16:51:39 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? Message-ID: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> I have been trying this for weeks now and still no answer. The open-uri is messed up in IronRuby. Why does it always keep opening a file and not the URL? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Jun 22 10:53:31 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 16:53:31 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> Message-ID: <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> Here is the error messages: C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\redist-libs\r uby\1.8>ir IronRuby 0.5.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved. >>> require 'open-uri' :0:in `require': no such file to load -- stringio (LoadError) from ./open-uri.rb:2 from :0 from :0:in `require' -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Jun 22 10:57:36 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 16:57:36 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> Message-ID: Why stringio is not present in the same folder as 'open-uri'? -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Mon Jun 22 11:15:25 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 22 Jun 2009 15:15:25 +0000 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> Message-ID: StringIO is written in C#, so it is part of IronRuby.Libraries.dll. This is because Ruby's StringIO has C extensions. JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Monday, June 22, 2009 7:58 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Where is open-uri and why it does not work? > > Why stringio is not present in the same folder as 'open-uri'? > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Mon Jun 22 11:18:05 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 17:18:05 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> Message-ID: <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> What????? I am talking about 'open-uri' and when I run this: ir myapp.rb It throws the exception that it is missing uri and stringio. Why all the libraries are not put in the same folder why are they distributed in many different folders? And there is a file called 'stringio.rb' Jim Deville wrote: > StringIO is written in C#, so it is part of IronRuby.Libraries.dll. This > is because Ruby's StringIO has C extensions. > > JD > > ...there is no try -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Jun 22 11:23:38 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 17:23:38 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> Message-ID: <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> The libraries required by open-uri to function properly are spread up in two different folders: paths.Add(@"C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs"); paths.Add(@"C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\redist-libs\ruby\1.8"); WHY? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Jun 22 11:26:24 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 17:26:24 +0200 Subject: [Ironruby-core] How to refer to the .rb files in a folder? Message-ID: <48eb1c4de0c4f802adbed1aa8c41b318@ruby-forum.com> I am trying to refer to all the libraries (modules) in the libs folder how can I achieve that: require 'C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs' The above code does not work! -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Mon Jun 22 11:30:52 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 22 Jun 2009 15:30:52 +0000 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> Message-ID: The file stringio.rb (the correct one) has the following in it: # **************************************************************************** # # Copyright (c) Microsoft Corporation. # # This source code is subject to terms and conditions of the Microsoft Public License. A # copy of the license can be found in the License.html file at the root of this distribution. If # you cannot locate the Microsoft Public License, please send an email to # ironruby at microsoft.com. By using this source code in any fashion, you are agreeing to be bound # by the terms of the Microsoft Public License. # # You must not remove this notice, or any other, from this software. # # # **************************************************************************** load_assembly 'IronRuby.Libraries', 'IronRuby.StandardLibrary.StringIO' There are two library paths in IronRuby. One is the redistribution of most of the Ruby Standard library. This is the C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\redist-libs\ruby\1.8 folder. The other is IronRuby specific files to load C-based standard libraries (such as stringio.rb) and stub files to make .NET specific assemblies easier to load (such as System.Windows.Forms.rb). For me, the following works from the IronRuby console. Can you send me the output of it when you try to run it from ir.exe? C:\vsl\m1\Merlin\Main\Bin\Debug [26] > ir.exe IronRuby 0.5.0.0 on .NET 2.0.50727.4908 Copyright (c) Microsoft Corporation. All rights reserved. >>> puts $: c:/vsl/m1/Merlin/Main/Languages/Ruby/libs/ c:/vsl/m1/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/site_ruby/1.8/ c:/vsl/m1/Merlin/External.LCA_RESTRICTED/Languages/Ruby/redist-libs/ruby/1.8/ . => nil >>> require 'open-uri' => true >>> u = open("http://www.google.com") => #, @meta={"proxy-connection"=>"Keep-Ali ve", "connection"=>"Keep-Alive", "transfer-encoding"=>"chunked", "via"=>"1.1 RED-PRXY-27", "expires"=>"-1", "date"=>"Mon , 22 Jun 2009 15:30:20 GMT", "content-type"=>"text/html; charset=ISO-8859-1", "server"=>"gws", "cache-control"=>"private , max-age=0", "set-cookie"=>"PREF=ID=eb7ab68a47c1cfc2:TM=1245684620:LM=1245684620:S=NVRnVXhGZ3bM1DuD; expires=Wed, 22-Ju n-2011 15:30:20 GMT; path=/; domain=.google.com"}, @status=["200", "OK"]> >>> puts u # => nil >>> u.close => nil >>> exit Thanks, JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Monday, June 22, 2009 8:24 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Where is open-uri and why it does not work? > > The libraries required by open-uri to function properly are spread up in two > different folders: > > paths.Add(@"C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs"); > > paths.Add(@"C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Langu > ages\Ruby\redist-libs\ruby\1.8"); > > > WHY? > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From jdeville at microsoft.com Mon Jun 22 11:34:11 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 22 Jun 2009 15:34:11 +0000 Subject: [Ironruby-core] How to refer to the .rb files in a folder? In-Reply-To: <48eb1c4de0c4f802adbed1aa8c41b318@ruby-forum.com> References: <48eb1c4de0c4f802adbed1aa8c41b318@ruby-forum.com> Message-ID: Dir.chdir(".") do Dir["*.rb"].each do |f| require f end end I don't know of a way in Ruby to do what you are asking for without looping through the files. Thanks, JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Monday, June 22, 2009 8:26 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] How to refer to the .rb files in a folder? > > I am trying to refer to all the libraries (modules) in the libs folder how can I > achieve that: > > require 'C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs' > > The above code does not work! > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Mon Jun 22 11:37:19 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 17:37:19 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> Message-ID: <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> Thanks for the detailed explanation! The steps that you have provided worked! But the main question is that if I am using my project from a different directory like C:\RubyProject\ and I am also running IR.exe from C:\RubyProject then how will it find open-uri. It always says 'not able to locate open-uri' file. If I manually add 'open-uri' to c:\rubyproject\libs then it complains not able to find 'uri' -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Mon Jun 22 11:48:07 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 22 Jun 2009 15:48:07 +0000 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> Message-ID: Does it work if you copy open-uri.rb, uri.rb and the uri directory to C:\rubyproject\libs? JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Monday, June 22, 2009 8:37 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Where is open-uri and why it does not work? > > Thanks for the detailed explanation! > > The steps that you have provided worked! > > But the main question is that if I am using my project from a different > directory like C:\RubyProject\ and I am also running IR.exe from > C:\RubyProject then how will it find open-uri. > > It always says 'not able to locate open-uri' file. If I manually add 'open-uri' to > c:\rubyproject\libs then it complains not able to find 'uri' > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Mon Jun 22 11:53:24 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 17:53:24 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> Message-ID: <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> Nope it does not work: Here is the code: require 'libs/System.Windows.Forms' require 'libs/System.Drawing' require 'libs/open-uri' The libs folder contains uri.rb which is taken from C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\ruby-1.8.6p287\lib\ruby\1.8 folder. And here is the error: C:\IronRubyProjects\IronRubyTaskListApplication>ir rss_reader_form.rb :0:in `require': no such file to load -- uri (LoadError) from ./libs/open-uri.rb:1 from rss_reader_form.rb:3 from :0:in `require' -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Mon Jun 22 11:57:42 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 22 Jun 2009 15:57:42 +0000 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> Message-ID: What does puts $: output in that situation? I'm wondering why you have "require 'libs/open-uri'" instead of "require 'open-uri'" JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Monday, June 22, 2009 8:53 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Where is open-uri and why it does not work? > > Nope it does not work: > > Here is the code: > > require 'libs/System.Windows.Forms' > require 'libs/System.Drawing' > require 'libs/open-uri' > > The libs folder contains uri.rb which is taken from > > C:\ironruby\ironruby\Merlin\External.LCA_RESTRICTED\Languages\Ruby\ru > by-1.8.6p287\lib\ruby\1.8 > > folder. > > And here is the error: > > C:\IronRubyProjects\IronRubyTaskListApplication>ir rss_reader_form.rb :0:in > `require': no such file to load -- uri (LoadError) > from ./libs/open-uri.rb:1 > from rss_reader_form.rb:3 > from :0:in `require' > > > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Mon Jun 22 12:00:27 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 18:00:27 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> Message-ID: <90e916b3de7503d21da040520158b22d@ruby-forum.com> It is outputing the following: >>> puts $: C:/WINDOWS/system32 -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Mon Jun 22 12:04:58 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 22 Jun 2009 16:04:58 +0000 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: <90e916b3de7503d21da040520158b22d@ruby-forum.com> References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> <90e916b3de7503d21da040520158b22d@ruby-forum.com> Message-ID: Is this one of our releases? Or is it a build from the git sources? In both cases you should have an ir.exe.config that sets both the libs folder and the redist-libs folder into your load path. Any idea why yours doesn't? JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Monday, June 22, 2009 9:00 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Where is open-uri and why it does not work? > > It is outputing the following: > > > >>> puts $: > C:/WINDOWS/system32 > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Mon Jun 22 12:09:40 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 18:09:40 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> <90e916b3de7503d21da040520158b22d@ruby-forum.com> Message-ID: This is downloaded from Git! I have the ir.exe.config file with the following path setup: The location of this file is: C:\ironruby\ironruby\Merlin\Main\bin\Debug My project location is C:\IronRubyProjects\IronRubyTaskListApplication. I am running the IR.EXX from C:\IronRubyProjects\IronRubyTaskListApplication and then it complains about the open-uri file. I put the open-uri file in the libs folder then is complains about uri file. I put the uri file and uri folder in the libs folder but it still complains about the uri file. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Jun 22 12:10:58 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 18:10:58 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> <90e916b3de7503d21da040520158b22d@ruby-forum.com> Message-ID: <88b4b9dc51460ead125837668c832e1d@ruby-forum.com> I have even tried running ir.exe from my projects folder: C:\IronRubyProjects\IronRubyTaskListApplication>ir IronRuby 0.5.0.0 on .NET 2.0.50727.3053 Copyright (c) Microsoft Corporation. All rights reserved. >>> require 'open-uri' :0:in `require': no such file to load -- open-uri (LoadError) from :0 -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Mon Jun 22 12:13:12 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 22 Jun 2009 16:13:12 +0000 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> <90e916b3de7503d21da040520158b22d@ruby-forum.com> Message-ID: Can you run c:\ironruby\ironruby\Merlin\Main\bin\debug\ir.exe C:\IronRubyProjects\IronRubyTasksApplication\foo.rb (where foo is the startup file for your program)? JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Monday, June 22, 2009 9:10 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Where is open-uri and why it does not work? > > This is downloaded from Git! > > I have the ir.exe.config file with the following path setup: > > > value="..\..\Languages\Ruby\libs\;..\..\..\External.LCA_RESTRICTED\Languag > es\Ruby\redist- > libs\ruby\site_ruby\1.8\;..\..\..\External.LCA_RESTRICTED\Languages\Ruby\r > edist-libs\ruby\1.8\" > /> > > > The location of this file is: > > C:\ironruby\ironruby\Merlin\Main\bin\Debug > > My project location is C:\IronRubyProjects\IronRubyTaskListApplication. > > I am running the IR.EXX from > C:\IronRubyProjects\IronRubyTaskListApplication and then it complains > about the open-uri file. I put the open-uri file in the libs folder then is > complains about uri file. I put the uri file and uri folder in the libs folder but it > still complains about the uri file. > > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Mon Jun 22 12:16:25 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 18:16:25 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> <90e916b3de7503d21da040520158b22d@ruby-forum.com> Message-ID: I should also mention one thing which is that I placed my ir.exe and some other files that are required by ir.exe in System32 folder so that I can access it from anywhere in the directory. -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Mon Jun 22 12:18:19 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 22 Jun 2009 16:18:19 +0000 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> <90e916b3de7503d21da040520158b22d@ruby-forum.com> Message-ID: A better way to do that, in this case, is to just add c:\ironruby\ironruby\Merlin\Main\bin\debug to your %PATH% JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Monday, June 22, 2009 9:16 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Where is open-uri and why it does not work? > > I should also mention one thing which is that I placed my ir.exe and some > other files that are required by ir.exe in System32 folder so that I can access it > from anywhere in the directory. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Mon Jun 22 12:18:52 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 18:18:52 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> <90e916b3de7503d21da040520158b22d@ruby-forum.com> Message-ID: <2e3ea7dbbedaa0b1c901a202810ae8a4@ruby-forum.com> No I cannot run it because it require Windows.Forms and Windows.Drawing modules. If I add those modules then it will work: C:\ironruby\ironruby\Merlin\Main\bin\Debug>ir.exe C:\IronRubyProjects\IronRubyTa skListApplication\main_form.rb C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtin s\KernelOps.cs:423:in `require': no such file to load -- libs/System.Windows.For ms (LoadError) from C:/IronRubyProjects/IronRubyTaskListApplication/main_form.rb:2 -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Jun 22 12:21:31 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 18:21:31 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> <90e916b3de7503d21da040520158b22d@ruby-forum.com> Message-ID: How do I do that? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Jun 22 12:21:49 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 18:21:49 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> <90e916b3de7503d21da040520158b22d@ruby-forum.com> Message-ID: <3b57bfd25e2fb353327317fffa037e1c@ruby-forum.com> Should I also remove ir.exe from System32? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Jun 22 12:26:55 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 18:26:55 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> <90e916b3de7503d21da040520158b22d@ruby-forum.com> Message-ID: <1dbd0102f156de819a417bf82ccbd655@ruby-forum.com> I have added the path to System Variables. The name of RUBYLIBS and the value is c:\ironruby\ironruby\Merlin\Main\bin\debug. Here is the code: require 'libs/System.Windows.Forms' require 'libs/System.Drawing' require 'open-uri' And still giving the same issues: C:\IronRubyProjects\IronRubyTaskListApplication>ir rss_reader_form.rb C:\IronRubyProjects\IronRubyTaskListApplication>ir rss_reader_form.rb :0:in `require': no such file to load -- open-uri (LoadError) from rss_reader_form.rb:3 -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Mon Jun 22 12:31:58 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 18:31:58 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> <90e916b3de7503d21da040520158b22d@ruby-forum.com> Message-ID: I have set up the PATH variable in System Variables to C:\ironruby\ironruby\Merlin\Main\bin\Debug But now windows command prompt is not picking up the ir.exe file! -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Mon Jun 22 12:33:43 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 22 Jun 2009 16:33:43 +0000 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: <1dbd0102f156de819a417bf82ccbd655@ruby-forum.com> References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> <90e916b3de7503d21da040520158b22d@ruby-forum.com> <1dbd0102f156de819a417bf82ccbd655@ruby-forum.com> Message-ID: Remove the RUBYLIBS variable, and then change require 'libs/System.Windows.Forms' to require 'System.Windows.Form'. Do the same for System.Drawing, then let me know how it goes. You shouldn't need to set any Ruby environment variables, since ir.exe.config should set everything up for you right now. JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Monday, June 22, 2009 9:27 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Where is open-uri and why it does not work? > > I have added the path to System Variables. The name of RUBYLIBS and the > value is c:\ironruby\ironruby\Merlin\Main\bin\debug. > > Here is the code: > > require 'libs/System.Windows.Forms' > require 'libs/System.Drawing' > require 'open-uri' > > And still giving the same issues: > > > > C:\IronRubyProjects\IronRubyTaskListApplication>ir rss_reader_form.rb > > C:\IronRubyProjects\IronRubyTaskListApplication>ir rss_reader_form.rb :0:in > `require': no such file to load -- open-uri (LoadError) > from rss_reader_form.rb:3 > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Mon Jun 22 12:34:23 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 18:34:23 +0200 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> <90e916b3de7503d21da040520158b22d@ruby-forum.com> Message-ID: <2414da28f2c6d9f3f17782eaaa29f8af@ruby-forum.com> Finally I got it! I closed the command prompt and ran it again and now everything is working. Even the open-uri started working. Thanks for all your help! The PATH was a good solution to go :) -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Mon Jun 22 12:38:35 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 22 Jun 2009 16:38:35 +0000 Subject: [Ironruby-core] Where is open-uri and why it does not work? In-Reply-To: <2414da28f2c6d9f3f17782eaaa29f8af@ruby-forum.com> References: <6e4d24563819465fe6b7138d84f7d166@ruby-forum.com> <1a79b595f816726140ce7f1ef93104a0@ruby-forum.com> <3c6f9d1649b10d9588f024db1df9ff4a@ruby-forum.com> <4f7dbc47e9644d3c247722abca29675a@ruby-forum.com> <947e51d7afb5bfcbaab491d0a6defce0@ruby-forum.com> <7f8d20076ed28e97ded02e454da704b9@ruby-forum.com> <90e916b3de7503d21da040520158b22d@ruby-forum.com> <2414da28f2c6d9f3f17782eaaa29f8af@ruby-forum.com> Message-ID: Glad that it worked :) JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Monday, June 22, 2009 9:34 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Where is open-uri and why it does not work? > > Finally I got it! > > I closed the command prompt and ran it again and now everything is > working. Even the open-uri started working. > > Thanks for all your help! > > The PATH was a good solution to go :) > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From lists at ruby-forum.com Mon Jun 22 13:00:36 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 22 Jun 2009 19:00:36 +0200 Subject: [Ironruby-core] Method not implemented exception Message-ID: I am not sure but it seems like the rss module is not implemented as of yet. C:\IronRubyProjects\IronRubyTaskListApplication>ir rss_reader_form.rb (eval):16707566:in `install_get_attribute': The method or operation is not imple mented. (System::NotImplementedException) from c:/ironruby/ironruby/Merlin/External.LCA_RESTRICTED/Languages/Ruby/ redist-libs/ruby/1.8/rss/2.0.rb:68 from c:/ironruby/ironruby/Merlin/External.LCA_RESTRICTED/Languages/Ruby/ redist-libs/ruby/1.8/rss/2.0.rb:65 from C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTR ICTED\Extensions\IListOps.cs:757:in `each' from c:/ironruby/ironruby/Merlin/External.LCA_RESTRICTED/Languages/Ruby/ redist-libs/ruby/1.8/rss.rb:8 from C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTR ICTED\Builtins\KernelOps.cs:423:in `require' from rss_reader_form.rb:4 from C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTR ICTED\Builtins\KernelOps.cs:423:in `require' -- Posted via http://www.ruby-forum.com/. From jdeville at microsoft.com Mon Jun 22 13:20:14 2009 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 22 Jun 2009 17:20:14 +0000 Subject: [Ironruby-core] Method not implemented exception In-Reply-To: References: Message-ID: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1483 If we get more votes, we'll bump up the priority, so please vote! Thanks, JD ...there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Monday, June 22, 2009 10:01 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Method not implemented exception > > I am not sure but it seems like the rss module is not implemented as of yet. > > > C:\IronRubyProjects\IronRubyTaskListApplication>ir rss_reader_form.rb > (eval):16707566:in `install_get_attribute': The method or operation is not > imple mented. (System::NotImplementedException) > from > c:/ironruby/ironruby/Merlin/External.LCA_RESTRICTED/Languages/Ruby/ > redist-libs/ruby/1.8/rss/2.0.rb:68 > from > c:/ironruby/ironruby/Merlin/External.LCA_RESTRICTED/Languages/Ruby/ > redist-libs/ruby/1.8/rss/2.0.rb:65 > from > C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTR > ICTED\Extensions\IListOps.cs:757:in `each' > from > c:/ironruby/ironruby/Merlin/External.LCA_RESTRICTED/Languages/Ruby/ > redist-libs/ruby/1.8/rss.rb:8 > from > C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTR > ICTED\Builtins\KernelOps.cs:423:in `require' > from rss_reader_form.rb:4 > from > C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTR > ICTED\Builtins\KernelOps.cs:423:in `require' > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From xerxesb at gmail.com Tue Jun 23 00:03:58 2009 From: xerxesb at gmail.com (Xerxes Battiwalla) Date: Tue, 23 Jun 2009 14:03:58 +1000 Subject: [Ironruby-core] Dynamic Binding fails if abstract event not implemented Message-ID: Hi - I've just downloaded the latest IR source from GitHub and have a problem with what looks like a regression from v0.4. We have an interface defining an event which is implemented by an abstract class in C#. In Ruby, we create an implementation of the abstract class and call only a subset of methods as we require them. The 0.4 version played nicely and would only do the dynamic binding of methods we required at the time we called them, however the latest version of IR seems to try and bind the event (even though we don't hook up to it) and can't find an implementation in ruby so it throws a TypeLoadException citing the adder for the event does not have an implementation. A reproducible case is pasted below. Hoping someone would be able to shed light on whether this is intentional, and if so what we can do to implement the event in ruby. *************************** using System; namespace HelloWorldApp { public interface IHelloWorld { event EventHandler SomeEvent; } public abstract class AbstractHelloWorld : IHelloWorld { public abstract event EventHandler SomeEvent; } } *************************** require "HelloWorldApp.dll" class HelloWorlder < HelloWorldApp::AbstractHelloWorld end @hello_app = HelloWorlder.new #barf *************************** D:\source\dotnet\IronRubyInteropBug>ir ruby_test.rb mscorlib:0:in `_TermCreateClass': Method 'add_SomeEvent' in type 'IronRuby.Classes.AbstractHelloWorld$1' from assembly 'Snippets.scripting, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation. (System::TypeLoadException) from mscorlib:0:in `CreateTypeNoLock' from mscorlib:0:in `CreateType' from c:\IronRuby\ndp\fx\src\Core\Microsoft\Scripting\Actions\DynamicMetaObjectBinder.cs:107:in `Bind' from c:\IronRuby\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSiteBinder.cs:85:in `BindCore' from ruby_test.rb:6 Any assistance appreciated - cheers! -xerx From Tomas.Matousek at microsoft.com Tue Jun 23 00:49:01 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 22 Jun 2009 21:49:01 -0700 Subject: [Ironruby-core] Dynamic Binding fails if abstract event not implemented In-Reply-To: References: Message-ID: Definitely a bug. I've filed it under http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1628. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Xerxes Battiwalla Sent: Monday, June 22, 2009 9:04 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Dynamic Binding fails if abstract event not implemented Hi - I've just downloaded the latest IR source from GitHub and have a problem with what looks like a regression from v0.4. We have an interface defining an event which is implemented by an abstract class in C#. In Ruby, we create an implementation of the abstract class and call only a subset of methods as we require them. The 0.4 version played nicely and would only do the dynamic binding of methods we required at the time we called them, however the latest version of IR seems to try and bind the event (even though we don't hook up to it) and can't find an implementation in ruby so it throws a TypeLoadException citing the adder for the event does not have an implementation. A reproducible case is pasted below. Hoping someone would be able to shed light on whether this is intentional, and if so what we can do to implement the event in ruby. *************************** using System; namespace HelloWorldApp { public interface IHelloWorld { event EventHandler SomeEvent; } public abstract class AbstractHelloWorld : IHelloWorld { public abstract event EventHandler SomeEvent; } } *************************** require "HelloWorldApp.dll" class HelloWorlder < HelloWorldApp::AbstractHelloWorld end @hello_app = HelloWorlder.new #barf *************************** D:\source\dotnet\IronRubyInteropBug>ir ruby_test.rb mscorlib:0:in `_TermCreateClass': Method 'add_SomeEvent' in type 'IronRuby.Classes.AbstractHelloWorld$1' from assembly 'Snippets.scripting, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation. (System::TypeLoadException) from mscorlib:0:in `CreateTypeNoLock' from mscorlib:0:in `CreateType' from c:\IronRuby\ndp\fx\src\Core\Microsoft\Scripting\Actions\DynamicMetaObjectBinder.cs:107:in `Bind' from c:\IronRuby\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSiteBinder.cs:85:in `BindCore' from ruby_test.rb:6 Any assistance appreciated - cheers! -xerx _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From xerxesb at gmail.com Tue Jun 23 01:42:38 2009 From: xerxesb at gmail.com (Xerxes Battiwalla) Date: Tue, 23 Jun 2009 15:42:38 +1000 Subject: [Ironruby-core] Dynamic Binding fails if abstract event not implemented In-Reply-To: References: Message-ID: great - thanks for the follow up, Tomas. Is there a workaround we could use in the meantime? Really keen to get Cucumber going ;) -Xerx On Tue, Jun 23, 2009 at 2:49 PM, Tomas Matousek wrote: > Definitely a bug. I've filed it under http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1628. > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Xerxes Battiwalla > Sent: Monday, June 22, 2009 9:04 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Dynamic Binding fails if abstract event not implemented > > Hi - I've just downloaded the latest IR source from GitHub and have a > problem with what looks like a regression from v0.4. > > We have an interface defining an event which is implemented by an > abstract class in C#. In Ruby, we create an implementation of the > abstract class and call only a subset of methods as we require them. > The 0.4 version played nicely and would only do the dynamic binding of > methods we required at the time we called them, however the latest > version of IR seems to try and bind the event (even though we don't > hook up to it) and can't find an implementation in ruby so it throws a > TypeLoadException citing the adder for the event does not have an > implementation. > > A reproducible case is pasted below. Hoping someone would be able to > shed light on whether this is intentional, and if so what we can do to > implement the event in ruby. > > *************************** > using System; > > namespace HelloWorldApp > { > ? ?public interface IHelloWorld > ? ?{ > ? ? ? ?event EventHandler SomeEvent; > ? ?} > > ? ?public abstract class AbstractHelloWorld : IHelloWorld > ? ?{ > ? ? ? ?public abstract event EventHandler SomeEvent; > ? ?} > } > > *************************** > require "HelloWorldApp.dll" > > class HelloWorlder < HelloWorldApp::AbstractHelloWorld > end > > @hello_app = HelloWorlder.new #barf > > *************************** > D:\source\dotnet\IronRubyInteropBug>ir ruby_test.rb > mscorlib:0:in `_TermCreateClass': Method 'add_SomeEvent' in type > 'IronRuby.Classes.AbstractHelloWorld$1' from assembly > 'Snippets.scripting, Version=0.0.0.0, Culture=neutral, > PublicKeyToken=null' does not have an implementation. > (System::TypeLoadException) > ? ? ? ?from mscorlib:0:in `CreateTypeNoLock' > ? ? ? ?from mscorlib:0:in `CreateType' > ? ? ? ?from c:\IronRuby\ndp\fx\src\Core\Microsoft\Scripting\Actions\DynamicMetaObjectBinder.cs:107:in > `Bind' > ? ? ? ?from c:\IronRuby\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSiteBinder.cs:85:in > `BindCore' > ? ? ? ?from ruby_test.rb:6 > > > Any assistance appreciated - cheers! > > -xerx > _______________________________________________ > 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 > From Tomas.Matousek at microsoft.com Tue Jun 23 02:51:57 2009 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 22 Jun 2009 23:51:57 -0700 Subject: [Ironruby-core] Dynamic Binding fails if abstract event not implemented In-Reply-To: References: Message-ID: Could you derive from AbstractHelloWorld in C# and implement the abstract event and then derive from this derived class in Ruby? Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Xerxes Battiwalla Sent: Monday, June 22, 2009 10:43 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Dynamic Binding fails if abstract event not implemented great - thanks for the follow up, Tomas. Is there a workaround we could use in the meantime? Really keen to get Cucumber going ;) -Xerx On Tue, Jun 23, 2009 at 2:49 PM, Tomas Matousek wrote: > Definitely a bug. I've filed it under http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1628. > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Xerxes Battiwalla > Sent: Monday, June 22, 2009 9:04 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Dynamic Binding fails if abstract event not implemented > > Hi - I've just downloaded the latest IR source from GitHub and have a > problem with what looks like a regression from v0.4. > > We have an interface defining an event which is implemented by an > abstract class in C#. In Ruby, we create an implementation of the > abstract class and call only a subset of methods as we require them. > The 0.4 version played nicely and would only do the dynamic binding of > methods we required at the time we called them, however the latest > version of IR seems to try and bind the event (even though we don't > hook up to it) and can't find an implementation in ruby so it throws a > TypeLoadException citing the adder for the event does not have an > implementation. > > A reproducible case is pasted below. Hoping someone would be able to > shed light on whether this is intentional, and if so what we can do to > implement the event in ruby. > > *************************** > using System; > > namespace HelloWorldApp > { > ? ?public interface IHelloWorld > ? ?{ > ? ? ? ?event EventHandler SomeEvent; > ? ?} > > ? ?public abstract class AbstractHelloWorld : IHelloWorld > ? ?{ > ? ? ? ?public abstract event EventHandler SomeEvent; > ? ?} > } > > *************************** > require "HelloWorldApp.dll" > > class HelloWorlder < HelloWorldApp::AbstractHelloWorld > end > > @hello_app = HelloWorlder.new #barf > > *************************** > D:\source\dotnet\IronRubyInteropBug>ir ruby_test.rb > mscorlib:0:in `_TermCreateClass': Method 'add_SomeEvent' in type > 'IronRuby.Classes.AbstractHelloWorld$1' from assembly > 'Snippets.scripting, Version=0.0.0.0, Culture=neutral, > PublicKeyToken=null' does not have an implementation. > (System::TypeLoadException) > ? ? ? ?from mscorlib:0:in `CreateTypeNoLock' > ? ? ? ?from mscorlib:0:in `CreateType' > ? ? ? ?from c:\IronRuby\ndp\fx\src\Core\Microsoft\Scripting\Actions\DynamicMetaObjectBinder.cs:107:in > `Bind' > ? ? ? ?from c:\IronRuby\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSiteBinder.cs:85:in > `BindCore' > ? ? ? ?from ruby_test.rb:6 > > > Any assistance appreciated - cheers! > > -xerx > _______________________________________________ > 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 From xerxesb at gmail.com Tue Jun 23 03:34:20 2009 From: xerxesb at gmail.com (Xerxes Battiwalla) Date: Tue, 23 Jun 2009 17:34:20 +1000 Subject: [Ironruby-core] Dynamic Binding fails if abstract event not implemented In-Reply-To: References: Message-ID: Actually the AbstractHelloWorld is used as a work-around for implementing the interface directly in ruby (see http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=772), so implementing it in C# gives us no benefit. I did try (in our codebase, i havent tested this particular example) removing the abstract modifier on SomeEvent in AbstractHelloWorld and leaving everything else as abstract on the interface, and I get the same failure for add_OnProgress on IronRuby::System::Object. -Xerx On Tue, Jun 23, 2009 at 4:51 PM, Tomas Matousek wrote: > Could you derive from AbstractHelloWorld in C# and implement the abstract event and then derive from this derived class in Ruby? > > Tomas > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Xerxes Battiwalla > Sent: Monday, June 22, 2009 10:43 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Dynamic Binding fails if abstract event not implemented > > great - thanks for the follow up, Tomas. > > Is there a workaround we could use in the meantime? Really keen to get > Cucumber going ;) > > -Xerx > > On Tue, Jun 23, 2009 at 2:49 PM, Tomas > Matousek wrote: >> Definitely a bug. I've filed it under http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1628. >> >> Tomas >> >> -----Original Message----- >> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Xerxes Battiwalla >> Sent: Monday, June 22, 2009 9:04 PM >> To: ironruby-core at rubyforge.org >> Subject: [Ironruby-core] Dynamic Binding fails if abstract event not implemented >> >> Hi - I've just downloaded the latest IR source from GitHub and have a >> problem with what looks like a regression from v0.4. >> >> We have an interface defining an event which is implemented by an >> abstract class in C#. In Ruby, we create an implementation of the >> abstract class and call only a subset of methods as we require them. >> The 0.4 version played nicely and would only do the dynamic binding of >> methods we required at the time we called them, however the latest >> version of IR seems to try and bind the event (even though we don't >> hook up to it) and can't find an implementation in ruby so it throws a >> TypeLoadException citing the adder for the event does not have an >> implementation. >> >> A reproducible case is pasted below. Hoping someone would be able to >> shed light on whether this is intentional, and if so what we can do to >> implement the event in ruby. >> >> *************************** >> using System; >> >> namespace HelloWorldApp >> { >> ? ?public interface IHelloWorld >> ? ?{ >> ? ? ? ?event EventHandler SomeEvent; >> ? ?} >> >> ? ?public abstract class AbstractHelloWorld : IHelloWorld >> ? ?{ >> ? ? ? ?public abstract event EventHandler SomeEvent; >> ? ?} >> } >> >> *************************** >> require "HelloWorldApp.dll" >> >> class HelloWorlder < HelloWorldApp::AbstractHelloWorld >> end >> >> @hello_app = HelloWorlder.new #barf >> >> *************************** >> D:\source\dotnet\IronRubyInteropBug>ir ruby_test.rb >> mscorlib:0:in `_TermCreateClass': Method 'add_SomeEvent' in type >> 'IronRuby.Classes.AbstractHelloWorld$1' from assembly >> 'Snippets.scripting, Version=0.0.0.0, Culture=neutral, >> PublicKeyToken=null' does not have an implementation. >> (System::TypeLoadException) >> ? ? ? ?from mscorlib:0:in `CreateTypeNoLock' >> ? ? ? ?from mscorlib:0:in `CreateType' >> ? ? ? ?from c:\IronRuby\ndp\fx\src\Core\Microsoft\Scripting\Actions\DynamicMetaObjectBinder.cs:107:in >> `Bind' >> ? ? ? ?from c:\IronRuby\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSiteBinder.cs:85:in >> `BindCore' >> ? ? ? ?from ruby_test.rb:6 >> >> >> Any assistance appreciated - cheers! >> >> -xerx >> _______________________________________________ >> 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 > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > From ivan at flanders.co.nz Tue Jun 23 03:51:17 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 23 Jun 2009 09:51:17 +0200 Subject: [Ironruby-core] Dynamic Binding fails if abstract event not implemented In-Reply-To: References: Message-ID: I've been meaning to ask this for a while now. Can I implement an event that is defined on an interface because whichever way I try it just won't work. public interface IHaveAnEvent { event EventHandler SomeEvent; } class EventImplementor include IHaveAnEvent # what now? I can't find any test cases for interface to see how it can be done. end --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 23, 2009 at 6:03 AM, Xerxes Battiwalla wrote: > Hi - I've just downloaded the latest IR source from GitHub and have a > problem with what looks like a regression from v0.4. > > We have an interface defining an event which is implemented by an > abstract class in C#. In Ruby, we create an implementation of the > abstract class and call only a subset of methods as we require them. > The 0.4 version played nicely and would only do the dynamic binding of > methods we required at the time we called them, however the latest > version of IR seems to try and bind the event (even though we don't > hook up to it) and can't find an implementation in ruby so it throws a > TypeLoadException citing the adder for the event does not have an > implementation. > > A reproducible case is pasted below. Hoping someone would be able to > shed light on whether this is intentional, and if so what we can do to > implement the event in ruby. > > *************************** > using System; > > namespace HelloWorldApp > { > public interface IHelloWorld > { > event EventHandler SomeEvent; > } > > public abstract class AbstractHelloWorld : IHelloWorld > { > public abstract event EventHandler SomeEvent; > } > } > > *************************** > require "HelloWorldApp.dll" > > class HelloWorlder < HelloWorldApp::AbstractHelloWorld > end > > @hello_app = HelloWorlder.new #barf > > *************************** > D:\source\dotnet\IronRubyInteropBug>ir ruby_test.rb > mscorlib:0:in `_TermCreateClass': Method 'add_SomeEvent' in type > 'IronRuby.Classes.AbstractHelloWorld$1' from assembly > 'Snippets.scripting, Version=0.0.0.0, Culture=neutral, > PublicKeyToken=null' does not have an implementation. > (System::TypeLoadException) > from mscorlib:0:in `CreateTypeNoLock' > from mscorlib:0:in `CreateType' > from > c:\IronRuby\ndp\fx\src\Core\Microsoft\Scripting\Actions\DynamicMetaObjectBinder.cs:107:in > `Bind' > from > c:\IronRuby\ndp\fx\src\Core\Microsoft\Scripting\Actions\CallSiteBinder.cs:85:in > `BindCore' > from ruby_test.rb:6 > > > Any assistance appreciated - cheers! > > -xerx > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Tue Jun 23 11:19:07 2009 From: lists at ruby-forum.com (Kevin Radcliffe) Date: Tue, 23 Jun 2009 17:19:07 +0200 Subject: [Ironruby-core] Dynamic Binding fails if abstract event not implemented In-Reply-To: References: Message-ID: Ivan Porto carrero wrote: > I've been meaning to ask this for a while now. > Can I implement an event that is defined on an interface because > whichever > way I try it just won't work. > > public interface IHaveAnEvent { event EventHandler SomeEvent; } > > class EventImplementor > include IHaveAnEvent > > # what now? I can't find any test cases for interface to see how it > can be > done. > end > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) I was trying to implement an interface to use OpenRasta from IronRuby and ran into the same thing. Received the same error as Xerx did above, and assumed it was just a limitation of the language at the moment. Would be great if we can implement the add_SomeEvent handlers at some point though. For now I voted for the CodePlex issue Tomas pointed out above. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 23 11:49:52 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 23 Jun 2009 17:49:52 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample Message-ID: Hi Ivan Porto carrero, Great work on the MVC IronRuby sample! I am curious to know how it works! I created an ASP.NET MVC application. I created the controller and view but how will the views get called. Here is my controller: require 'application_controller' class HomeController < ApplicationController def index @message = "Welcome from IronRuby!" view('Index') end def about view('Index') end end And here is the view:

<%= html.encode(view_data.message) %>

To learn more about ASP.NET MVC visit http://asp.net/mvc.

Thanks! -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 23 11:58:02 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 23 Jun 2009 17:58:02 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: Message-ID: <2689af59e346d0d28e2c65e57de63383@ruby-forum.com> For some reason it is not running for me out of the box. When I run the application the following exception is thrown: Could not load file or assembly 'System.Data.SQLite' or one of its dependencies. An attempt was made to load a program with an incorrect format. Even though the reference to System.Data.SQLite is already made! -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Tue Jun 23 12:38:33 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 23 Jun 2009 18:38:33 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: <2689af59e346d0d28e2c65e57de63383@ruby-forum.com> References: <2689af59e346d0d28e2c65e57de63383@ruby-forum.com> Message-ID: You have a 32-bit machine right? You need to download the 32-bit version of the System.Data.SQLite.dll and replace that one.. I've got one here if you want it, email me off-list --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 23, 2009 at 5:58 PM, Mohammad Azam wrote: > > For some reason it is not running for me out of the box. When I run the > application the following exception is thrown: > > Could not load file or assembly 'System.Data.SQLite' or one of its > dependencies. An attempt was made to load a program with an incorrect > format. > > Even though the reference to System.Data.SQLite is already made! > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Tue Jun 23 12:46:09 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 23 Jun 2009 18:46:09 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: Message-ID: Asp.net MVC has the ability to add view engines Each view engine defines a bunch of search patterns, and you can configure the location of the views but the convention is views so I'd stick with that :) When you request the view "index" the controller will ask the view engines collection if it can find a view with that name in a location /views/controllername/ The first view that matches the file name like index.html.erb or index.aspx also selects the view engine. From there on the view engine reads the file and executes it, after setting a bunch of variables that can be used in the view script like the view data dictionary. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 23, 2009 at 5:49 PM, Mohammad Azam wrote: > Hi Ivan Porto carrero, > > Great work on the MVC IronRuby sample! > > I am curious to know how it works! I created an ASP.NET MVC application. > I created the controller and view but how will the views get called. > > Here is my controller: > > require 'application_controller' > > class HomeController < ApplicationController > > > def index > @message = "Welcome from IronRuby!" > view('Index') > end > > def about > view('Index') > end > > end > > > And here is the view: > >

<%= html.encode(view_data.message) %>

>

> To learn more about ASP.NET MVC visit href="http://asp.net/mvc" title="ASP.NET MVC > Website">http://asp.net/mvc. >

> > > Thanks! > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Tue Jun 23 14:31:39 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 23 Jun 2009 20:31:39 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: Message-ID: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> Is there any special place where you register the ViewEngine. I have files with extensions .rhtml but they are not being picked up by the MVC application. -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Tue Jun 23 14:35:45 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 23 Jun 2009 20:35:45 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> Message-ID: rename them to .html.erb that should work. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 23, 2009 at 8:31 PM, Mohammad Azam wrote: > Is there any special place where you register the ViewEngine. I have > files with extensions .rhtml but they are not being picked up by the MVC > application. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Tue Jun 23 14:39:52 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 23 Jun 2009 20:39:52 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> Message-ID: <01c4c1aac25c8dccc67cdc361332d625@ruby-forum.com> I tried it! It is throwing a 404 error: The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /account Here is the controller: class AccountController < Controller def index @message = "Welcome from IronRuby!" return view end def about return view end end And here is the View:

Hello from IronRuby!

Thanks, -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 23 14:58:43 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 23 Jun 2009 20:58:43 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> Message-ID: <02bd268d9bd3c1d1e382a80511e9399e@ruby-forum.com> Do I also need mvc_application even thought I am not using the LightSpeed data access layer? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 23 14:59:50 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 23 Jun 2009 20:59:50 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> Message-ID: If I load the Default.aspx page I get the following error: The incoming request does not match any route. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: The incoming request does not match any route. Source Error: Line 16: HttpContext.Current.RewritePath(Request.ApplicationPath, false); Line 17: IHttpHandler httpHandler = new MvcHttpHandler(); Line 18: httpHandler.ProcessRequest(HttpContext.Current); Line 19: HttpContext.Current.RewritePath(originalPath, false); Line 20: } Source File: C:\Projects\IronRubyMVCWebApps\IronRubyMVCWebApps\IronRubyMVCWebApps\Default.aspx.cs Line: 18 I have all the routes in the Routes.rb file: require 'mvc_application' #default routes $routes.ignore_route("{resource}.axd/{*pathInfo}"); $routes.map_route("default", "{controller}/{action}/{id}", {:controller => 'Home', :action => 'index', :id => ''}) -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Tue Jun 23 15:16:12 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 23 Jun 2009 21:16:12 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> Message-ID: Does the sample work on your machine if you use the correct sqlite assembly? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 23, 2009 at 8:59 PM, Mohammad Azam wrote: > If I load the Default.aspx page I get the following error: > > The incoming request does not match any route. > Description: An unhandled exception occurred during the execution of the > current web request. Please review the stack trace for more information > about the error and where it originated in the code. > > Exception Details: System.Web.HttpException: The incoming request does > not match any route. > > Source Error: > > Line 16: > HttpContext.Current.RewritePath(Request.ApplicationPath, false); > Line 17: IHttpHandler httpHandler = new MvcHttpHandler(); > Line 18: httpHandler.ProcessRequest(HttpContext.Current); > Line 19: HttpContext.Current.RewritePath(originalPath, > false); > Line 20: } > > > Source File: > > C:\Projects\IronRubyMVCWebApps\IronRubyMVCWebApps\IronRubyMVCWebApps\Default.aspx.cs > Line: 18 > > > I have all the routes in the Routes.rb file: > > require 'mvc_application' > > > #default routes > $routes.ignore_route("{resource}.axd/{*pathInfo}"); > > $routes.map_route("default", "{controller}/{action}/{id}", {:controller > => 'Home', :action => 'index', :id => ''}) > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Tue Jun 23 15:18:53 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 23 Jun 2009 21:18:53 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> Message-ID: <502154c0e039d7b7a3a03cb6986a078b@ruby-forum.com> I have not tried it with the SqlLite assembly. I am simply trying to say "/home" and it should trigger the HomeController. I am following this example: http://haacked.com/archive/2008/04/22/defining-asp.net-mvc-routes-and-views-in-ironruby.aspx -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 23 15:21:52 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 23 Jun 2009 21:21:52 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> Message-ID: <9672e782834e8d8101de83853ce2182a@ruby-forum.com> Is there any link between the IronRubyMvcLibrary? Do I need that library? How will the application know to load the routes from routes.rb file? -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 23 15:23:03 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 23 Jun 2009 21:23:03 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> Message-ID: Here is the latest error: The incoming request does not match any route. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: The incoming request does not match any route. Source Error: Line 16: HttpContext.Current.RewritePath(Request.ApplicationPath, false); Line 17: IHttpHandler httpHandler = new MvcHttpHandler(); Line 18: httpHandler.ProcessRequest(HttpContext.Current); Line 19: HttpContext.Current.RewritePath(originalPath, false); Line 20: } Source File: C:\Projects\IronRubyMVCWebApps\IronRubyMVCWebApps\IronRubyMVCWebApps\Default.aspx.cs Line: 18 -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 23 15:31:05 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 23 Jun 2009 21:31:05 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <2689af59e346d0d28e2c65e57de63383@ruby-forum.com> Message-ID: <00d1e9a07b0045af7f04ab86c8365ca3@ruby-forum.com> Where can I download the 32 bit version? Ivan Porto carrero wrote: > You have a 32-bit machine right? > You need to download the 32-bit version of the System.Data.SQLite.dll > and > replace that one.. I've got one here if you want it, email me off-list > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Tue Jun 23 15:33:38 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 23 Jun 2009 21:33:38 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: <9672e782834e8d8101de83853ce2182a@ruby-forum.com> References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> <9672e782834e8d8101de83853ce2182a@ruby-forum.com> Message-ID: Sqlite lib: http://sourceforge.net/project/showfiles.php?group_id=132486&package_id=145568 You need to have a reference to the ironrubymvc library and compile the asp.net mvc project once from then on things should start to work. Getting started 1. Install ASP.NET MVC (link?) 2. Create a new ASP.NET MVC project in Visual Studio 3. Add a reference to System.Web.Mvc.IronRuby.dll 4. Open Global.asax.cs and ... // add this to your usings using System.Web.Mvc; // make the subclass of "MvcApplication" be "RubyMvcApplication" namespace MyIronRubyMvcApp { public class MvcApplication : RubyMvcApplication { } } 5. Create Routes.rb and define a default route: $routes.ignore_route "{resource}.axd/{*pathInfo}" $routes.map_route "default", "{controller}/{action}/{id}", :controller => 'Home', :action => 'index', :id => '' --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero GSM: +32.486.787.582 Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 23, 2009 at 9:21 PM, Mohammad Azam wrote: > Is there any link between the IronRubyMvcLibrary? > > Do I need that library? > > How will the application know to load the routes from routes.rb file? > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Tue Jun 23 15:42:35 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 23 Jun 2009 21:42:35 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> <9672e782834e8d8101de83853ce2182a@ruby-forum.com> Message-ID: The ironruby mvc library being System.Web.Mvc.IronRuby.dll and the routes got borked $routes.ignore_route "{resource}.axd/{*pathInfo}" $routes.map_route "default", "{controller}/{action}/{id}", :controller => 'Home', :action => 'index', :id => ''" I suggest you take jimmy's repository of ironrubymvc. I will sometimes break existing functionality http://github.com/jschementi/ironrubymvc/tree/master You should also be able to re-use existing filters defined in C# etc. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 23, 2009 at 9:33 PM, Ivan Porto Carrero wrote: > Sqlite lib: > > http://sourceforge.net/project/showfiles.php?group_id=132486&package_id=145568 > > You need to have a reference to the ironrubymvc library and compile the > asp.net mvc project once from then on things should start to work. > > > Getting started > > 1. Install ASP.NET MVC (link?) > 2. Create a new ASP.NET MVC project in Visual Studio > 3. Add a reference to System.Web.Mvc.IronRuby.dll > 4. > > Open Global.asax.cs and ... > > // add this to your usings using System.Web.Mvc; > > // make the subclass of "MvcApplication" be "RubyMvcApplication" > namespace MyIronRubyMvcApp { > > public class MvcApplication : RubyMvcApplication { > > } > > } > 5. > > Create Routes.rb and define a default route: > > $routes.ignore_route "{resource}.axd/{*pathInfo}" > > $routes.map_route "default", "{controller}/{action}/{id}", :controller => 'Home', :action => 'index', :id => ''" > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > GSM: +32.486.787.582 > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Tue, Jun 23, 2009 at 9:21 PM, Mohammad Azam wrote: > >> Is there any link between the IronRubyMvcLibrary? >> >> Do I need that library? >> >> How will the application know to load the routes from routes.rb file? >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Tue Jun 23 15:46:56 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 23 Jun 2009 21:46:56 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> <9672e782834e8d8101de83853ce2182a@ruby-forum.com> Message-ID: <9c148be37f28eab278738856e8f26aaf@ruby-forum.com> In your download you never subclass from RubyMvcApplication. I have tried to subclass from RubyMvcApplication but it is giving me the same issue: The incoming request does not match any route. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: The incoming request does not match any route. Source Error: Line 16: HttpContext.Current.RewritePath(Request.ApplicationPath, false); Line 17: IHttpHandler httpHandler = new MvcHttpHandler(); Line 18: httpHandler.ProcessRequest(HttpContext.Current); Line 19: HttpContext.Current.RewritePath(originalPath, false); Line 20: } Source File: C:\Projects\IronRubyMVCWebApps\IronRubyMVCWebApps\IronRubyMVCWebApps\Default.aspx.cs Line: 18 -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 23 16:01:42 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 23 Jun 2009 22:01:42 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> <9672e782834e8d8101de83853ce2182a@ruby-forum.com> Message-ID: I copied your code to a new project and still it is giving me issues. It is not picking up the Routes.rb file. Is there anything interesting in ApplicationController since I am not using ApplicationController. -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Tue Jun 23 16:01:31 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 23 Jun 2009 22:01:31 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: <9c148be37f28eab278738856e8f26aaf@ruby-forum.com> References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> <9672e782834e8d8101de83853ce2182a@ruby-forum.com> <9c148be37f28eab278738856e8f26aaf@ruby-forum.com> Message-ID: http://github.com/casualjim/ironrubymvc-sample/blob/75a1aee810e2b2b5a99a538cc73ca89b0a3df438/IR_Todo/Global.asax.cs#L12 You also need to change this assembly redirection in the config file to point to the correct version number of your sqlite assembly. http://github.com/casualjim/ironrubymvc-sample/blob/75a1aee810e2b2b5a99a538cc73ca89b0a3df438/IR_Todo/Web.config#L143 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 23, 2009 at 9:46 PM, Mohammad Azam wrote: > > In your download you never subclass from RubyMvcApplication. I have > tried to subclass from RubyMvcApplication but it is giving me the same > issue: > > The incoming request does not match any route. > Description: An unhandled exception occurred during the execution of the > current web request. Please review the stack trace for more information > about the error and where it originated in the code. > > Exception Details: System.Web.HttpException: The incoming request does > not match any route. > > Source Error: > > Line 16: > HttpContext.Current.RewritePath(Request.ApplicationPath, false); > Line 17: IHttpHandler httpHandler = new MvcHttpHandler(); > Line 18: httpHandler.ProcessRequest(HttpContext.Current); > Line 19: HttpContext.Current.RewritePath(originalPath, > false); > Line 20: } > > > Source File: > > C:\Projects\IronRubyMVCWebApps\IronRubyMVCWebApps\IronRubyMVCWebApps\Default.aspx.cs > Line: 18 > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Tue Jun 23 16:02:04 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 23 Jun 2009 22:02:04 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: <9c148be37f28eab278738856e8f26aaf@ruby-forum.com> References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> <9672e782834e8d8101de83853ce2182a@ruby-forum.com> <9c148be37f28eab278738856e8f26aaf@ruby-forum.com> Message-ID: which OS and web server are you using? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 23, 2009 at 9:46 PM, Mohammad Azam wrote: > > In your download you never subclass from RubyMvcApplication. I have > tried to subclass from RubyMvcApplication but it is giving me the same > issue: > > The incoming request does not match any route. > Description: An unhandled exception occurred during the execution of the > current web request. Please review the stack trace for more information > about the error and where it originated in the code. > > Exception Details: System.Web.HttpException: The incoming request does > not match any route. > > Source Error: > > Line 16: > HttpContext.Current.RewritePath(Request.ApplicationPath, false); > Line 17: IHttpHandler httpHandler = new MvcHttpHandler(); > Line 18: httpHandler.ProcessRequest(HttpContext.Current); > Line 19: HttpContext.Current.RewritePath(originalPath, > false); > Line 20: } > > > Source File: > > C:\Projects\IronRubyMVCWebApps\IronRubyMVCWebApps\IronRubyMVCWebApps\Default.aspx.cs > Line: 18 > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Tue Jun 23 16:06:13 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 23 Jun 2009 22:06:13 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> <9672e782834e8d8101de83853ce2182a@ruby-forum.com> <9c148be37f28eab278738856e8f26aaf@ruby-forum.com> Message-ID: I am not using SqlLite anymore!! I just want to trigger the action and display the view. I am running ASP.NET 3.5 using ASP.NET build in server. Here is everything: Routes.rb: #default routes $routes.ignore_route("{resource}.axd/{*pathInfo}"); $routes.map_route("default", "{controller}/{action}/{id}", {:controller => 'Home', :action => 'index', :id => ''}) home_controller.rb: class HomeController < Controller def index @message = "Welcome to ASP.NET MVC!" view end def about view end end Views/Home/index.html.erb

<%= html.encode(view_data.message) %>

To learn more about ASP.NET MVC visit http://asp.net/mvc.

Global.asax: public class MvcApplication : RubyMvcApplication { } -- Posted via http://www.ruby-forum.com/. From tmilker at gmail.com Tue Jun 23 16:06:38 2009 From: tmilker at gmail.com (Ted Milker) Date: Tue, 23 Jun 2009 15:06:38 -0500 Subject: [Ironruby-core] Assistance Needed Running IronRuby.Rack.Example Message-ID: <7d8bf26d0906231306q20420ee8l833b4fd31b7b4f58@mail.gmail.com> Could I get some assistance in running rack on IronRuby? I am just trying out: http://github.com/jschementi/ironruby/tree/master/Merlin/Main/Hosts/IronRuby.Rack from RailsConf, not the latest one from the IronRuby tree. Everything has built successfully and I had to modify Web.config to point to my MRI 1.8 installation directory but this is as far as I can get. I have tried both igem install rack and gem install rack but I still receive this message. Running on IIS7 under Windows Vista 64bit. I do not have any release versions of IronRuby installed on this machine. I did not have a IIS_IUSER to assign permissions to but I did try assigning read/execute permissions to the IIS_IUSRS group with no change. Assuming I can get this to work, could I also get some instructions on how to run Sinatra on top of this? Error: Gem::LoadError c:/progra~2/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:826:in `report_activate_error': Could not find RubyGem rack (= 1.0.0) (Gem::LoadError) from c:/progra~2/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:260:in `activate' from c:/progra~2/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:67:in `gem' from :0 from C:\src\Merlin\Main\Hosts\IronRuby.Rack\RubyEngine.cs:43:in `Execute' from C:\src\Merlin\Main\Hosts\IronRuby.Rack\RubyEngine.cs:39:in `Execute' from C:\src\Merlin\Main\Hosts\IronRuby.Rack\RubyEngine.cs:31:in `Require' from C:\src\Merlin\Main\Hosts\IronRuby.Rack\Application.cs:49:in `InitRack' from C:\src\Merlin\Main\Hosts\IronRuby.Rack\Application.cs:28:in `.ctor' from C:\src\Merlin\Main\Hosts\IronRuby.Rack\HttpHandlerFactory.cs:41:in `GetHandler' from System.Web:0:in `System.Web.HttpApplication.IExecutionStep.Execute' from System.Web:0:in `ExecuteStep' from System.Web:0:in `ResumeSteps' from System.Web:0:in `BeginProcessRequestNotification' from System.Web:0:in `ProcessRequestNotificationPrivate' from System.Web:0:in `ProcessRequestNotificationHelper' from System.Web:0:in `ProcessRequestNotification' from System.Web:0:in `ProcessRequestNotificationHelper' from System.Web:0:in `ProcessRequestNotification' Search paths C:/src/Merlin/Main/Hosts/IronRuby.Rack/IronRuby.Rack.Example C:/src/Merlin/Main/Languages/Ruby/Libs c:/progra~2/ruby/lib/ruby/site_ruby/1.8 c:/progra~2/ruby/lib/ruby/site_ruby c:/progra~2/ruby/lib/ruby/1.8 . From ivan at flanders.co.nz Tue Jun 23 16:07:43 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 23 Jun 2009 22:07:43 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> <9672e782834e8d8101de83853ce2182a@ruby-forum.com> Message-ID: it fails much earlier than at the controller. you should never get to that page because that is just plain vanilla asp.net mvc stuff has nothing to do with ironruby mvc. Have you created an asp.net mvc application before on your machine? Did that work? I copied your code to a new project and still it is giving me issues. It > is not picking up the Routes.rb file Does that mean the sample does work on your machine? Also when you make a change to routing etc you have to restart the web server --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 23, 2009 at 10:01 PM, Mohammad Azam wrote: > I copied your code to a new project and still it is giving me issues. It > is not picking up the Routes.rb file. > > Is there anything interesting in ApplicationController since I am not > using ApplicationController. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Tue Jun 23 16:13:54 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 23 Jun 2009 22:13:54 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> <9672e782834e8d8101de83853ce2182a@ruby-forum.com> Message-ID: <668416bc535648232d05365669075644@ruby-forum.com> yes, I have created ASP.NET MVC application before on my machine and it did work. I have restarted the server but no use! Your sample does work but it throws some assembly errors. I can avoid those errors by going to controller actions. But, I don't know why it does not work for a new project. I only see this page: he resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /home -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Tue Jun 23 16:15:48 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 23 Jun 2009 22:15:48 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> <9672e782834e8d8101de83853ce2182a@ruby-forum.com> Message-ID: <3d40c4c0e16bd1f6d39bc9debc138d21@ruby-forum.com> Is there any web.config setting that needs to be done? -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Tue Jun 23 16:16:37 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 23 Jun 2009 22:16:37 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: <668416bc535648232d05365669075644@ruby-forum.com> References: <9672e782834e8d8101de83853ce2182a@ruby-forum.com> <668416bc535648232d05365669075644@ruby-forum.com> Message-ID: did you compile the new project?Can you email me your project so I can take a look.. instead of asking all these questions? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 23, 2009 at 10:13 PM, Mohammad Azam wrote: > yes, I have created ASP.NET MVC application before on my machine and it > did work. > > I have restarted the server but no use! > > Your sample does work but it throws some assembly errors. I can avoid > those errors by going to controller actions. > > But, I don't know why it does not work for a new project. > > I only see this page: > > he resource cannot be found. > Description: HTTP 404. The resource you are looking for (or one of its > dependencies) could have been removed, had its name changed, or is > temporarily unavailable. Please review the following URL and make sure > that it is spelled correctly. > > Requested URL: /home > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Tue Jun 23 16:19:19 2009 From: lists at ruby-forum.com (Mohammad Azam) Date: Tue, 23 Jun 2009 22:19:19 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <419b2e6ed311ba46cf51b0e78a177318@ruby-forum.com> <9672e782834e8d8101de83853ce2182a@ruby-forum.com> <668416bc535648232d05365669075644@ruby-forum.com> Message-ID: Where can I get your email? -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Tue Jun 23 16:20:27 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 23 Jun 2009 22:20:27 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <9672e782834e8d8101de83853ce2182a@ruby-forum.com> <668416bc535648232d05365669075644@ruby-forum.com> Message-ID: ivan at flanders dot co dot nz --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 23, 2009 at 10:19 PM, Mohammad Azam wrote: > Where can I get your email? > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Tue Jun 23 16:39:16 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Tue, 23 Jun 2009 22:39:16 +0200 Subject: [Ironruby-core] Question about Ivan Porto carrero MVC Sample In-Reply-To: References: <9672e782834e8d8101de83853ce2182a@ruby-forum.com> <668416bc535648232d05365669075644@ruby-forum.com> Message-ID: To make it work I only made 1 change. I have a debug build of System.Web.Mvc.dll in the sample. I referenced that one and rebuilt then hit F5 to start cassini and it worked The ironrubymvc dll is built against that debug version so it expects that. I have to fix that at some point --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Tue, Jun 23, 2009 at 10:20 PM, Ivan Porto Carrero wrote: > ivan at flanders dot co dot nz > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Tue, Jun 23, 2009 at 10:19 PM, Mohammad Azam wrote: > >> Where can I get your email? >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Tue Jun 23 17:40:10 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Tue, 23 Jun 2009 21:40:10 +0000 Subject: [Ironruby-core] Assistance Needed Running IronRuby.Rack.Example In-Reply-To: <7d8bf26d0906231306q20420ee8l833b4fd31b7b4f58@mail.gmail.com> References: <7d8bf26d0906231306q20420ee8l833b4fd31b7b4f58@mail.gmail.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC18AF3DA3@tk5ex14mbxc106.redmond.corp.microsoft.com> > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Ted Milker > Sent: Tuesday, June 23, 2009 1:07 PM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Assistance Needed Running IronRuby.Rack.Example > > Could I get some assistance in running rack on IronRuby? I am just trying out: > > http://github.com/jschementi/ironruby/tree/master/Merlin/Main/Hosts/Iro > nRuby.Rack > > from RailsConf, not the latest one from the IronRuby tree. I'm pretty sure both versions are identical, so you can pick either one. > Everything has > built successfully and I had to modify Web.config to point to my MRI 1.8 > installation directory but this is as far as I can get. I have tried both igem > install rack and gem install rack but I still receive this message. Running on > IIS7 under Windows Vista 64bit. I do not have any release versions of > IronRuby installed on this machine. I did not have a IIS_IUSER to assign > permissions to but I did try assigning read/execute permissions to the > IIS_IUSRS group with no change. Woops, I got the IIS_IUSRS name wrong ... I'll change the README to reflect that. > Assuming I can get this to work, could I also get some instructions on how to > run Sinatra on top of this? It worked the first time on my machine, so let's figure out what's different ... > > Error: Gem::LoadError > > c:/progra~2/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:826:in > `report_activate_error': Could not find RubyGem rack (= 1.0.0) > (Gem::LoadError) So, it finds RubyGems (which is good, that means the paths are set up properly) but it doesn't find the Rack gem. Sounds like it wouldn't be able to find any gems ... if you executed this from the immediate window it would probably throw an error too: RubyEngine.Require("sinatra") However, the issue you see is completely my fault. Take a look at line 43 of Application.cs: http://github.com/jschementi/ironruby/blob/fc84e8dc9d563b7dde9cd7c2506488f190f98c3b/Merlin/Main/Hosts/IronRuby.Rack/Application.cs#L43 // HACK Load gems from default MRI installation. This shouldn't be needed. Environment.SetEnvironmentVariable("GEM_PATH", @"C:\ruby\lib\ruby\gems\1.8"); I'm being pretty evil here and setting GEM_PATH over your head. This line should be set to "c:\progra~2\ruby\lib\ruby\gems\1.8" for you if you want to use MRI's gems, or the path to rubygems that IronRuby sets up (do a "echo %GEM_PATH% from Dev.bat to get that value). A simple recompile should make things work again. I'll pull GEM_PATH out into a setting in web.config so this doesn't suck. =P Thanks for reporting it! ~js > from c:/progra~2/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:260:in > `activate' > from c:/progra~2/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:67:in `gem' > from :0 > from C:\src\Merlin\Main\Hosts\IronRuby.Rack\RubyEngine.cs:43:in > `Execute' > from C:\src\Merlin\Main\Hosts\IronRuby.Rack\RubyEngine.cs:39:in > `Execute' > from C:\src\Merlin\Main\Hosts\IronRuby.Rack\RubyEngine.cs:31:in > `Require' > from C:\src\Merlin\Main\Hosts\IronRuby.Rack\Application.cs:49:in > `InitRack' > from C:\src\Merlin\Main\Hosts\IronRuby.Rack\Application.cs:28:in `.ctor' > from > C:\src\Merlin\Main\Hosts\IronRuby.Rack\HttpHandlerFactory.cs:41:in > `GetHandler' > from System.Web:0:in > `System.Web.HttpApplication.IExecutionStep.Execute' > from System.Web:0:in `ExecuteStep' > from System.Web:0:in `ResumeSteps' > from System.Web:0:in `BeginProcessRequestNotification' > from System.Web:0:in `ProcessRequestNotificationPrivate' > from System.Web:0:in `ProcessRequestNotificationHelper' > from System.Web:0:in `ProcessRequestNotification' > from System.Web:0:in `ProcessRequestNotificationHelper' > from System.Web:0:in `ProcessRequestNotification' > > Search paths > > C:/src/Merlin/Main/Hosts/IronRuby.Rack/IronRuby.Rack.Example > C:/src/Merlin/Main/Languages/Ruby/Libs > c:/progra~2/ruby/lib/ruby/site_ruby/1.8 > c:/progra~2/ruby/lib/ruby/site_ruby > c:/progra~2/ruby/lib/ruby/1.8 From Jimmy.Schementi at microsoft.com Tue Jun 23 17:45:00 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Tue, 23 Jun 2009 21:45:00 +0000 Subject: [Ironruby-core] Code Review: HashFixes In-Reply-To: References: Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC18AF3DC5@tk5ex14mbxc106.redmond.corp.microsoft.com> How are we going to make sure this gets back into REXML and RubyGems? We shouldn't ship significantly different versions of the Ruby stdlib, as people will expect to switch to any version of the stdlib without issues. My first thought is to have someone in the community step up to propose these changes to RubyGems and REXML for us, and get them checked in. Anyone interested? ~js > -----Original Message----- > From: Tomas Matousek > Sent: Tuesday, June 23, 2009 1:37 PM > To: IronRuby External Code Reviewers > Cc: ironruby-core at rubyforge.org > Subject: Code Review: HashFixes > > tfpt review "/shelveset:HashFixes;REDMOND\tomat" > > Fixes implementation of hash methods in REXML and RubyGems. The > current implementation is incorrect since it sums hash codes of > subcomponents potentially overflowing to Bignum. This issue is mainly > exposed when calculating hash of an array. Array#hash calculates its hash > code by calling hash on each item and converting the result of the hash > method into Fixnum. So if the result if the hash method is a Bignum an error > is reported: > > class C > def hash > 100000000000000000000 > end > end > > [C.new].hash # => in `hash': bignum too big to convert into `long' > (RangeError) > > Tomas From Jimmy.Schementi at microsoft.com Tue Jun 23 18:15:09 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Tue, 23 Jun 2009 22:15:09 +0000 Subject: [Ironruby-core] Assistance Needed Running IronRuby.Rack.Example In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC18AF3DA3@tk5ex14mbxc106.redmond.corp.microsoft.com> References: <7d8bf26d0906231306q20420ee8l833b4fd31b7b4f58@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC18AF3DA3@tk5ex14mbxc106.redmond.corp.microsoft.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC18AF3EED@tk5ex14mbxc106.redmond.corp.microsoft.com> I just made some updates so GEM_PATH can be set from web.config, so if you use those bits just make sure GemPath is set correctly in web.config and all should work well. http://github.com/jschementi/ironruby/commit/4dd9655f4a48326fb1270a2eb2cf5d1f96d7c3b0 > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Jimmy Schementi > Sent: Tuesday, June 23, 2009 2:40 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Assistance Needed Running > IronRuby.Rack.Example > > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > > bounces at rubyforge.org] On Behalf Of Ted Milker > > Sent: Tuesday, June 23, 2009 1:07 PM > > To: ironruby-core at rubyforge.org > > Subject: [Ironruby-core] Assistance Needed Running > > IronRuby.Rack.Example > > > > Could I get some assistance in running rack on IronRuby? I am just trying > out: > > > > > http://github.com/jschementi/ironruby/tree/master/Merlin/Main/Hosts/Ir > > o > > nRuby.Rack > > > > from RailsConf, not the latest one from the IronRuby tree. > > I'm pretty sure both versions are identical, so you can pick either one. > > > Everything has > > built successfully and I had to modify Web.config to point to my MRI > > 1.8 installation directory but this is as far as I can get. I have > > tried both igem install rack and gem install rack but I still receive > > this message. Running on > > IIS7 under Windows Vista 64bit. I do not have any release versions of > > IronRuby installed on this machine. I did not have a IIS_IUSER to > > assign permissions to but I did try assigning read/execute permissions > > to the IIS_IUSRS group with no change. > > Woops, I got the IIS_IUSRS name wrong ... I'll change the README to reflect > that. > > > Assuming I can get this to work, could I also get some instructions on > > how to run Sinatra on top of this? > > It worked the first time on my machine, so let's figure out what's different ... > > > > > Error: Gem::LoadError > > > > c:/progra~2/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:826:in > > `report_activate_error': Could not find RubyGem rack (= 1.0.0) > > (Gem::LoadError) > > So, it finds RubyGems (which is good, that means the paths are set up > properly) but it doesn't find the Rack gem. Sounds like it wouldn't be able to > find any gems ... if you executed this from the immediate window it would > probably throw an error too: > > RubyEngine.Require("sinatra") > > However, the issue you see is completely my fault. Take a look at line 43 of > Application.cs: > http://github.com/jschementi/ironruby/blob/fc84e8dc9d563b7dde9cd7c250 > 6488f190f98c3b/Merlin/Main/Hosts/IronRuby.Rack/Application.cs#L43 > > // HACK Load gems from default MRI installation. This shouldn't be > needed. > Environment.SetEnvironmentVariable("GEM_PATH", > @"C:\ruby\lib\ruby\gems\1.8"); > > I'm being pretty evil here and setting GEM_PATH over your head. This line > should be set to "c:\progra~2\ruby\lib\ruby\gems\1.8" for you if you want to > use MRI's gems, or the path to rubygems that IronRuby sets up (do a "echo > %GEM_PATH% from Dev.bat to get that value). A simple recompile should > make things work again. > > I'll pull GEM_PATH out into a setting in web.config so this doesn't suck. =P > Thanks for reporting it! > > ~js > > > from > > c:/progra~2/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:260:in > > `activate' > > from c:/progra~2/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:67:in `gem' > > from :0 > > from > > C:\src\Merlin\Main\Hosts\IronRuby.Rack\RubyEngine.cs:43:in > > `Execute' > > from > > C:\src\Merlin\Main\Hosts\IronRuby.Rack\RubyEngine.cs:39:in > > `Execute' > > from > > C:\src\Merlin\Main\Hosts\IronRuby.Rack\RubyEngine.cs:31:in > > `Require' > > from > > C:\src\Merlin\Main\Hosts\IronRuby.Rack\Application.cs:49:in > > `InitRack' > > from C:\src\Merlin\Main\Hosts\IronRuby.Rack\Application.cs:28:in > `.ctor' > > from > > C:\src\Merlin\Main\Hosts\IronRuby.Rack\HttpHandlerFactory.cs:41:in > > `GetHandler' > > from System.Web:0:in > > `System.Web.HttpApplication.IExecutionStep.Execute' > > from System.Web:0:in `ExecuteStep' > > from System.Web:0:in `ResumeSteps' > > from System.Web:0:in `BeginProcessRequestNotification' > > from System.Web:0:in `ProcessRequestNotificationPrivate' > > from System.Web:0:in `ProcessRequestNotificationHelper' > > from System.Web:0:in `ProcessRequestNotification' > > from System.Web:0:in `ProcessRequestNotificationHelper' > > from System.Web:0:in `ProcessRequestNotification' > > > > Search paths > > > > C:/src/Merlin/Main/Hosts/IronRuby.Rack/IronRuby.Rack.Example > > C:/src/Merlin/Main/Languages/Ruby/Libs > > c:/progra~2/ruby/lib/ruby/site_ruby/1.8 > > c:/progra~2/ruby/lib/ruby/site_ruby > > c:/progra~2/ruby/lib/ruby/1.8 > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From tmilker at gmail.com Wed Jun 24 08:57:51 2009 From: tmilker at gmail.com (Ted Milker) Date: Wed, 24 Jun 2009 07:57:51 -0500 Subject: [Ironruby-core] Assistance Needed Running IronRuby.Rack.Example In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC18AF3DA3@tk5ex14mbxc106.redmond.corp.microsoft.com> References: <7d8bf26d0906231306q20420ee8l833b4fd31b7b4f58@mail.gmail.com> <0047ECBFA2E0DF4A834AA369282A5AFC18AF3DA3@tk5ex14mbxc106.redmond.corp.microsoft.com> Message-ID: <7d8bf26d0906240557n63edbb3bq93a8dd3fb0196746@mail.gmail.com> On Tue, Jun 23, 2009 at 4:40 PM, Jimmy Schementi wrote: > ? ?// HACK Load gems from default MRI installation. This shouldn't be needed. > ? ?Environment.SetEnvironmentVariable("GEM_PATH", @"C:\ruby\lib\ruby\gems\1.8"); > > I'm being pretty evil here and setting GEM_PATH over your head. This line should be set to "c:\progra~2\ruby\lib\ruby\gems\1.8" for you if you want to use MRI's gems, or the path to rubygems that IronRuby sets up (do a "echo %GEM_PATH% from Dev.bat to get that value). A simple recompile should make things work again. Yep, that did it. I just updated the path to reflect my MRI install and it is working now. I am sure this has been covered on the list and I am just forgetting, but igem is just a way to manage a separate set of installed gems, correct? There is nothing special about the gems it retrieves vs. the ones from an MRI install? Now, on to what I really wanted to do, run Sinatra. I tried a simple Hello World but I get a YSOD about an undefined method 'call'. I modified config.ru to require my new .rb file and tried both: require 'rubygems' require 'sinatra' class App get '/' do 'Hello world!' end end and after commenting out App.new in config.ru: require 'rubygems' require 'sinatra' get '/' do 'Hello world!' end but they both give a similar stack trace: Server Error in '/IronRuby.Rack.Example' Application. undefined method `call' for # Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.MissingMethodException: undefined method `call' for # Source Error: Line 458: public static object MethodMissing(RubyContext/*!*/ context, object/*!*/ self, SymbolId symbol, [NotNull]params object[]/*!*/ args) { Line 459: string name = SymbolTable.IdToString(symbol); Line 460: throw RubyExceptions.CreateMethodMissing(context, self, name); Line 461: } Line 462: Source File: C:\src\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\KernelOps.cs Line: 460 Stack Trace: [MissingMethodException: undefined method `call' for #] IronRuby.Builtins.KernelOps.MethodMissing(RubyContext context, Object self, SymbolId symbol, Object[] args) in C:\src\Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED\Builtins\KernelOps.cs:460 CallSite.Target(Closure , CallSite , Object , Object ) +317 System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) in C:\src\ndp\fx\src\Core\Microsoft\Scripting\Actions\UpdateDelegates.Generated.cs:384 Microsoft.Scripting.Runtime.DynamicOperations.InvokeMember(Object obj, String memberName, Boolean ignoreCase, Object[] parameters) in C:\src\Merlin\Main\Runtime\Microsoft.Scripting\Runtime\DynamicOperations.cs:118 Microsoft.Scripting.Runtime.DynamicOperations.InvokeMember(Object obj, String memberName, Object[] parameters) in C:\src\Merlin\Main\Runtime\Microsoft.Scripting\Runtime\DynamicOperations.cs:101 Microsoft.Scripting.Hosting.ObjectOperations.InvokeMember(Object obj, String memberName, Object[] parameters) in C:\src\Merlin\Main\Runtime\Microsoft.Scripting\Hosting\ObjectOperations.cs:85 IronRuby.Rack.RubyEngine.ExecuteMethod(Object instance, String methodName, Object[] args) in C:\src\Merlin\Main\Hosts\IronRuby.Rack\RubyEngine.cs:48 IronRuby.Rack.Application.Call(IDictionary`2 env) in C:\src\Merlin\Main\Hosts\IronRuby.Rack\Application.cs:38 IronRuby.Rack.Handler.IIS.Handle(Request request, Response response) in C:\src\Merlin\Main\Hosts\IronRuby.Rack\IIS.cs:238 IronRuby.Rack.HttpHandler.ProcessRequest(HttpContext context) in C:\src\Merlin\Main\Hosts\IronRuby.Rack\HttpHandler.cs:46 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171 Version Information: Microsoft .NET Framework Version:2.0.50727.3074; ASP.NET Version:2.0.50727.3074 The only difference is whether the the undefined method is for App or nil:NilClass. From suppakilla at gmail.com Wed Jun 24 16:29:31 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Wed, 24 Jun 2009 22:29:31 +0200 Subject: [Ironruby-core] Review: fixes for Array#rindex and Array#reverse_each In-Reply-To: <3bf20550905310422k445b18c7l27f1e6eb40e977db@mail.gmail.com> References: <3bf20550904231258s6f19bb53u830b45696998f970@mail.gmail.com> <3bf20550905310422k445b18c7l27f1e6eb40e977db@mail.gmail.com> Message-ID: <3bf20550906241329g2b674444pf4e2c54942cff732@mail.gmail.com> Hi, It seems like this patch has gone unnoticed as it didn't get any review yet so here I am, requesting for one :-) Thanks, Daniele On Sun, May 31, 2009 at 13:22, Daniele Alessandri wrote: > Hi Jim, > > I'm a bit late but daytime work got in the way and then I was out of > the country for two weeks :-) > I got rid of the duplicated logic in IListOps.ReverseIndex and > ArrayOps.ReverseEach by implementing a new internal method > (IListOps.ReverseEnumerateIndexes): > > http://github.com/nrk/ironruby/commit/76db817d1766b788f995afb02e12c5a72955c77f > > As for the specs, I just slightly modified an existing one in a way > that does not affect the test but helped me to discover the bug > (actually this change uses a different condition from the one I used > one month ago as it exposed another bug which got fixed in the above > mentioned commit): > > http://github.com/nrk/ironruby/commit/e5497cf87fc479b2bf2ca0b812d979354a86f44c > > See also the attached diff. > > Thanks, > Daniele > > > On Thu, Apr 23, 2009 at 22:08, Jim Deville wrote: >> Can you add specs for rindex that expose the bug you fixed? Also, is there any shared place that you could put the following code: >> ? ? ? ? if (self.Count < originalSize) { >> ? ? ? ? ? ? i = originalSize - i - 1 + self.Count; >> ? ? ? ? ? ? originalSize = self.Count; >> ? ? ? ? } >> >> It would be nice to get rid of the duplicated logic, but I can't think of where it should go. >> >> Other than that, looks good. >> JD >> >>> -----Original Message----- >>> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >>> bounces at rubyforge.org] On Behalf Of Daniele Alessandri >>> Sent: Thursday, April 23, 2009 12:59 PM >>> To: ironruby-core at rubyforge.org >>> Subject: [Ironruby-core] Review: fixes for Array#rindex and >>> Array#reverse_each >>> >>> Hi, >>> I just pushed two fixes on my repository, the first one addresses a bug >>> in Array#rindex (there was a bug in my last commit) and the second one >>> makes Array#reverse_each compliant with the rubyspecs. >>> >>> http://github.com/nrk/ironruby/commit/d2b18f5d01a49cb62a2ea0c205e1cf123 >>> 3ac94e0 >>> >>> >From the commit message: >>> >>> * Fixed a bug in IListOps.ReverseIndex (core/array/rindex specs were >>> passing, this bug was triggered under certain conditions different from >>> the ones defined in the specs) >>> >>> * Fixed ArrayOps.ReverseEach to make it not fail when elemens in the >>> array are removed from inside a block. >>> >>> See also the attached diff. >>> >>> Thanks, >>> Daniele >>> >>> -- >>> Daniele Alessandri >>> http://www.clorophilla.net/blog/ >>> http://twitter.com/JoL1hAHN >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> > > > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From jdeville at microsoft.com Wed Jun 24 17:42:29 2009 From: jdeville at microsoft.com (Jim Deville) Date: Wed, 24 Jun 2009 21:42:29 +0000 Subject: [Ironruby-core] Review: fixes for Array#rindex and Array#reverse_each In-Reply-To: <3bf20550906241329g2b674444pf4e2c54942cff732@mail.gmail.com> References: <3bf20550904231258s6f19bb53u830b45696998f970@mail.gmail.com> <3bf20550905310422k445b18c7l27f1e6eb40e977db@mail.gmail.com> <3bf20550906241329g2b674444pf4e2c54942cff732@mail.gmail.com> Message-ID: Looks good. Nice job combining the logic. I think I went over this patch, but never sent a review mail, sorry about that! I'll pull it in with the next pull. JD ?there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Daniele Alessandri > Sent: Wednesday, June 24, 2009 1:30 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Review: fixes for Array#rindex and > Array#reverse_each > > Hi, > > It seems like this patch has gone unnoticed as it didn't get any review yet so > here I am, requesting for one :-) > > Thanks, > Daniele > > On Sun, May 31, 2009 at 13:22, Daniele Alessandri > wrote: > > Hi Jim, > > > > I'm a bit late but daytime work got in the way and then I was out of > > the country for two weeks :-) I got rid of the duplicated logic in > > IListOps.ReverseIndex and ArrayOps.ReverseEach by implementing a new > > internal method > > (IListOps.ReverseEnumerateIndexes): > > > > > http://github.com/nrk/ironruby/commit/76db817d1766b788f995afb02e12c5 > a7 > > 2955c77f > > > > As for the specs, I just slightly modified an existing one in a way > > that does not affect the test but helped me to discover the bug > > (actually this change uses a different condition from the one I used > > one month ago as it exposed another bug which got fixed in the above > > mentioned commit): > > > > > http://github.com/nrk/ironruby/commit/e5497cf87fc479b2bf2ca0b812d9793 > 5 > > 4a86f44c > > > > See also the attached diff. > > > > Thanks, > > Daniele > > > > > > On Thu, Apr 23, 2009 at 22:08, Jim Deville wrote: > >> Can you add specs for rindex that expose the bug you fixed? Also, is there > any shared place that you could put the following code: > >> if (self.Count < originalSize) { > >> i = originalSize - i - 1 + self.Count; > >> originalSize = self.Count; > >> } > >> > >> It would be nice to get rid of the duplicated logic, but I can't think of > where it should go. > >> > >> Other than that, looks good. > >> JD > >> > >>> -----Original Message----- > >>> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > >>> bounces at rubyforge.org] On Behalf Of Daniele Alessandri > >>> Sent: Thursday, April 23, 2009 12:59 PM > >>> To: ironruby-core at rubyforge.org > >>> Subject: [Ironruby-core] Review: fixes for Array#rindex and > >>> Array#reverse_each > >>> > >>> Hi, > >>> I just pushed two fixes on my repository, the first one addresses a > >>> bug in Array#rindex (there was a bug in my last commit) and the > >>> second one makes Array#reverse_each compliant with the rubyspecs. > >>> > >>> > http://github.com/nrk/ironruby/commit/d2b18f5d01a49cb62a2ea0c205e1cf > >>> 123 > >>> 3ac94e0 > >>> > >>> >From the commit message: > >>> > >>> * Fixed a bug in IListOps.ReverseIndex (core/array/rindex specs were > >>> passing, this bug was triggered under certain conditions different > >>> from the ones defined in the specs) > >>> > >>> * Fixed ArrayOps.ReverseEach to make it not fail when elemens in the > >>> array are removed from inside a block. > >>> > >>> See also the attached diff. > >>> > >>> Thanks, > >>> Daniele > >>> > >>> -- > >>> Daniele Alessandri > >>> http://www.clorophilla.net/blog/ > >>> http://twitter.com/JoL1hAHN > >> _______________________________________________ > >> Ironruby-core mailing list > >> Ironruby-core at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/ironruby-core > >> > > > > > > > > -- > > Daniele Alessandri > > http://www.clorophilla.net/blog/ > > http://twitter.com/JoL1hAHN > > > > > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core From suppakilla at gmail.com Wed Jun 24 19:23:09 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Thu, 25 Jun 2009 01:23:09 +0200 Subject: [Ironruby-core] Review: fixes for Array#rindex and Array#reverse_each In-Reply-To: References: <3bf20550904231258s6f19bb53u830b45696998f970@mail.gmail.com> <3bf20550905310422k445b18c7l27f1e6eb40e977db@mail.gmail.com> <3bf20550906241329g2b674444pf4e2c54942cff732@mail.gmail.com> Message-ID: <3bf20550906241623n1e0a0d76q889ed19baa190178@mail.gmail.com> Thanks Jim! BTW currently my repository is about one month behind. I must merge it with the main repository but I can't do that now, I hope to make it by tomorrow in the late afternoon. On Wed, Jun 24, 2009 at 23:42, Jim Deville wrote: > Looks good. Nice job combining the logic. I think I went over this patch, > but never sent a review mail, sorry about that! > > I'll pull it in with the next pull. > > JD > > ?there is no try > > > > -----Original Message----- > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > > bounces at rubyforge.org] On Behalf Of Daniele Alessandri > > Sent: Wednesday, June 24, 2009 1:30 PM > > To: ironruby-core at rubyforge.org > > Subject: Re: [Ironruby-core] Review: fixes for Array#rindex and > > Array#reverse_each > > > > Hi, > > > > It seems like this patch has gone unnoticed as it didn't get any review > yet so > > here I am, requesting for one :-) > > > > Thanks, > > Daniele > > > > On Sun, May 31, 2009 at 13:22, Daniele Alessandri > > wrote: > > > Hi Jim, > > > > > > I'm a bit late but daytime work got in the way and then I was out of > > > the country for two weeks :-) I got rid of the duplicated logic in > > > IListOps.ReverseIndex and ArrayOps.ReverseEach by implementing a new > > > internal method > > > (IListOps.ReverseEnumerateIndexes): > > > > > > > > http://github.com/nrk/ironruby/commit/76db817d1766b788f995afb02e12c5 > > a7 > > > 2955c77f > > > > > > As for the specs, I just slightly modified an existing one in a way > > > that does not affect the test but helped me to discover the bug > > > (actually this change uses a different condition from the one I used > > > one month ago as it exposed another bug which got fixed in the above > > > mentioned commit): > > > > > > > > http://github.com/nrk/ironruby/commit/e5497cf87fc479b2bf2ca0b812d9793 > > 5 > > > 4a86f44c > > > > > > See also the attached diff. > > > > > > Thanks, > > > Daniele > > > > > > > > > On Thu, Apr 23, 2009 at 22:08, Jim Deville > wrote: > > >> Can you add specs for rindex that expose the bug you fixed? Also, is > there > > any shared place that you could put the following code: > > >> if (self.Count < originalSize) { > > >> i = originalSize - i - 1 + self.Count; > > >> originalSize = self.Count; > > >> } > > >> > > >> It would be nice to get rid of the duplicated logic, but I can't think > of > > where it should go. > > >> > > >> Other than that, looks good. > > >> JD > > >> > > >>> -----Original Message----- > > >>> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > > >>> bounces at rubyforge.org] On Behalf Of Daniele Alessandri > > >>> Sent: Thursday, April 23, 2009 12:59 PM > > >>> To: ironruby-core at rubyforge.org > > >>> Subject: [Ironruby-core] Review: fixes for Array#rindex and > > >>> Array#reverse_each > > >>> > > >>> Hi, > > >>> I just pushed two fixes on my repository, the first one addresses a > > >>> bug in Array#rindex (there was a bug in my last commit) and the > > >>> second one makes Array#reverse_each compliant with the rubyspecs. > > >>> > > >>> > > http://github.com/nrk/ironruby/commit/d2b18f5d01a49cb62a2ea0c205e1cf > > >>> 123 > > >>> 3ac94e0 > > >>> > > >>> >From the commit message: > > >>> > > >>> * Fixed a bug in IListOps.ReverseIndex (core/array/rindex specs were > > >>> passing, this bug was triggered under certain conditions different > > >>> from the ones defined in the specs) > > >>> > > >>> * Fixed ArrayOps.ReverseEach to make it not fail when elemens in the > > >>> array are removed from inside a block. > > >>> > > >>> See also the attached diff. > > >>> > > >>> Thanks, > > >>> Daniele > > >>> > > >>> -- > > >>> Daniele Alessandri > > >>> http://www.clorophilla.net/blog/ > > >>> http://twitter.com/JoL1hAHN > > >> _______________________________________________ > > >> Ironruby-core mailing list > > >> Ironruby-core at rubyforge.org > > >> http://rubyforge.org/mailman/listinfo/ironruby-core > > >> > > > > > > > > > > > > -- > > > Daniele Alessandri > > > http://www.clorophilla.net/blog/ > > > http://twitter.com/JoL1hAHN > > > > > > > > > > > -- > > Daniele Alessandri > > http://www.clorophilla.net/blog/ > > http://twitter.com/JoL1hAHN > > _______________________________________________ > > 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 > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Wed Jun 24 19:29:32 2009 From: jdeville at microsoft.com (Jim Deville) Date: Wed, 24 Jun 2009 23:29:32 +0000 Subject: [Ironruby-core] Review: fixes for Array#rindex and Array#reverse_each In-Reply-To: <3bf20550906241623n1e0a0d76q889ed19baa190178@mail.gmail.com> References: <3bf20550904231258s6f19bb53u830b45696998f970@mail.gmail.com> <3bf20550905310422k445b18c7l27f1e6eb40e977db@mail.gmail.com> <3bf20550906241329g2b674444pf4e2c54942cff732@mail.gmail.com> <3bf20550906241623n1e0a0d76q889ed19baa190178@mail.gmail.com> Message-ID: Should be fine. I don?t plan on doing a pull until Friday. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri Sent: Wednesday, June 24, 2009 4:23 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Review: fixes for Array#rindex and Array#reverse_each Thanks Jim! BTW currently my repository is about one month behind. I must merge it with the main repository but I can't do that now, I hope to make it by tomorrow in the late afternoon. On Wed, Jun 24, 2009 at 23:42, Jim Deville > wrote: Looks good. Nice job combining the logic. I think I went over this patch, but never sent a review mail, sorry about that! I'll pull it in with the next pull. JD ?there is no try > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Daniele Alessandri > Sent: Wednesday, June 24, 2009 1:30 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Review: fixes for Array#rindex and > Array#reverse_each > > Hi, > > It seems like this patch has gone unnoticed as it didn't get any review yet so > here I am, requesting for one :-) > > Thanks, > Daniele > > On Sun, May 31, 2009 at 13:22, Daniele Alessandri> > wrote: > > Hi Jim, > > > > I'm a bit late but daytime work got in the way and then I was out of > > the country for two weeks :-) I got rid of the duplicated logic in > > IListOps.ReverseIndex and ArrayOps.ReverseEach by implementing a new > > internal method > > (IListOps.ReverseEnumerateIndexes): > > > > > http://github.com/nrk/ironruby/commit/76db817d1766b788f995afb02e12c5 > a7 > > 2955c77f > > > > As for the specs, I just slightly modified an existing one in a way > > that does not affect the test but helped me to discover the bug > > (actually this change uses a different condition from the one I used > > one month ago as it exposed another bug which got fixed in the above > > mentioned commit): > > > > > http://github.com/nrk/ironruby/commit/e5497cf87fc479b2bf2ca0b812d9793 > 5 > > 4a86f44c > > > > See also the attached diff. > > > > Thanks, > > Daniele > > > > > > On Thu, Apr 23, 2009 at 22:08, Jim Deville > wrote: > >> Can you add specs for rindex that expose the bug you fixed? Also, is there > any shared place that you could put the following code: > >> if (self.Count < originalSize) { > >> i = originalSize - i - 1 + self.Count; > >> originalSize = self.Count; > >> } > >> > >> It would be nice to get rid of the duplicated logic, but I can't think of > where it should go. > >> > >> Other than that, looks good. > >> JD > >> > >>> -----Original Message----- > >>> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > >>> bounces at rubyforge.org] On Behalf Of Daniele Alessandri > >>> Sent: Thursday, April 23, 2009 12:59 PM > >>> To: ironruby-core at rubyforge.org > >>> Subject: [Ironruby-core] Review: fixes for Array#rindex and > >>> Array#reverse_each > >>> > >>> Hi, > >>> I just pushed two fixes on my repository, the first one addresses a > >>> bug in Array#rindex (there was a bug in my last commit) and the > >>> second one makes Array#reverse_each compliant with the rubyspecs. > >>> > >>> > http://github.com/nrk/ironruby/commit/d2b18f5d01a49cb62a2ea0c205e1cf > >>> 123 > >>> 3ac94e0 > >>> > >>> >From the commit message: > >>> > >>> * Fixed a bug in IListOps.ReverseIndex (core/array/rindex specs were > >>> passing, this bug was triggered under certain conditions different > >>> from the ones defined in the specs) > >>> > >>> * Fixed ArrayOps.ReverseEach to make it not fail when elemens in the > >>> array are removed from inside a block. > >>> > >>> See also the attached diff. > >>> > >>> Thanks, > >>> Daniele > >>> > >>> -- > >>> Daniele Alessandri > >>> http://www.clorophilla.net/blog/ > >>> http://twitter.com/JoL1hAHN > >> _______________________________________________ > >> Ironruby-core mailing list > >> Ironruby-core at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/ironruby-core > >> > > > > > > > > -- > > Daniele Alessandri > > http://www.clorophilla.net/blog/ > > http://twitter.com/JoL1hAHN > > > > > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN > _______________________________________________ > 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 -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN -------------- next part -------------- An HTML attachment was scrubbed... URL: From suppakilla at gmail.com Thu Jun 25 16:48:45 2009 From: suppakilla at gmail.com (Daniele Alessandri) Date: Thu, 25 Jun 2009 22:48:45 +0200 Subject: [Ironruby-core] Review: fixes for Array#rindex and Array#reverse_each In-Reply-To: References: <3bf20550904231258s6f19bb53u830b45696998f970@mail.gmail.com> <3bf20550905310422k445b18c7l27f1e6eb40e977db@mail.gmail.com> <3bf20550906241329g2b674444pf4e2c54942cff732@mail.gmail.com> <3bf20550906241623n1e0a0d76q889ed19baa190178@mail.gmail.com> Message-ID: <3bf20550906251348h33941877k1f8e16f7e54c5398@mail.gmail.com> Just merged and pushed to my remote repository. On Thu, Jun 25, 2009 at 01:29, Jim Deville wrote: > Should be fine. I don?t plan on doing a pull until Friday. > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Daniele Alessandri > Sent: Wednesday, June 24, 2009 4:23 PM > > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Review: fixes for Array#rindex and > Array#reverse_each > > > > Thanks Jim! > > > > BTW currently my repository is about one month behind. I must?merge it with > the main repository but I can't do that now, I hope to?make it by tomorrow > in the late afternoon. > > > > On Wed, Jun 24, 2009 at 23:42, Jim Deville wrote: > > Looks good. Nice job combining the logic. I think I went over this patch, > but never sent a review mail, sorry about that! > > I'll pull it in with the next pull. > > JD > > ?there is no try > >> -----Original Message----- >> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >> bounces at rubyforge.org] On Behalf Of Daniele Alessandri > >> Sent: Wednesday, June 24, 2009 1:30 PM >> To: ironruby-core at rubyforge.org > >> Subject: Re: [Ironruby-core] Review: fixes for Array#rindex and >> Array#reverse_each >> >> Hi, >> > >> It seems like this patch has gone unnoticed as it didn't get any review >> yet so >> here I am, requesting for one :-) >> >> Thanks, >> Daniele >> >> On Sun, May 31, 2009 at 13:22, Daniele Alessandri >> wrote: >> > Hi Jim, >> > >> > I'm a bit late but daytime work got in the way and then I was out of >> > the country for two weeks :-) I got rid of the duplicated logic in >> > IListOps.ReverseIndex and ArrayOps.ReverseEach by implementing a new >> > internal method >> > (IListOps.ReverseEnumerateIndexes): >> > >> > >> http://github.com/nrk/ironruby/commit/76db817d1766b788f995afb02e12c5 >> a7 >> > 2955c77f >> > >> > As for the specs, I just slightly modified an existing one in a way >> > that does not affect the test but helped me to discover the bug >> > (actually this change uses a different condition from the one I used >> > one month ago as it exposed another bug which got fixed in the above >> > mentioned commit): >> > >> > >> http://github.com/nrk/ironruby/commit/e5497cf87fc479b2bf2ca0b812d9793 >> 5 >> > 4a86f44c >> > >> > See also the attached diff. >> > >> > Thanks, >> > Daniele >> > >> > >> > On Thu, Apr 23, 2009 at 22:08, Jim Deville >> > wrote: >> >> Can you add specs for rindex that expose the bug you fixed? Also, is >> >> there >> any shared place that you could put the following code: >> >> ? ? ? ? if (self.Count < originalSize) { >> >> ? ? ? ? ? ? i = originalSize - i - 1 + self.Count; >> >> ? ? ? ? ? ? originalSize = self.Count; >> >> ? ? ? ? } >> >> >> >> It would be nice to get rid of the duplicated logic, but I can't think >> >> of >> where it should go. >> >> >> >> Other than that, looks good. >> >> JD >> >> >> >>> -----Original Message----- >> >>> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >> >>> bounces at rubyforge.org] On Behalf Of Daniele Alessandri >> >>> Sent: Thursday, April 23, 2009 12:59 PM >> >>> To: ironruby-core at rubyforge.org >> >>> Subject: [Ironruby-core] Review: fixes for Array#rindex and >> >>> Array#reverse_each >> >>> >> >>> Hi, >> >>> I just pushed two fixes on my repository, the first one addresses a >> >>> bug in Array#rindex (there was a bug in my last commit) and the >> >>> second one makes Array#reverse_each compliant with the rubyspecs. >> >>> >> >>> >> http://github.com/nrk/ironruby/commit/d2b18f5d01a49cb62a2ea0c205e1cf >> >>> 123 >> >>> 3ac94e0 >> >>> >> >>> >From the commit message: >> >>> >> >>> * Fixed a bug in IListOps.ReverseIndex (core/array/rindex specs were >> >>> passing, this bug was triggered under certain conditions different >> >>> from the ones defined in the specs) >> >>> >> >>> * Fixed ArrayOps.ReverseEach to make it not fail when elemens in the >> >>> array are removed from inside a block. >> >>> >> >>> See also the attached diff. >> >>> >> >>> Thanks, >> >>> Daniele >> >>> >> >>> -- >> >>> Daniele Alessandri >> >>> http://www.clorophilla.net/blog/ >> >>> http://twitter.com/JoL1hAHN >> >> _______________________________________________ >> >> Ironruby-core mailing list >> >> Ironruby-core at rubyforge.org >> >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> >> > >> > >> > >> > -- >> > Daniele Alessandri >> > http://www.clorophilla.net/blog/ >> > http://twitter.com/JoL1hAHN >> > >> >> >> >> -- >> Daniele Alessandri >> http://www.clorophilla.net/blog/ >> http://twitter.com/JoL1hAHN >> _______________________________________________ >> 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 > > > -- > Daniele Alessandri > http://www.clorophilla.net/blog/ > http://twitter.com/JoL1hAHN > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Daniele Alessandri http://www.clorophilla.net/blog/ http://twitter.com/JoL1hAHN From thibaut.barrere at gmail.com Fri Jun 26 05:07:19 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Fri, 26 Jun 2009 11:07:19 +0200 Subject: [Ironruby-core] Silverlight B3 - Positioning an element within a Canvas In-Reply-To: <47281e410904171308h5235c2d5u1eba208b53b093a4@mail.gmail.com> References: <9a643dbd3bd363b5b662747d36ad0288@ruby-forum.com> <4a68b8cf0904171237ve6a6783q347689274591d3e8@mail.gmail.com> <47281e410904171308h5235c2d5u1eba208b53b093a4@mail.gmail.com> Message-ID: <4a68b8cf0906260207p4517eb3dt5473b4a28a394f65@mail.gmail.com> Hi, the issue reported by Eoin a while back is still happening (http://gist.github.com/97116). If you call this from Silverlight: layout_root.rect.set_value(Canvas.TopProperty, 0.0) you'll get: MethodAccessException: System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty, Double) Is there a work-around allowing to set Canvas.TopProperty and other "static properties" that would currently work, apart from creating a C# wrapper ? I went through existing issues in codeplex but it doesn't seem like it's already registered. I can create an issue if it's a bug. thoughts ? -- Thibaut From thibaut.barrere at gmail.com Fri Jun 26 09:30:16 2009 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Fri, 26 Jun 2009 15:30:16 +0200 Subject: [Ironruby-core] Silverlight B3 - Positioning an element within a Canvas In-Reply-To: <4a68b8cf0906260207p4517eb3dt5473b4a28a394f65@mail.gmail.com> References: <9a643dbd3bd363b5b662747d36ad0288@ruby-forum.com> <4a68b8cf0904171237ve6a6783q347689274591d3e8@mail.gmail.com> <47281e410904171308h5235c2d5u1eba208b53b093a4@mail.gmail.com> <4a68b8cf0906260207p4517eb3dt5473b4a28a394f65@mail.gmail.com> Message-ID: <4a68b8cf0906260630n2d91721dt1a16793a901adbf7@mail.gmail.com> Hi, > layout_root.rect.set_value(Canvas.TopProperty, 0.0) not sure if this syntax is supposed to work or not, as I'm just getting into "attached properties". But the following syntax works instead, if someone is trying to achieve this: Canvas.SetTop(text_block, 200) hth, -- Thibaut From lists at ruby-forum.com Fri Jun 26 14:22:59 2009 From: lists at ruby-forum.com (Shay Friedman) Date: Fri, 26 Jun 2009 20:22:59 +0200 Subject: [Ironruby-core] WinForms in IronRuby Message-ID: <2779780b2a893cd52fd7a3f9eeda32d9@ruby-forum.com> Hi there, I've just published a blog post about an IR class I wrote to convert WinForms designer code to IronRuby. It is available at: http://blogs.microsoft.co.il/blogs/shayf/archive/2009/06/26/winforms-in-ironruby.aspx I'm willing to upload the source code file to GitHub and I'm a real noob with that. Can someone help me with that? Thanks! Shay. ---------------------------- Shay Friedman http://www.ironshay.com Follow me: http://twitter.com/ironshay -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Fri Jun 26 15:19:27 2009 From: lists at ruby-forum.com (Kevin Radcliffe) Date: Fri, 26 Jun 2009 21:19:27 +0200 Subject: [Ironruby-core] WinForms in IronRuby In-Reply-To: <2779780b2a893cd52fd7a3f9eeda32d9@ruby-forum.com> References: <2779780b2a893cd52fd7a3f9eeda32d9@ruby-forum.com> Message-ID: <5a5c3e51ffb4a797452c8eea3d8799da@ruby-forum.com> Shay Friedman wrote: > Hi there, > > I've just published a blog post about an IR class I wrote to convert > WinForms designer code to IronRuby. > > It is available at: > http://blogs.microsoft.co.il/blogs/shayf/archive/2009/06/26/winforms-in-ironruby.aspx > > I'm willing to upload the source code file to GitHub and I'm a real noob > with that. Can someone help me with that? > > Thanks! > Shay. > ---------------------------- > Shay Friedman > http://www.ironshay.com > Follow me: http://twitter.com/ironshay I haven't tried it myself yet, but this looks like a good reference: http://kylecordes.com/2008/04/30/git-windows-go/ Thanks for your blog post, I'll check out the code from there for now. -- Posted via http://www.ruby-forum.com/. From ivan at flanders.co.nz Fri Jun 26 18:15:19 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sat, 27 Jun 2009 00:15:19 +0200 Subject: [Ironruby-core] WinForms in IronRuby In-Reply-To: <5a5c3e51ffb4a797452c8eea3d8799da@ruby-forum.com> References: <2779780b2a893cd52fd7a3f9eeda32d9@ruby-forum.com> <5a5c3e51ffb4a797452c8eea3d8799da@ruby-forum.com> Message-ID: http://flanders.co.nz/2009/03/21/gitgithub-survival-guide/ --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Jun 26, 2009 at 9:19 PM, Kevin Radcliffe wrote: > Shay Friedman wrote: > > Hi there, > > > > I've just published a blog post about an IR class I wrote to convert > > WinForms designer code to IronRuby. > > > > It is available at: > > > http://blogs.microsoft.co.il/blogs/shayf/archive/2009/06/26/winforms-in-ironruby.aspx > > > > I'm willing to upload the source code file to GitHub and I'm a real noob > > with that. Can someone help me with that? > > > > Thanks! > > Shay. > > ---------------------------- > > Shay Friedman > > http://www.ironshay.com > > Follow me: http://twitter.com/ironshay > > I haven't tried it myself yet, but this looks like a good reference: > http://kylecordes.com/2008/04/30/git-windows-go/ > > Thanks for your blog post, I'll check out the code from there for now. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Sat Jun 27 03:58:38 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sat, 27 Jun 2009 09:58:38 +0200 Subject: [Ironruby-core] silverlight 3 question Message-ID: Hi I have a hard time understanding why the following won't work. I started with the following xaml: and in the initialize method of App I've got the following code @root = Application.current.load_root_visual(UserControl.new, "app.xaml") request = Net::WebClient.new request.download_string_completed do |sender, args| @root.find_name("message").text = "Completed" end request.download_string_async Uri.new("http://google.com") This works but as you can see nothing interesting happens except for that download_string_completed is called because the message textbloc shows Completed @root = Application.current.load_root_visual(UserControl.new, "app.xaml") request = Net::WebClient.new request.download_string_completed do |sender, args| @root.find_name("message").text = *args.result* end request.download_string_async Uri.new("http://google.com") But as soon as I ask the args for the result nothing happens anymore. it must be an exception somewhere but I have no idea as to where I can find the exception or stacktrace because all it does is show me a blank page with all layout removed and the IronRuby Console in the bottom is still there but it is disabled too. So how do I get to that error? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Sat Jun 27 04:32:36 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sat, 27 Jun 2009 10:32:36 +0200 Subject: [Ironruby-core] silverlight 3 question In-Reply-To: References: Message-ID: I've tried to do the same in C# var wc = new WebClient(); wc.DownloadStringCompleted += (s, e) => Message.Text = e.Result; wc.DownloadStringAsync(new Uri("http://google.com")); Which actually gives me the same result but I do get to see the error once in a while. It's saying something about SecurityException. So I went on and tried fetching the page it with a webrequest var wr = WebRequest.Create("http://google.com"); wr.BeginGetResponse(ar => { var req = (WebRequest)ar.AsyncState; var resp = req.EndGetResponse(ar); using(var sr = new StreamReader(resp.GetResponseStream())) { var result = sr.ReadToEnd(); Message.Text = result; } }, null); This last approach also fails because AsyncState is null. Have I lost my mind? Am I doing something wrong or is it Silverlight? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Jun 27, 2009 at 9:58 AM, Ivan Porto Carrero wrote: > Hi > I have a hard time understanding why the following won't work. I started > with the following xaml: > > xmlns="http://schemas.microsoft.com/client/2007" > xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> > > > > > > > > and in the initialize method of App I've got the following code > > @root = Application.current.load_root_visual(UserControl.new, "app.xaml") > request = Net::WebClient.new > request.download_string_completed do |sender, args| > @root.find_name("message").text = "Completed" > end > request.download_string_async Uri.new("http://google.com") > > > This works but as you can see nothing interesting happens except for that > download_string_completed is called because the message textbloc shows > Completed > > @root = Application.current.load_root_visual(UserControl.new, "app.xaml") > request = Net::WebClient.new > request.download_string_completed do |sender, args| > @root.find_name("message").text = *args.result* > end > request.download_string_async Uri.new("http://google.com") > > But as soon as I ask the args for the result nothing happens anymore. it > must be an exception somewhere but I have no idea as to where I can find the > exception or stacktrace because all it does is show me a blank page with all > layout removed and the IronRuby Console in the bottom is still there but it > is disabled too. > > So how do I get to that error? > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Sat Jun 27 05:25:04 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Sat, 27 Jun 2009 11:25:04 +0200 Subject: [Ironruby-core] silverlight 3 question In-Reply-To: References: Message-ID: k rookie mistake I guess. google.com obviously doesn't have a crossdomainpolicy.xml file in placeUsing the flickr url I wanted to get in the first place helps a lot. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Jun 27, 2009 at 10:32 AM, Ivan Porto Carrero wrote: > I've tried to do the same in C# > > var wc = new WebClient(); > wc.DownloadStringCompleted += (s, e) => Message.Text = e.Result; > wc.DownloadStringAsync(new Uri("http://google.com")); > > Which actually gives me the same result but I do get to see the error once > in a while. It's saying something about SecurityException. > So I went on and tried fetching the page it with a webrequest > > var wr = WebRequest.Create("http://google.com"); > wr.BeginGetResponse(ar => > { > var req = > (WebRequest)ar.AsyncState; > var resp = req.EndGetResponse(ar); > using(var sr = new > StreamReader(resp.GetResponseStream())) > { > var result = sr.ReadToEnd(); > Message.Text = result; > } > }, null); > > > This last approach also fails because AsyncState is null. > Have I lost my mind? Am I doing something wrong or is it Silverlight? > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > On Sat, Jun 27, 2009 at 9:58 AM, Ivan Porto Carrero wrote: > >> Hi >> I have a hard time understanding why the following won't work. I started >> with the following xaml: >> >> > xmlns="http://schemas.microsoft.com/client/2007" >> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> >> >> >> >> >> >> >> >> and in the initialize method of App I've got the following code >> >> @root = Application.current.load_root_visual(UserControl.new, "app.xaml") >> request = Net::WebClient.new >> request.download_string_completed do |sender, args| >> @root.find_name("message").text = "Completed" >> end >> request.download_string_async Uri.new("http://google.com") >> >> >> This works but as you can see nothing interesting happens except for that >> download_string_completed is called because the message textbloc shows >> Completed >> >> @root = Application.current.load_root_visual(UserControl.new, "app.xaml") >> request = Net::WebClient.new >> request.download_string_completed do |sender, args| >> @root.find_name("message").text = *args.result* >> end >> request.download_string_async Uri.new("http://google.com") >> >> But as soon as I ask the args for the result nothing happens anymore. it >> must be an exception somewhere but I have no idea as to where I can find the >> exception or stacktrace because all it does is show me a blank page with all >> layout removed and the IronRuby Console in the bottom is still there but it >> is disabled too. >> >> So how do I get to that error? >> >> --- >> Met vriendelijke groeten - Best regards - Salutations >> Ivan Porto Carrero >> Blog: http://flanders.co.nz >> Twitter: http://twitter.com/casualjim >> Author of IronRuby in Action (http://manning.com/carrero) >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Mon Jun 29 01:44:57 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Mon, 29 Jun 2009 05:44:57 +0000 Subject: [Ironruby-core] silverlight 3 question In-Reply-To: References: Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC18AFA5D5@tk5ex14mbxc106.redmond.corp.microsoft.com> Yeah, the clientaccesspolicy.xml file requirement makes these things a bit annoying. This is why most JavaScript APIs are .js files hosted on the domain so they can make requests back to the domain. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Saturday, June 27, 2009 2:25 AM To: ironruby-core Subject: Re: [Ironruby-core] silverlight 3 question k rookie mistake I guess. google.com obviously doesn't have a crossdomainpolicy.xml file in place Using the flickr url I wanted to get in the first place helps a lot. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Jun 27, 2009 at 10:32 AM, Ivan Porto Carrero > wrote: I've tried to do the same in C# var wc = new WebClient(); wc.DownloadStringCompleted += (s, e) => Message.Text = e.Result; wc.DownloadStringAsync(new Uri("http://google.com")); Which actually gives me the same result but I do get to see the error once in a while. It's saying something about SecurityException. So I went on and tried fetching the page it with a webrequest var wr = WebRequest.Create("http://google.com"); wr.BeginGetResponse(ar => { var req = (WebRequest)ar.AsyncState; var resp = req.EndGetResponse(ar); using(var sr = new StreamReader(resp.GetResponseStream())) { var result = sr.ReadToEnd(); Message.Text = result; } }, null); This last approach also fails because AsyncState is null. Have I lost my mind? Am I doing something wrong or is it Silverlight? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Jun 27, 2009 at 9:58 AM, Ivan Porto Carrero > wrote: Hi I have a hard time understanding why the following won't work. I started with the following xaml: and in the initialize method of App I've got the following code @root = Application.current.load_root_visual(UserControl.new, "app.xaml") request = Net::WebClient.new request.download_string_completed do |sender, args| @root.find_name("message").text = "Completed" end request.download_string_async Uri.new("http://google.com") This works but as you can see nothing interesting happens except for that download_string_completed is called because the message textbloc shows Completed @root = Application.current.load_root_visual(UserControl.new, "app.xaml") request = Net::WebClient.new request.download_string_completed do |sender, args| @root.find_name("message").text = args.result end request.download_string_async Uri.new("http://google.com") But as soon as I ask the args for the result nothing happens anymore. it must be an exception somewhere but I have no idea as to where I can find the exception or stacktrace because all it does is show me a blank page with all layout removed and the IronRuby Console in the bottom is still there but it is disabled too. So how do I get to that error? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at flanders.co.nz Mon Jun 29 04:17:31 2009 From: ivan at flanders.co.nz (Ivan Porto Carrero) Date: Mon, 29 Jun 2009 10:17:31 +0200 Subject: [Ironruby-core] silverlight 3 question In-Reply-To: <0047ECBFA2E0DF4A834AA369282A5AFC18AFA5D5@tk5ex14mbxc106.redmond.corp.microsoft.com> References: <0047ECBFA2E0DF4A834AA369282A5AFC18AFA5D5@tk5ex14mbxc106.redmond.corp.microsoft.com> Message-ID: What kept me most busy was the fact that I never got any error messages displayed to me, which left as only option to comment out code until i could see something again. I have a xaml that shows a background color. When an error occurs in the ruby code the background would become white. the REPL console doesn't accept any input anymore and I have no clue as to what's going on. So sometimes I could write the code in C# and see why things were failing. I must be missing something as I do have the following as params debug=true, console=true So how do I see errors when they occur? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Mon, Jun 29, 2009 at 7:44 AM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > Yeah, the clientaccesspolicy.xml file requirement makes these things a bit > annoying. This is why most JavaScript APIs are .js files hosted on the > domain so they can make requests back to the domain. > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Saturday, June 27, 2009 2:25 AM > *To:* ironruby-core > *Subject:* Re: [Ironruby-core] silverlight 3 question > > > > k rookie mistake I guess. google.com obviously doesn't have a > crossdomainpolicy.xml file in place > > Using the flickr url I wanted to get in the first place helps a lot. > > > > > > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > On Sat, Jun 27, 2009 at 10:32 AM, Ivan Porto Carrero > wrote: > > I've tried to do the same in C# > > > > var wc = new WebClient(); > > wc.DownloadStringCompleted += (s, e) => Message.Text = e.Result; > > wc.DownloadStringAsync(new Uri("http://google.com")); > > > > Which actually gives me the same result but I do get to see the error once > in a while. It's saying something about SecurityException. > > So I went on and tried fetching the page it with a webrequest > > > > var wr = WebRequest.Create("http://google.com"); > > wr.BeginGetResponse(ar => > > { > > var req = > (WebRequest)ar.AsyncState; > > var resp = req.EndGetResponse(ar); > > using(var sr = new > StreamReader(resp.GetResponseStream())) > > { > > var result = sr.ReadToEnd(); > > Message.Text = result; > > } > > }, null); > > > > > > This last approach also fails because AsyncState is null. > > Have I lost my mind? Am I doing something wrong or is it Silverlight? > > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > On Sat, Jun 27, 2009 at 9:58 AM, Ivan Porto Carrero > wrote: > > Hi > > > > I have a hard time understanding why the following won't work. I started > with the following xaml: > > > > > xmlns="http://schemas.microsoft.com/client/2007" > > xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> > > > > > > > > > > > > > > > > and in the initialize method of App I've got the following code > > > > @root = Application.current.load_root_visual(UserControl.new, "app.xaml") > > request = Net::WebClient.new > > request.download_string_completed do |sender, args| > > @root.find_name("message").text = "Completed" > > end > > request.download_string_async Uri.new("http://google.com") > > > > > > This works but as you can see nothing interesting happens except for that > download_string_completed is called because the message textbloc shows > Completed > > > > @root = Application.current.load_root_visual(UserControl.new, "app.xaml") > > request = Net::WebClient.new > > request.download_string_completed do |sender, args| > > @root.find_name("message").text = *args.result* > > end > > request.download_string_async Uri.new("http://google.com") > > > > But as soon as I ask the args for the result nothing happens anymore. it > must be an exception somewhere but I have no idea as to where I can find the > exception or stacktrace because all it does is show me a blank page with all > layout removed and the IronRuby Console in the bottom is still there but it > is disabled too. > > > > So how do I get to that error? > > > > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Blog: http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Mon Jun 29 04:32:33 2009 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Mon, 29 Jun 2009 08:32:33 +0000 Subject: [Ironruby-core] silverlight 3 question In-Reply-To: References: <0047ECBFA2E0DF4A834AA369282A5AFC18AFA5D5@tk5ex14mbxc106.redmond.corp.microsoft.com> Message-ID: <0047ECBFA2E0DF4A834AA369282A5AFC18AFAA3B@tk5ex14mbxc106.redmond.corp.microsoft.com> Is the Silverlight control taking up the whole HTML window? If so, make sure to do so the error console shows up over the Silverlight app. If this doesn?t seem to fix it, mind sending me a repro? From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Monday, June 29, 2009 1:18 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] silverlight 3 question What kept me most busy was the fact that I never got any error messages displayed to me, which left as only option to comment out code until i could see something again. I have a xaml that shows a background color. When an error occurs in the ruby code the background would become white. the REPL console doesn't accept any input anymore and I have no clue as to what's going on. So sometimes I could write the code in C# and see why things were failing. I must be missing something as I do have the following as params debug=true, console=true So how do I see errors when they occur? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Mon, Jun 29, 2009 at 7:44 AM, Jimmy Schementi > wrote: Yeah, the clientaccesspolicy.xml file requirement makes these things a bit annoying. This is why most JavaScript APIs are .js files hosted on the domain so they can make requests back to the domain. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Saturday, June 27, 2009 2:25 AM To: ironruby-core Subject: Re: [Ironruby-core] silverlight 3 question k rookie mistake I guess. google.com obviously doesn't have a crossdomainpolicy.xml file in place Using the flickr url I wanted to get in the first place helps a lot. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Jun 27, 2009 at 10:32 AM, Ivan Porto Carrero > wrote: I've tried to do the same in C# var wc = new WebClient(); wc.DownloadStringCompleted += (s, e) => Message.Text = e.Result; wc.DownloadStringAsync(new Uri("http://google.com")); Which actually gives me the same result but I do get to see the error once in a while. It's saying something about SecurityException. So I went on and tried fetching the page it with a webrequest var wr = WebRequest.Create("http://google.com"); wr.BeginGetResponse(ar => { var req = (WebRequest)ar.AsyncState; var resp = req.EndGetResponse(ar); using(var sr = new StreamReader(resp.GetResponseStream())) { var result = sr.ReadToEnd(); Message.Text = result; } }, null); This last approach also fails because AsyncState is null. Have I lost my mind? Am I doing something wrong or is it Silverlight? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Sat, Jun 27, 2009 at 9:58 AM, Ivan Porto Carrero > wrote: Hi I have a hard time understanding why the following won't work. I started with the following xaml: and in the initialize method of App I've got the following code @root = Application.current.load_root_visual(UserControl.new, "app.xaml") request = Net::WebClient.new request.download_string_completed do |sender, args| @root.find_name("message").text = "Completed" end request.download_string_async Uri.new("http://google.com") This works but as you can see nothing interesting happens except for that download_string_completed is called because the message textbloc shows Completed @root = Application.current.load_root_visual(UserControl.new, "app.xaml") request = Net::WebClient.new request.download_string_completed do |sender, args| @root.find_name("message").text = args.result end request.download_string_async Uri.new("http://google.com") But as soon as I ask the args for the result nothing happens anymore. it must be an exception somewhere but I have no idea as to where I can find the exception or stacktrace because all it does is show me a blank page with all layout removed and the IronRuby Console in the bottom is still there but it is disabled too. So how do I get to that error? --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Tue Jun 30 14:15:23 2009 From: Shri.Borde at microsoft.com (Shri Borde) Date: Tue, 30 Jun 2009 11:15:23 -0700 Subject: [Ironruby-core] IronRuby Pair debugging Message-ID: <710DF26F214D2B4BB94287123FFE980A2E234E622D@NA-EXMSG-C104.redmond.corp.microsoft.com> When: Thursday, July 02, 2009 8:30 AM-11:00 AM (GMT-08:00) Pacific Time (US & Canada). Where: LiveMeeting and MSN Messenger Note: The GMT offset above does not reflect daylight saving time adjustments. *~*~*~*~*~*~*~*~*~* Ray, Joshua and I did a pair debugging session last Friday and it worked out very well. We drilled into some ActiveRecord bugs and have already pushed fixes for that. I am meeting Ray again on Thursday. Including ironruby-core if anyone else wants to join in. See http://wiki.github.com/ironruby/ironruby/debugging for information about pair debugging setup. Send me an email directly if want to join in. Don?t know if replying to this meeting invite will work -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/calendar Size: 2511 bytes Desc: not available URL: From Joshua.Ball at microsoft.com Tue Jun 30 14:23:36 2009 From: Joshua.Ball at microsoft.com (Joshua Ball) Date: Tue, 30 Jun 2009 18:23:36 +0000 Subject: [Ironruby-core] Declined: IronRuby Pair debugging Message-ID: <86883295EA29AB44AC175C8194B580FF051D63@TK5EX14MBXW651.wingroup.windeploy.ntdev.microsoft.com> Hey Shri, I am OOF for the rest of the week starting tomorrow. Can we try again next Thr? -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/calendar Size: 1357 bytes Desc: not available URL: