From thibaut.barrere at gmail.com Mon Feb 1 04:03:28 2010 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Mon, 1 Feb 2010 10:03:28 +0100 Subject: [Ironruby-core] IronRuby idiom for using (IDisposable) ? Message-ID: <4a68b8cf1002010103q553ae1cao25a11910c0185d41@mail.gmail.com> Hello, Is there a built-in way to achieve what C# 'using' does, with IronRuby ? Although it's pretty easy to roll your own ( http://myotherpants.com/2009/09/disposable-code), I'd like to use the built-in way if there's one. thanks! -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at whiterabbitconsulting.eu Mon Feb 1 04:07:54 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Mon, 1 Feb 2010 10:07:54 +0100 Subject: [Ironruby-core] IronRuby idiom for using (IDisposable) ? In-Reply-To: <4a68b8cf1002010103q553ae1cao25a11910c0185d41@mail.gmail.com> References: <4a68b8cf1002010103q553ae1cao25a11910c0185d41@mail.gmail.com> Message-ID: yes http://github.com/casualjim/ironnails/blob/master/IronNails/vendor/iron_nails/lib/core_ext/kernel.rb#L17 --- 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, Feb 1, 2010 at 10:03 AM, Thibaut Barr?re wrote: > Hello, > > Is there a built-in way to achieve what C# 'using' does, with IronRuby ? > > Although it's pretty easy to roll your own ( > http://myotherpants.com/2009/09/disposable-code), I'd like to use the > built-in way if there's one. > > thanks! > > -- Thibaut > > _______________________________________________ > 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 whiterabbitconsulting.eu Mon Feb 1 04:08:32 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Mon, 1 Feb 2010 10:08:32 +0100 Subject: [Ironruby-core] IronRuby idiom for using (IDisposable) ? In-Reply-To: References: <4a68b8cf1002010103q553ae1cao25a11910c0185d41@mail.gmail.com> Message-ID: you don't need to provide the true anymore. It was a bug a year ago and I still have to update that --- 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, Feb 1, 2010 at 10:07 AM, Ivan Porto Carrero < ivan at whiterabbitconsulting.eu> wrote: > yes > > > http://github.com/casualjim/ironnails/blob/master/IronNails/vendor/iron_nails/lib/core_ext/kernel.rb#L17 > --- > 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, Feb 1, 2010 at 10:03 AM, Thibaut Barr?re < > thibaut.barrere at gmail.com> wrote: > >> Hello, >> >> Is there a built-in way to achieve what C# 'using' does, with IronRuby ? >> >> Although it's pretty easy to roll your own ( >> http://myotherpants.com/2009/09/disposable-code), I'd like to use the >> built-in way if there's one. >> >> thanks! >> >> -- Thibaut >> >> _______________________________________________ >> 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 thibaut.barrere at gmail.com Mon Feb 1 04:21:43 2010 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Mon, 1 Feb 2010 10:21:43 +0100 Subject: [Ironruby-core] IronRuby idiom for using (IDisposable) ? In-Reply-To: References: <4a68b8cf1002010103q553ae1cao25a11910c0185d41@mail.gmail.com> Message-ID: <4a68b8cf1002010121l2d3eafaey4c48cb8d463dbceb@mail.gmail.com> Thanks Ivan, I like your version :) Will something similar be added directly into IronRuby Kernel ? -- Thibaut On Mon, Feb 1, 2010 at 10:07 AM, Ivan Porto Carrero < ivan at whiterabbitconsulting.eu> wrote: > yes > > > http://github.com/casualjim/ironnails/blob/master/IronNails/vendor/iron_nails/lib/core_ext/kernel.rb#L17 > --- > 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, Feb 1, 2010 at 10:03 AM, Thibaut Barr?re < > thibaut.barrere at gmail.com> wrote: > >> Hello, >> >> Is there a built-in way to achieve what C# 'using' does, with IronRuby ? >> >> Although it's pretty easy to roll your own ( >> http://myotherpants.com/2009/09/disposable-code), I'd like to use the >> built-in way if there's one. >> >> thanks! >> >> -- Thibaut >> >> _______________________________________________ >> 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 whiterabbitconsulting.eu Mon Feb 1 04:35:08 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Mon, 1 Feb 2010 10:35:08 +0100 Subject: [Ironruby-core] IronRuby idiom for using (IDisposable) ? In-Reply-To: <4a68b8cf1002010121l2d3eafaey4c48cb8d463dbceb@mail.gmail.com> References: <4a68b8cf1002010103q553ae1cao25a11910c0185d41@mail.gmail.com> <4a68b8cf1002010121l2d3eafaey4c48cb8d463dbceb@mail.gmail.com> Message-ID: it's not a rubyism as such, so I don't think it actually belongs in the core. But opinions may vary --- 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, Feb 1, 2010 at 10:21 AM, Thibaut Barr?re wrote: > Thanks Ivan, > > I like your version :) > > Will something similar be added directly into IronRuby Kernel ? > > -- Thibaut > > On Mon, Feb 1, 2010 at 10:07 AM, Ivan Porto Carrero < > ivan at whiterabbitconsulting.eu> wrote: > >> yes >> >> >> http://github.com/casualjim/ironnails/blob/master/IronNails/vendor/iron_nails/lib/core_ext/kernel.rb#L17 >> --- >> 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, Feb 1, 2010 at 10:03 AM, Thibaut Barr?re < >> thibaut.barrere at gmail.com> wrote: >> >>> Hello, >>> >>> Is there a built-in way to achieve what C# 'using' does, with IronRuby ? >>> >>> Although it's pretty easy to roll your own ( >>> http://myotherpants.com/2009/09/disposable-code), I'd like to use the >>> built-in way if there's one. >>> >>> thanks! >>> >>> -- Thibaut >>> >>> _______________________________________________ >>> 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 thibaut.barrere at gmail.com Mon Feb 1 04:46:09 2010 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Mon, 1 Feb 2010 10:46:09 +0100 Subject: [Ironruby-core] IronRuby idiom for using (IDisposable) ? In-Reply-To: References: <4a68b8cf1002010103q553ae1cao25a11910c0185d41@mail.gmail.com> <4a68b8cf1002010121l2d3eafaey4c48cb8d463dbceb@mail.gmail.com> Message-ID: <4a68b8cf1002010146y7bb99428qbcf2845d4f89fbc7@mail.gmail.com> > it's not a rubyism as such, so I don't think it actually belongs in the core. But opinions may vary agreed - it's an ironrubyism :) I think we can add it straight to the FAQ, to the very least! -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From suppakilla at gmail.com Mon Feb 1 05:09:10 2010 From: suppakilla at gmail.com (Daniele Alessandri) Date: Mon, 1 Feb 2010 11:09:10 +0100 Subject: [Ironruby-core] IronRuby idiom for using (IDisposable) ? In-Reply-To: <4a68b8cf1002010146y7bb99428qbcf2845d4f89fbc7@mail.gmail.com> References: <4a68b8cf1002010103q553ae1cao25a11910c0185d41@mail.gmail.com> <4a68b8cf1002010121l2d3eafaey4c48cb8d463dbceb@mail.gmail.com> <4a68b8cf1002010146y7bb99428qbcf2845d4f89fbc7@mail.gmail.com> Message-ID: <3bf20551002010209x421c90e8y61f62cf2fcf78317@mail.gmail.com> On Mon, Feb 1, 2010 at 10:46, Thibaut Barr?re wrote: >> it's not a rubyism as such, so I don't think it actually belongs in the >> core. But opinions may vary > > agreed - it's an ironrubyism :) I'm definitely against adding such a feature to the core (as Ivan said, it doesn't belong to ruby), but... require 'ironrubysm' # just to reuse your term, but it could be something along these lines :-) Maybe we can have a separate gem that groups a bunch of typical .NET patterns in a more rubyish way. Thoughts? -- Daniele Alessandri http://www.clorophilla.net/ http://twitter.com/JoL1hAHN From thibaut.barrere at gmail.com Mon Feb 1 05:17:57 2010 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Mon, 1 Feb 2010 11:17:57 +0100 Subject: [Ironruby-core] IronRuby idiom for using (IDisposable) ? In-Reply-To: <3bf20551002010209x421c90e8y61f62cf2fcf78317@mail.gmail.com> References: <4a68b8cf1002010103q553ae1cao25a11910c0185d41@mail.gmail.com> <4a68b8cf1002010121l2d3eafaey4c48cb8d463dbceb@mail.gmail.com> <4a68b8cf1002010146y7bb99428qbcf2845d4f89fbc7@mail.gmail.com> <3bf20551002010209x421c90e8y61f62cf2fcf78317@mail.gmail.com> Message-ID: <4a68b8cf1002010217u49c2db33y1492f043285d8a2c@mail.gmail.com> > Maybe we can have a separate gem that groups a bunch of typical .NET > patterns in a more rubyish way. Thoughts? I think it's a nice idea; it would be a bit like Facets ( http://facets.rubyforge.org/), small bits that you can enable if you wish. -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibaut.barrere at gmail.com Mon Feb 1 06:39:13 2010 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Mon, 1 Feb 2010 12:39:13 +0100 Subject: [Ironruby-core] Did Something Changed Again in Spec... In-Reply-To: References: <59eb3ade549e3e8d028f925f6ede4a87@ruby-forum.com> <9f91837697ff850426d4e0c918212d13@ruby-forum.com> Message-ID: <4a68b8cf1002010339y455deadv93d409277bf77893@mail.gmail.com> > copy C:\ironruby\lib\ironruby\gems\bin\spec C:\ironruby\bin\ispec > copy C:\ironruby\lib\ironruby\gems\bin\spec.bat C:\ironruby\bin\ispec.bat > > On my machine (in case it's useful to someone else), here are the paths and instructions for rspec http://gist.github.com/291624 -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at whiterabbitconsulting.eu Mon Feb 1 06:48:37 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Mon, 1 Feb 2010 12:48:37 +0100 Subject: [Ironruby-core] Did Something Changed Again in Spec... In-Reply-To: <4a68b8cf1002010339y455deadv93d409277bf77893@mail.gmail.com> References: <59eb3ade549e3e8d028f925f6ede4a87@ruby-forum.com> <9f91837697ff850426d4e0c918212d13@ruby-forum.com> <4a68b8cf1002010339y455deadv93d409277bf77893@mail.gmail.com> Message-ID: you don't need to do that anymore :) At least not for the ironruby that is on github and built from source there the instructions become: ir -S gem install rspec run specs: ir -S spec spec/**/*_spec.rb --- 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, Feb 1, 2010 at 12:39 PM, Thibaut Barr?re wrote: > > copy C:\ironruby\lib\ironruby\gems\bin\spec C:\ironruby\bin\ispec >> copy C:\ironruby\lib\ironruby\gems\bin\spec.bat C:\ironruby\bin\ispec.bat >> >> > On my machine (in case it's useful to someone else), here are the paths and > instructions for rspec > > http://gist.github.com/291624 > > -- Thibaut > > _______________________________________________ > 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 thibaut.barrere at gmail.com Mon Feb 1 07:01:14 2010 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Mon, 1 Feb 2010 13:01:14 +0100 Subject: [Ironruby-core] Did Something Changed Again in Spec... In-Reply-To: References: <59eb3ade549e3e8d028f925f6ede4a87@ruby-forum.com> <9f91837697ff850426d4e0c918212d13@ruby-forum.com> <4a68b8cf1002010339y455deadv93d409277bf77893@mail.gmail.com> Message-ID: <4a68b8cf1002010401k1941c59cq69d36e676e6fab23@mail.gmail.com> > you don't need to do that anymore :) > > At least not for the ironruby that is on github and built from source > > there the instructions become: > > ir -S gem install rspec > > run specs: > ir -S spec spec/**/*_spec.rb > thanks for the trick, that's good to hear (although I mostly use MSI releases these days, doing client work). -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Mon Feb 1 11:49:12 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 1 Feb 2010 16:49:12 +0000 Subject: [Ironruby-core] Code Review: bindingandyamlfxcop Message-ID: <4B342496A3EFEB48839E10BB4BF5964C384AE0F3@TK5EX14MBXC122.redmond.corp.microsoft.com> tfpt review "/shelveset:bindingandyamlfxcop;REDMOND\tomat" Comment : Kernel#binding captures receiver and eval uses it as "self". Adds FxCop configuration to yaml .csproj. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: bindingandyamlfxcop.diff Type: application/octet-stream Size: 33256 bytes Desc: bindingandyamlfxcop.diff URL: From Tomas.Matousek at microsoft.com Mon Feb 1 11:50:52 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 1 Feb 2010 16:50:52 +0000 Subject: [Ironruby-core] Differences between 1/ MRI and 2/ IronRuby+JRuby In-Reply-To: <4a68b8cf1001300509o48862decme0a7fb9b91145db4@mail.gmail.com> References: <4a68b8cf1001300509o48862decme0a7fb9b91145db4@mail.gmail.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C384AE113@TK5EX14MBXC122.redmond.corp.microsoft.com> It should work as soon as we push the latest source out. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re Sent: Saturday, January 30, 2010 5:10 AM To: ironruby-core Subject: [Ironruby-core] Differences between 1/ MRI and 2/ IronRuby+JRuby Hello, maybe someone can shed some light on that - the question is: is there a setting to make IronRuby works the same way MRI Ruby does by default for what I'm describing below ? I don't think it's a bug (but well maybe it is, just wondering). Using this script http://gist.github.com/290538 , MRI has a different behaviour than JRuby or IronRuby. The script will work just fine in MRI, whereas in JR/IR you'll get: (erb):2: undefined local variable or method `version' for main:Object (NameError) from :1:in `eval' from /opt/local/share/java/jruby/lib/ruby/1.8/erb.rb:743:in `result' from binding-error.rb:19 (erb):1: undefined method `version' for main:Object (NoMethodError) from C:/IronRuby/lib/ruby/1.8/erb.rb:716:in `result' from binding-error.rb:19 from :0:in `eval' It's just like values.send(:binding) is doing nothing. any thoughts ? thanks, -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded message was scrubbed... From: Tomas Matousek Subject: Code Review: bindingandyamlfxcop Date: Mon, 1 Feb 2010 16:49:12 +0000 Size: 46840 URL: From thibaut.barrere at gmail.com Mon Feb 1 12:01:44 2010 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Mon, 1 Feb 2010 18:01:44 +0100 Subject: [Ironruby-core] Differences between 1/ MRI and 2/ IronRuby+JRuby In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C384AE113@TK5EX14MBXC122.redmond.corp.microsoft.com> References: <4a68b8cf1001300509o48862decme0a7fb9b91145db4@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C384AE113@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: <4a68b8cf1002010901y5f09eb50m4b549e0a735babba@mail.gmail.com> Hi Thomas, > It should work as soon as we push the latest source out. thanks for the update (note that I'm in no hurry on these bugs - I'm just pushing what I find as I go, based on the MSI release, and using workaround whenever necessary). cheers, -- Thibaut > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Thibaut Barr?re > *Sent:* Saturday, January 30, 2010 5:10 AM > *To:* ironruby-core > *Subject:* [Ironruby-core] Differences between 1/ MRI and 2/ > IronRuby+JRuby > > > > Hello, > > maybe someone can shed some light on that - the question is: is there a > setting to make IronRuby works the same way MRI Ruby does by default for > what I'm describing below ? I don't think it's a bug (but well maybe it is, > just wondering). > > Using this script http://gist.github.com/290538 , MRI has a different > behaviour than JRuby or IronRuby. > > The script will work just fine in MRI, whereas in JR/IR you'll get: > > (erb):2: undefined local variable or method `version' for main:Object > (NameError) > from :1:in `eval' > from /opt/local/share/java/jruby/lib/ruby/1.8/erb.rb:743:in `result' > from binding-error.rb:19 > > (erb):1: undefined method `version' for main:Object (NoMethodError) > from C:/IronRuby/lib/ruby/1.8/erb.rb:716:in `result' > from binding-error.rb:19 > from :0:in `eval' > > It's just like values.send(:binding) is doing nothing. > > any thoughts ? > > thanks, > > -- Thibaut > > _______________________________________________ > 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 Mon Feb 1 13:16:38 2010 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 1 Feb 2010 18:16:38 +0000 Subject: [Ironruby-core] Differences between 1/ MRI and 2/ IronRuby+JRuby In-Reply-To: <4a68b8cf1002010901y5f09eb50m4b549e0a735babba@mail.gmail.com> References: <4a68b8cf1001300509o48862decme0a7fb9b91145db4@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C384AE113@TK5EX14MBXC122.redmond.corp.microsoft.com> <4a68b8cf1002010901y5f09eb50m4b549e0a735babba@mail.gmail.com> Message-ID: We should be doing an MSI in the next few weeks. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re Sent: Monday, February 01, 2010 9:02 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Differences between 1/ MRI and 2/ IronRuby+JRuby Hi Thomas, > It should work as soon as we push the latest source out. thanks for the update (note that I'm in no hurry on these bugs - I'm just pushing what I find as I go, based on the MSI release, and using workaround whenever necessary). cheers, -- Thibaut Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re Sent: Saturday, January 30, 2010 5:10 AM To: ironruby-core Subject: [Ironruby-core] Differences between 1/ MRI and 2/ IronRuby+JRuby Hello, maybe someone can shed some light on that - the question is: is there a setting to make IronRuby works the same way MRI Ruby does by default for what I'm describing below ? I don't think it's a bug (but well maybe it is, just wondering). Using this script http://gist.github.com/290538 , MRI has a different behaviour than JRuby or IronRuby. The script will work just fine in MRI, whereas in JR/IR you'll get: (erb):2: undefined local variable or method `version' for main:Object (NameError) from :1:in `eval' from /opt/local/share/java/jruby/lib/ruby/1.8/erb.rb:743:in `result' from binding-error.rb:19 (erb):1: undefined method `version' for main:Object (NoMethodError) from C:/IronRuby/lib/ruby/1.8/erb.rb:716:in `result' from binding-error.rb:19 from :0:in `eval' It's just like values.send(:binding) is doing nothing. any thoughts ? thanks, -- Thibaut _______________________________________________ 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 Mon Feb 1 13:48:40 2010 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 1 Feb 2010 18:48:40 +0000 Subject: [Ironruby-core] Code Review: bindingandyamlfxcop In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C384AE0F3@TK5EX14MBXC122.redmond.corp.microsoft.com> References: <4B342496A3EFEB48839E10BB4BF5964C384AE0F3@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: Basic test changes look good. Thanks for adding FXCop. Do we have specs for these changes? Or a bug so that I know what needs to be regressed? JD -----Original Message----- From: Tomas Matousek Sent: Monday, February 01, 2010 8:49 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: bindingandyamlfxcop tfpt review "/shelveset:bindingandyamlfxcop;REDMOND\tomat" Comment : Kernel#binding captures receiver and eval uses it as "self". Adds FxCop configuration to yaml .csproj. Tomas From ryan.riley at panesofglass.org Mon Feb 1 13:52:13 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Mon, 1 Feb 2010 12:52:13 -0600 Subject: [Ironruby-core] A nicer syntax for generic extension methods Message-ID: I have been trying to figure out how to Rubify generic extension methods for use with the likes of Rx, Open XML SDK, etc. Ivan went over it a bit with me this weekend, but I'm still having difficulty including a module within a .NET type. Is that even possible? Given: names = System::Collections::Generic::List.of(System::String).new names.add 'Ryan' Current syntax: greetings = System::Linq::Enumerable.method(:select).of(System::String).call { |name| "Howdy, #{name}" } # compare with greetings = names.map { |name| "Howdy, #{name}" } Desired syntax: greetings = names.linq_select { |name| "Howdy, #{name}" } Granted, you might make a case for using the Ruby Enumerable methods over Linq, but when it comes to using other libraries, the more Ruby-like syntax would be preferred. In the interest of working out the preferred syntax, I thought using System.Linq.Enumerable would be easiest. Ivan provided the following: module EnumerableExtensions def included(base) if base.respond_to? :to_clr_type @klass = base.to_clr_type end end def linq_select(&b) System::Linq::Enumerable.method(:select).of(@klass).call &b end end The questions I'm not able to answer are: 1. Can I somehow open up a .NET class, say System::Collections::Generic::List[T] and include the EnumerableExtensions? So far, I'm finding that's a no. 2. How do I hook in the included(base) method above? I'm assuming that's a one-time call, but I don't see anywhere that it's called when a module is included. Do I need to use a before_filter or perform that action at the beginning of the linq_select method? Thanks! Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From orion.edwards at gmail.com Mon Feb 1 14:44:46 2010 From: orion.edwards at gmail.com (Orion Edwards) Date: Tue, 2 Feb 2010 08:44:46 +1300 Subject: [Ironruby-core] IronRuby idiom for using (IDisposable) ? In-Reply-To: <4a68b8cf1002010217u49c2db33y1492f043285d8a2c@mail.gmail.com> References: <4a68b8cf1002010103q553ae1cao25a11910c0185d41@mail.gmail.com> <4a68b8cf1002010121l2d3eafaey4c48cb8d463dbceb@mail.gmail.com> <4a68b8cf1002010146y7bb99428qbcf2845d4f89fbc7@mail.gmail.com> <3bf20551002010209x421c90e8y61f62cf2fcf78317@mail.gmail.com> <4a68b8cf1002010217u49c2db33y1492f043285d8a2c@mail.gmail.com> Message-ID: <7c1b59c01002011144y783acc2epe44e0e9f8df6b3f5@mail.gmail.com> I also think it's a nice idea. I have a few other such methods (Array#to_clr_a, Time#to_clr_time, and the godawful Array#to_2d_a) that seem like they'd also be a good fit :-) On Mon, Feb 1, 2010 at 11:17 PM, Thibaut Barr?re wrote: > > Maybe we can have a separate gem that groups a bunch of typical .NET > > patterns in a more rubyish way. Thoughts? > > I think it's a nice idea; it would be a bit like Facets ( > http://facets.rubyforge.org/), small bits that you can enable if you wish. > > -- Thibaut > > _______________________________________________ > 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 Mon Feb 1 15:00:52 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 1 Feb 2010 20:00:52 +0000 Subject: [Ironruby-core] Code Review: bindingandyamlfxcop In-Reply-To: References: <4B342496A3EFEB48839E10BB4BF5964C384AE0F3@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C384AE2A0@TK5EX14MBXC122.redmond.corp.microsoft.com> I've added unit tests. There are probably no specs in Ruby suite. Note that 1.9 and 1.8 behaviors are different. Tomas -----Original Message----- From: Jim Deville Sent: Monday, February 01, 2010 10:49 AM To: Tomas Matousek; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: bindingandyamlfxcop Basic test changes look good. Thanks for adding FXCop. Do we have specs for these changes? Or a bug so that I know what needs to be regressed? JD -----Original Message----- From: Tomas Matousek Sent: Monday, February 01, 2010 8:49 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: bindingandyamlfxcop tfpt review "/shelveset:bindingandyamlfxcop;REDMOND\tomat" Comment : Kernel#binding captures receiver and eval uses it as "self". Adds FxCop configuration to yaml .csproj. Tomas From Shri.Borde at microsoft.com Mon Feb 1 15:39:55 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Mon, 1 Feb 2010 20:39:55 +0000 Subject: [Ironruby-core] Looking for more information on rubifying C# classes In-Reply-To: <8E45365BECA665489F3CB8878A6C1B7D0C8B7053@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <8E45365BECA665489F3CB8878A6C1B7D0C8B6FC8@TK5EX14MBXC134.redmond.corp.microsoft.com> <8E45365BECA665489F3CB8878A6C1B7D0C8B7053@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C8D49CD@TK5EX14MBXC132.redmond.corp.microsoft.com> Tomas has updated http://ironruby.net/Documentation/.NET/Assemblies. Thanks for the good info, Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde Sent: Thursday, January 28, 2010 12:48 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Looking for more information on rubifying C# classes Also, load_assembly calls the library initializers if called with a second argument which is the namespace within the assembly to look in for the attributes (RubyMethod, RubyConstant, etc). See Merlin\Main\Languages\Ruby\Libs\thread.rb as an example for this usage of load_library. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shri Borde Sent: Thursday, January 28, 2010 12:18 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Looking for more information on rubifying C# classes The steps sound correct. The attributes are pretty easy to understand if you search for existing uses. The harder part is how to declare the arguments with annotations for Ruby semantics. http://wiki.github.com/ironruby/ironruby/modifying-the-sources has some info. Please add to it if you can. Could you provide info about why you need to Rubyify your C# class? IronRuby already exposes a Rubified view for all .NET classes (for example, allowing you to use "lower_case" names for methods)? You need to rubyify your code mainly if you want strict Ruby semantics as is needed by the builtin library types. load_assembly is just more explicit. See http://ironruby.net/Documentation/.NET/Assemblies. load_assembly does not load the assembly on every call as .NET does not support reloading an assembly multiple times. Perhaps it should have been called require_assembly... -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Adam Burmister Sent: Thursday, January 28, 2010 11:53 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Looking for more information on rubifying C# classes Hello IronRubyists, I'm currently hunting around trying to find references on rubifying a C# class for something I'm writing. I have a few questions: - Can you confirm this summary of the process to be correct (am I missing any steps): The generate class intialiser exe parses the attributes out and generates the initializer file. Then you recompile the library with the added initializer class included. When using load_assembly you pass in the name of the initializer class name as the second parameter. Under the covers that initializer tells IronRuby how to create the ruby API. - Is there any documentation for the Ruby* attributes? (RubyMethod, RubyConstant, etc) I can easily guess at what these are/do, but I just wanted to know if there is a definitive source. - What are the differences between require and load_assembly (besides load_assembly loading the file on every call) Any answers or comments would be greatly appreciated. Thank you, Adam Burmister _______________________________________________ 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 orion.edwards at gmail.com Mon Feb 1 21:31:19 2010 From: orion.edwards at gmail.com (Orion Edwards) Date: Tue, 2 Feb 2010 15:31:19 +1300 Subject: [Ironruby-core] A nicer syntax for generic extension methods In-Reply-To: References: Message-ID: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> IIRC you can open "concrete" generics, but not "open" ones: In plain english this means you can add methods to List but not List. This is essentially because List isn't a real type in the CLR, it's basically some metadata that can be used to build a real type when the T is supplied. You could as an alternative add methods to the underlying non-generic IEnumerable interface, but then you'd have to do some run-time reflection to figure out that your List is actually a List... This is probably not nice. In theory when CLR4 lands and has support for co/contra variant generics, List should match List and everything else, but I don't know if IronRuby would also work for this? Good luck On Tue, Feb 2, 2010 at 7:52 AM, Ryan Riley wrote: > I have been trying to figure out how to Rubify generic extension methods > for use with the likes of Rx, Open XML SDK, etc. Ivan went over it a bit > with me this weekend, but I'm still having difficulty including a module > within a .NET type. Is that even possible? > > ... > > The questions I'm not able to answer are: > > 1. Can I somehow open up a .NET class, say > System::Collections::Generic::List[T] and include the EnumerableExtensions? > So far, I'm finding that's a no. > 2. How do I hook in the included(base) method above? I'm assuming > that's a one-time call, but I don't see anywhere that it's called when a > module is included. Do I need to use a before_filter or perform that action > at the beginning of the linq_select method? > > > Thanks! > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > _______________________________________________ > 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 Tue Feb 2 02:36:28 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 2 Feb 2010 07:36:28 +0000 Subject: [Ironruby-core] A nicer syntax for generic extension methods In-Reply-To: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> References: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> Actually, you can add Ruby methods to List ... IronRuby type system does some magic for you :): >>> include System::Collections::Generic => Object >>> List[Fixnum].included_modules => [System::Collections::Generic::List[T], System::Collections::Generic::IList[Fixnum], System::Collections::Generic::IList[T], System::Collections::Generic::ICollection[Fixnum], System::Collections::Generic::ICollection[T], System::Collections::Generic::IEnumerable[Fixnum], System::Collections::Generic::IEnumerable[T], System::Collections::IEnumerable, Enumerable, System::Collections::IList, System::Collections::ICollection, System::Collections::Generic, Kernel] As you can see the List<> generic type definition is treated as a module that is mixed in each of its instantiations. Although there are no predefined methods on it you can open it and add some. First we need to get Ruby class for List. If you index System.Collections.Generic.List by a fixnum instead of a class/module you'll get the generic definition of arity 1. Let's name it ListOfT: >>> ListOfT = List[1] And then we can open it up: >>> module ListOfT ... def size ... count ... end ... end => nil >>> l = List[Fixnum].new => [] >>> l.add(1) => nil >>> l.add(2) => nil >>> l.size => 2 Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Monday, February 01, 2010 6:31 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] A nicer syntax for generic extension methods IIRC you can open "concrete" generics, but not "open" ones: In plain english this means you can add methods to List but not List. This is essentially because List isn't a real type in the CLR, it's basically some metadata that can be used to build a real type when the T is supplied. You could as an alternative add methods to the underlying non-generic IEnumerable interface, but then you'd have to do some run-time reflection to figure out that your List is actually a List... This is probably not nice. In theory when CLR4 lands and has support for co/contra variant generics, List should match List and everything else, but I don't know if IronRuby would also work for this? Good luck On Tue, Feb 2, 2010 at 7:52 AM, Ryan Riley > wrote: I have been trying to figure out how to Rubify generic extension methods for use with the likes of Rx, Open XML SDK, etc. Ivan went over it a bit with me this weekend, but I'm still having difficulty including a module within a .NET type. Is that even possible? ... The questions I'm not able to answer are: 1. Can I somehow open up a .NET class, say System::Collections::Generic::List[T] and include the EnumerableExtensions? So far, I'm finding that's a no. 2. How do I hook in the included(base) method above? I'm assuming that's a one-time call, but I don't see anywhere that it's called when a module is included. Do I need to use a before_filter or perform that action at the beginning of the linq_select method? Thanks! Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ _______________________________________________ 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 marco.parenzan at libero.it Tue Feb 2 08:08:41 2010 From: marco.parenzan at libero.it (Marco Parenzan) Date: Tue, 2 Feb 2010 14:08:41 +0100 Subject: [Ironruby-core] Hosting DLR under ASP.NET In-Reply-To: References: Message-ID: <004501caa408$d88d6840$89a838c0$@parenzan@libero.it> Dear All, are there any advices about hosting DLR under ASP.NET for scripting? (not for views!)? Where hosting ScriptingRuntime, ScriptingEngine? As static variables in Global.asax? In Application? Where hosting ScriptingScope? In Session? Destroy and reistantiate at each call? I have to develop an ASP.NET MVC application, with no serious performance issues, but I don't want to abuse... Thanks in advance Marco Parenzan From shay.friedman at gmail.com Tue Feb 2 08:36:20 2010 From: shay.friedman at gmail.com (Shay Friedman) Date: Tue, 2 Feb 2010 15:36:20 +0200 Subject: [Ironruby-core] Hosting DLR under ASP.NET In-Reply-To: <-4875503013142131258@unknownmsgid> References: <-4875503013142131258@unknownmsgid> Message-ID: What do you want to achieve? Do you want to display pages written in Ruby, call Ruby functions, something else? -------------------------------------------------------- Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | Sela Technology Center Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay On Tue, Feb 2, 2010 at 3:08 PM, Marco Parenzan wrote: > Dear All, > > are there any advices about hosting DLR under ASP.NET for scripting? (not > for views!)? > Where hosting ScriptingRuntime, ScriptingEngine? > As static variables in Global.asax? In Application? > Where hosting ScriptingScope? In Session? Destroy and reistantiate at each > call? > > I have to develop an ASP.NET MVC application, with no serious performance > issues, but I don't want to abuse... > > Thanks in advance > > Marco Parenzan > > _______________________________________________ > 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 whiterabbitconsulting.eu Tue Feb 2 09:08:26 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Tue, 2 Feb 2010 15:08:26 +0100 Subject: [Ironruby-core] Hosting DLR under ASP.NET In-Reply-To: <-4875503013142131258@unknownmsgid> References: <-4875503013142131258@unknownmsgid> Message-ID: There you go: http://github.com/casualjim/ironrubymvc --- 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, Feb 2, 2010 at 2:08 PM, Marco Parenzan wrote: > Dear All, > > are there any advices about hosting DLR under ASP.NET for scripting? (not > for views!)? > Where hosting ScriptingRuntime, ScriptingEngine? > As static variables in Global.asax? In Application? > Where hosting ScriptingScope? In Session? Destroy and reistantiate at each > call? > > I have to develop an ASP.NET MVC application, with no serious performance > issues, but I don't want to abuse... > > Thanks in advance > > Marco Parenzan > > _______________________________________________ > 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 whiterabbitconsulting.eu Tue Feb 2 09:14:13 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Tue, 2 Feb 2010 15:14:13 +0100 Subject: [Ironruby-core] Hosting DLR under ASP.NET In-Reply-To: <-4875503013142131258@unknownmsgid> References: <-4875503013142131258@unknownmsgid> Message-ID: The best is to host the scriptingruntime in global.asax A script scope is something that you can think of as a unit of runnable script (1 or more files) so in a web scenario I'd say that a scriptscope is scoped to a request. For IronRubyMVC it works like this: Global.asax initializes the ruby engine and stores it in a static var The ruby engine initializes the runtime and scriptengine http://github.com/casualjim/ironrubymvc/blob/master/IronRubyMvc/Core/RubyMvcApplication.cs http://github.com/casualjim/ironrubymvc/blob/master/IronRubyMvc/Core/RubyEngine.cs#L389 hope this helps otherwise give us some more specific 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, Feb 2, 2010 at 2:08 PM, Marco Parenzan wrote: > Dear All, > > are there any advices about hosting DLR under ASP.NET for scripting? (not > for views!)? > Where hosting ScriptingRuntime, ScriptingEngine? > As static variables in Global.asax? In Application? > Where hosting ScriptingScope? In Session? Destroy and reistantiate at each > call? > > I have to develop an ASP.NET MVC application, with no serious performance > issues, but I don't want to abuse... > > Thanks in advance > > Marco Parenzan > > _______________________________________________ > 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 Feb 2 12:53:12 2010 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Tue, 2 Feb 2010 17:53:12 +0000 Subject: [Ironruby-core] [IronPython] Hosting DLR under ASP.NET In-Reply-To: <004501caa408$d88d6840$89a838c0$@parenzan@libero.it> References: <004501caa408$d88d6840$89a838c0$@parenzan@libero.it> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC920EF458@TK5EX14MBXC136.redmond.corp.microsoft.com> Recreating them on each call is OK for really simple script usages, since multiple requests of an ASP.NET app run in the same CLR instance, and the result of ScriptRuntime.GetEngine("langName") is cached, so the app will only incur a performance hit (because of the language's assemblies JITing) on the first request. However, if you want to keep some state around, let's say by defining some functions or importing a library for your script code to use, then you'll want to at least keep track of a ScriptScope, and then you might as well keep track of a ScriptEngine as well. You can store those anywhere you'd normally store things that need to persist between requests. ~js > -----Original Message----- > From: users-bounces at lists.ironpython.com [mailto:users- > bounces at lists.ironpython.com] On Behalf Of Marco Parenzan > Sent: Tuesday, February 02, 2010 5:09 AM > To: ironruby-core at rubyforge.org; users at lists.ironpython.com > Subject: [IronPython] Hosting DLR under ASP.NET > > Dear All, > > are there any advices about hosting DLR under ASP.NET for scripting? (not for > views!)? > Where hosting ScriptingRuntime, ScriptingEngine? > As static variables in Global.asax? In Application? > Where hosting ScriptingScope? In Session? Destroy and reistantiate at each > call? > > I have to develop an ASP.NET MVC application, with no serious performance > issues, but I don't want to abuse... > > Thanks in advance > > Marco Parenzan > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From orion.edwards at gmail.com Tue Feb 2 14:35:15 2010 From: orion.edwards at gmail.com (Orion Edwards) Date: Wed, 3 Feb 2010 08:35:15 +1300 Subject: [Ironruby-core] A nicer syntax for generic extension methods In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> References: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: <7c1b59c01002021135g1e2ecc50j3784c5778b75c1b3@mail.gmail.com> >> If you index System.Collections.Generic.List by a fixnum instead of a class/module you?ll get the generic definition of arity 1 Nice! I had no idea that feature existed -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan.riley at panesofglass.org Tue Feb 2 17:38:44 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Tue, 2 Feb 2010 16:38:44 -0600 Subject: [Ironruby-core] A nicer syntax for generic extension methods In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> References: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: That's fantastic, Tomas, thanks! Is there any way to pass a block, lambda, or Proc into the slot for the delegate, or perhaps a way to create a .NET delegate (or Expression) from a block, lambda, or Proc? Thanks, Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Tue, Feb 2, 2010 at 1:36 AM, Tomas Matousek wrote: > Actually, you can add Ruby methods to List ? IronRuby type system does > some magic for you J: > > > > >>> include System::Collections::Generic > > => Object > > >>> List[Fixnum].included_modules > > => [System::Collections::Generic::List[T], > System::Collections::Generic::IList[Fixnum], > System::Collections::Generic::IList[T], > System::Collections::Generic::ICollection[Fixnum], > System::Collections::Generic::ICollection[T], > System::Collections::Generic::IEnumerable[Fixnum], > System::Collections::Generic::IEnumerable[T], > System::Collections::IEnumerable, Enumerable, System::Collections::IList, > System::Collections::ICollection, System::Collections::Generic, Kernel] > > > > As you can see the List<> generic type definition is treated as a module > that is mixed in each of its instantiations. Although there are no > predefined methods on it you can open it and add some. First we need to get > Ruby class for List. If you index System.Collections.Generic.List by a > fixnum instead of a class/module you?ll get the generic definition of arity > 1. Let?s name it ListOfT: > > > > >>> ListOfT = List[1] > > > > And then we can open it up: > > > > >>> module ListOfT > > ... def size > > ... count > > ... end > > ... end > > => nil > > >>> l = List[Fixnum].new > > => [] > > >>> l.add(1) > > => nil > > >>> l.add(2) > > => nil > > >>> l.size > > => 2 > > > > Tomas > > > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards > *Sent:* Monday, February 01, 2010 6:31 PM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] A nicer syntax for generic extension > methods > > > > IIRC you can open "concrete" generics, but not "open" ones: In plain > english this means you can add methods to List but not List. > > > > This is essentially because List isn't a real type in the CLR, it's > basically some metadata that can be used to build a real type when the T is > supplied. > > > > You could as an alternative add methods to the underlying non-generic > IEnumerable interface, but then you'd have to do some run-time reflection to > figure out that your List is actually a List... This is probably not > nice. > > > > In theory when CLR4 lands and has support for co/contra variant generics, > List should match List and everything else, but I don't know > if IronRuby would also work for this? > > > > Good luck > > On Tue, Feb 2, 2010 at 7:52 AM, Ryan Riley > wrote: > > I have been trying to figure out how to Rubify generic extension methods > for use with the likes of Rx, Open XML SDK, etc. Ivan went over it a bit > with me this weekend, but I'm still having difficulty including a module > within a .NET type. Is that even possible? > > > > ... > > > > The questions I'm not able to answer are: > > 1. Can I somehow open up a .NET class, say > System::Collections::Generic::List[T] and include the EnumerableExtensions? > So far, I'm finding that's a no. > 2. How do I hook in the included(base) method above? I'm assuming > that's a one-time call, but I don't see anywhere that it's called when a > module is included. Do I need to use a before_filter or perform that action > at the beginning of the linq_select method? > > > > Thanks! > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at whiterabbitconsulting.eu Wed Feb 3 00:40:27 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Wed, 3 Feb 2010 06:40:27 +0100 Subject: [Ironruby-core] A nicer syntax for generic extension methods In-Reply-To: References: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: just pass your block to the constructor of a delegate and you should be good to go Action.new { more_work_here } --- 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, Feb 2, 2010 at 11:38 PM, Ryan Riley wrote: > That's fantastic, Tomas, thanks! Is there any way to pass a block, lambda, > or Proc into the slot for the delegate, or perhaps a way to create a .NET > delegate (or Expression) from a block, lambda, or Proc? > > Thanks, > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > > On Tue, Feb 2, 2010 at 1:36 AM, Tomas Matousek < > Tomas.Matousek at microsoft.com> wrote: > >> Actually, you can add Ruby methods to List ? IronRuby type system does >> some magic for you J: >> >> >> >> >>> include System::Collections::Generic >> >> => Object >> >> >>> List[Fixnum].included_modules >> >> => [System::Collections::Generic::List[T], >> System::Collections::Generic::IList[Fixnum], >> System::Collections::Generic::IList[T], >> System::Collections::Generic::ICollection[Fixnum], >> System::Collections::Generic::ICollection[T], >> System::Collections::Generic::IEnumerable[Fixnum], >> System::Collections::Generic::IEnumerable[T], >> System::Collections::IEnumerable, Enumerable, System::Collections::IList, >> System::Collections::ICollection, System::Collections::Generic, Kernel] >> >> >> >> As you can see the List<> generic type definition is treated as a module >> that is mixed in each of its instantiations. Although there are no >> predefined methods on it you can open it and add some. First we need to get >> Ruby class for List. If you index System.Collections.Generic.List by a >> fixnum instead of a class/module you?ll get the generic definition of arity >> 1. Let?s name it ListOfT: >> >> >> >> >>> ListOfT = List[1] >> >> >> >> And then we can open it up: >> >> >> >> >>> module ListOfT >> >> ... def size >> >> ... count >> >> ... end >> >> ... end >> >> => nil >> >> >>> l = List[Fixnum].new >> >> => [] >> >> >>> l.add(1) >> >> => nil >> >> >>> l.add(2) >> >> => nil >> >> >>> l.size >> >> => 2 >> >> >> >> Tomas >> >> >> >> >> >> *From:* ironruby-core-bounces at rubyforge.org [mailto: >> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards >> *Sent:* Monday, February 01, 2010 6:31 PM >> *To:* ironruby-core at rubyforge.org >> *Subject:* Re: [Ironruby-core] A nicer syntax for generic extension >> methods >> >> >> >> IIRC you can open "concrete" generics, but not "open" ones: In plain >> english this means you can add methods to List but not List. >> >> >> >> This is essentially because List isn't a real type in the CLR, it's >> basically some metadata that can be used to build a real type when the T is >> supplied. >> >> >> >> You could as an alternative add methods to the underlying non-generic >> IEnumerable interface, but then you'd have to do some run-time reflection to >> figure out that your List is actually a List... This is probably not >> nice. >> >> >> >> In theory when CLR4 lands and has support for co/contra variant generics, >> List should match List and everything else, but I don't know >> if IronRuby would also work for this? >> >> >> >> Good luck >> >> On Tue, Feb 2, 2010 at 7:52 AM, Ryan Riley >> wrote: >> >> I have been trying to figure out how to Rubify generic extension methods >> for use with the likes of Rx, Open XML SDK, etc. Ivan went over it a bit >> with me this weekend, but I'm still having difficulty including a module >> within a .NET type. Is that even possible? >> >> >> >> ... >> >> >> >> The questions I'm not able to answer are: >> >> 1. Can I somehow open up a .NET class, say >> System::Collections::Generic::List[T] and include the EnumerableExtensions? >> So far, I'm finding that's a no. >> 2. How do I hook in the included(base) method above? I'm assuming >> that's a one-time call, but I don't see anywhere that it's called when a >> module is included. Do I need to use a before_filter or perform that action >> at the beginning of the linq_select method? >> >> >> >> Thanks! >> >> >> Ryan Riley >> >> Email: ryan.riley at panesofglass.org >> LinkedIn: http://www.linkedin.com/in/ryanriley >> Blog: http://wizardsofsmart.net/ >> Twitter: @panesofglass >> Website: http://panesofglass.org/ >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan.riley at panesofglass.org Wed Feb 3 10:01:54 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Wed, 3 Feb 2010 09:01:54 -0600 Subject: [Ironruby-core] A nicer syntax for generic extension methods In-Reply-To: References: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: Thanks, Ivan. That's awesome ... that's just like F#. I should have realized it would be that simple. I'll post this to the Delegates section of the .NET interop page on the wiki, since it currently doesn't exist. Also, I noticed you alluded to something similar in IronRuby in Action where you talk about LightSpeed, but I couldn't find anything in the MEAP copy I have. If I am able to spin up a few LINQ samples (probably Rx, Pfx, and/or XLinq), I'll shoot them your way, if you are interested. Cheers! Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Tue, Feb 2, 2010 at 11:40 PM, Ivan Porto Carrero < ivan at whiterabbitconsulting.eu> wrote: > just pass your block to the constructor of a delegate and you should be > good to go > > Action.new { more_work_here } > --- > 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, Feb 2, 2010 at 11:38 PM, Ryan Riley wrote: > >> That's fantastic, Tomas, thanks! Is there any way to pass a block, lambda, >> or Proc into the slot for the delegate, or perhaps a way to create a .NET >> delegate (or Expression) from a block, lambda, or Proc? >> >> Thanks, >> >> Ryan Riley >> >> Email: ryan.riley at panesofglass.org >> LinkedIn: http://www.linkedin.com/in/ryanriley >> Blog: http://wizardsofsmart.net/ >> Twitter: @panesofglass >> Website: http://panesofglass.org/ >> >> >> On Tue, Feb 2, 2010 at 1:36 AM, Tomas Matousek < >> Tomas.Matousek at microsoft.com> wrote: >> >>> Actually, you can add Ruby methods to List ? IronRuby type system does >>> some magic for you J: >>> >>> >>> >>> >>> include System::Collections::Generic >>> >>> => Object >>> >>> >>> List[Fixnum].included_modules >>> >>> => [System::Collections::Generic::List[T], >>> System::Collections::Generic::IList[Fixnum], >>> System::Collections::Generic::IList[T], >>> System::Collections::Generic::ICollection[Fixnum], >>> System::Collections::Generic::ICollection[T], >>> System::Collections::Generic::IEnumerable[Fixnum], >>> System::Collections::Generic::IEnumerable[T], >>> System::Collections::IEnumerable, Enumerable, System::Collections::IList, >>> System::Collections::ICollection, System::Collections::Generic, Kernel] >>> >>> >>> >>> As you can see the List<> generic type definition is treated as a module >>> that is mixed in each of its instantiations. Although there are no >>> predefined methods on it you can open it and add some. First we need to get >>> Ruby class for List. If you index System.Collections.Generic.List by a >>> fixnum instead of a class/module you?ll get the generic definition of arity >>> 1. Let?s name it ListOfT: >>> >>> >>> >>> >>> ListOfT = List[1] >>> >>> >>> >>> And then we can open it up: >>> >>> >>> >>> >>> module ListOfT >>> >>> ... def size >>> >>> ... count >>> >>> ... end >>> >>> ... end >>> >>> => nil >>> >>> >>> l = List[Fixnum].new >>> >>> => [] >>> >>> >>> l.add(1) >>> >>> => nil >>> >>> >>> l.add(2) >>> >>> => nil >>> >>> >>> l.size >>> >>> => 2 >>> >>> >>> >>> Tomas >>> >>> >>> >>> >>> >>> *From:* ironruby-core-bounces at rubyforge.org [mailto: >>> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards >>> *Sent:* Monday, February 01, 2010 6:31 PM >>> *To:* ironruby-core at rubyforge.org >>> *Subject:* Re: [Ironruby-core] A nicer syntax for generic extension >>> methods >>> >>> >>> >>> IIRC you can open "concrete" generics, but not "open" ones: In plain >>> english this means you can add methods to List but not List. >>> >>> >>> >>> This is essentially because List isn't a real type in the CLR, it's >>> basically some metadata that can be used to build a real type when the T is >>> supplied. >>> >>> >>> >>> You could as an alternative add methods to the underlying non-generic >>> IEnumerable interface, but then you'd have to do some run-time reflection to >>> figure out that your List is actually a List... This is probably not >>> nice. >>> >>> >>> >>> In theory when CLR4 lands and has support for co/contra variant generics, >>> List should match List and everything else, but I don't know >>> if IronRuby would also work for this? >>> >>> >>> >>> Good luck >>> >>> On Tue, Feb 2, 2010 at 7:52 AM, Ryan Riley >>> wrote: >>> >>> I have been trying to figure out how to Rubify generic extension methods >>> for use with the likes of Rx, Open XML SDK, etc. Ivan went over it a bit >>> with me this weekend, but I'm still having difficulty including a module >>> within a .NET type. Is that even possible? >>> >>> >>> >>> ... >>> >>> >>> >>> The questions I'm not able to answer are: >>> >>> 1. Can I somehow open up a .NET class, say >>> System::Collections::Generic::List[T] and include the EnumerableExtensions? >>> So far, I'm finding that's a no. >>> 2. How do I hook in the included(base) method above? I'm assuming >>> that's a one-time call, but I don't see anywhere that it's called when a >>> module is included. Do I need to use a before_filter or perform that action >>> at the beginning of the linq_select method? >>> >>> >>> >>> Thanks! >>> >>> >>> Ryan Riley >>> >>> Email: ryan.riley at panesofglass.org >>> LinkedIn: http://www.linkedin.com/in/ryanriley >>> Blog: http://wizardsofsmart.net/ >>> Twitter: @panesofglass >>> Website: http://panesofglass.org/ >>> >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >>> >>> >>> >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >>> >>> >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> > > _______________________________________________ > 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 ryan.riley at panesofglass.org Wed Feb 3 10:31:36 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Wed, 3 Feb 2010 09:31:36 -0600 Subject: [Ironruby-core] A nicer syntax for generic extension methods In-Reply-To: References: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: Okay, just posted a rough first stab at the topic. This is all generic delegates, too; I haven't bothered with plain old generics. :) Please let me know if you have any feedback. I will add the stuff Tomas noted above when I get a chance a little later. http://ironruby.net/Documentation/.NET/Delegates Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Wed, Feb 3, 2010 at 9:01 AM, Ryan Riley wrote: > Thanks, Ivan. That's awesome ... that's just like F#. I should have > realized it would be that simple. I'll post this to the Delegates section of > the .NET interop page on the wiki, since it currently doesn't exist. > > Also, I noticed you alluded to something similar in IronRuby in Action > where you talk about LightSpeed, but I couldn't find anything in the MEAP > copy I have. If I am able to spin up a few LINQ samples (probably Rx, Pfx, > and/or XLinq), I'll shoot them your way, if you are interested. > > Cheers! > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > > On Tue, Feb 2, 2010 at 11:40 PM, Ivan Porto Carrero < > ivan at whiterabbitconsulting.eu> wrote: > >> just pass your block to the constructor of a delegate and you should be >> good to go >> >> Action.new { more_work_here } >> --- >> 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, Feb 2, 2010 at 11:38 PM, Ryan Riley wrote: >> >>> That's fantastic, Tomas, thanks! Is there any way to pass a block, >>> lambda, or Proc into the slot for the delegate, or perhaps a way to create a >>> .NET delegate (or Expression) from a block, lambda, or Proc? >>> >>> Thanks, >>> >>> Ryan Riley >>> >>> Email: ryan.riley at panesofglass.org >>> LinkedIn: http://www.linkedin.com/in/ryanriley >>> Blog: http://wizardsofsmart.net/ >>> Twitter: @panesofglass >>> Website: http://panesofglass.org/ >>> >>> >>> On Tue, Feb 2, 2010 at 1:36 AM, Tomas Matousek < >>> Tomas.Matousek at microsoft.com> wrote: >>> >>>> Actually, you can add Ruby methods to List ? IronRuby type system >>>> does some magic for you J: >>>> >>>> >>>> >>>> >>> include System::Collections::Generic >>>> >>>> => Object >>>> >>>> >>> List[Fixnum].included_modules >>>> >>>> => [System::Collections::Generic::List[T], >>>> System::Collections::Generic::IList[Fixnum], >>>> System::Collections::Generic::IList[T], >>>> System::Collections::Generic::ICollection[Fixnum], >>>> System::Collections::Generic::ICollection[T], >>>> System::Collections::Generic::IEnumerable[Fixnum], >>>> System::Collections::Generic::IEnumerable[T], >>>> System::Collections::IEnumerable, Enumerable, System::Collections::IList, >>>> System::Collections::ICollection, System::Collections::Generic, Kernel] >>>> >>>> >>>> >>>> As you can see the List<> generic type definition is treated as a module >>>> that is mixed in each of its instantiations. Although there are no >>>> predefined methods on it you can open it and add some. First we need to get >>>> Ruby class for List. If you index System.Collections.Generic.List by a >>>> fixnum instead of a class/module you?ll get the generic definition of arity >>>> 1. Let?s name it ListOfT: >>>> >>>> >>>> >>>> >>> ListOfT = List[1] >>>> >>>> >>>> >>>> And then we can open it up: >>>> >>>> >>>> >>>> >>> module ListOfT >>>> >>>> ... def size >>>> >>>> ... count >>>> >>>> ... end >>>> >>>> ... end >>>> >>>> => nil >>>> >>>> >>> l = List[Fixnum].new >>>> >>>> => [] >>>> >>>> >>> l.add(1) >>>> >>>> => nil >>>> >>>> >>> l.add(2) >>>> >>>> => nil >>>> >>>> >>> l.size >>>> >>>> => 2 >>>> >>>> >>>> >>>> Tomas >>>> >>>> >>>> >>>> >>>> >>>> *From:* ironruby-core-bounces at rubyforge.org [mailto: >>>> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards >>>> *Sent:* Monday, February 01, 2010 6:31 PM >>>> *To:* ironruby-core at rubyforge.org >>>> *Subject:* Re: [Ironruby-core] A nicer syntax for generic extension >>>> methods >>>> >>>> >>>> >>>> IIRC you can open "concrete" generics, but not "open" ones: In plain >>>> english this means you can add methods to List but not List. >>>> >>>> >>>> >>>> This is essentially because List isn't a real type in the CLR, it's >>>> basically some metadata that can be used to build a real type when the T is >>>> supplied. >>>> >>>> >>>> >>>> You could as an alternative add methods to the underlying non-generic >>>> IEnumerable interface, but then you'd have to do some run-time reflection to >>>> figure out that your List is actually a List... This is probably not >>>> nice. >>>> >>>> >>>> >>>> In theory when CLR4 lands and has support for co/contra variant >>>> generics, List should match List and everything else, but I >>>> don't know if IronRuby would also work for this? >>>> >>>> >>>> >>>> Good luck >>>> >>>> On Tue, Feb 2, 2010 at 7:52 AM, Ryan Riley >>>> wrote: >>>> >>>> I have been trying to figure out how to Rubify generic extension methods >>>> for use with the likes of Rx, Open XML SDK, etc. Ivan went over it a bit >>>> with me this weekend, but I'm still having difficulty including a module >>>> within a .NET type. Is that even possible? >>>> >>>> >>>> >>>> ... >>>> >>>> >>>> >>>> The questions I'm not able to answer are: >>>> >>>> 1. Can I somehow open up a .NET class, say >>>> System::Collections::Generic::List[T] and include the EnumerableExtensions? >>>> So far, I'm finding that's a no. >>>> 2. How do I hook in the included(base) method above? I'm assuming >>>> that's a one-time call, but I don't see anywhere that it's called when a >>>> module is included. Do I need to use a before_filter or perform that action >>>> at the beginning of the linq_select method? >>>> >>>> >>>> >>>> Thanks! >>>> >>>> >>>> Ryan Riley >>>> >>>> Email: ryan.riley at panesofglass.org >>>> LinkedIn: http://www.linkedin.com/in/ryanriley >>>> Blog: http://wizardsofsmart.net/ >>>> Twitter: @panesofglass >>>> Website: http://panesofglass.org/ >>>> >>>> _______________________________________________ >>>> Ironruby-core mailing list >>>> Ironruby-core at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>>> >>>> >>>> >>>> _______________________________________________ >>>> Ironruby-core mailing list >>>> Ironruby-core at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>>> >>>> >>> >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >>> >>> >> >> _______________________________________________ >> 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 ryan.riley at panesofglass.org Wed Feb 3 10:52:18 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Wed, 3 Feb 2010 09:52:18 -0600 Subject: [Ironruby-core] A nicer syntax for generic extension methods In-Reply-To: References: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: I just thought of something else. How do you deal with anonymous types in IronRuby? We don't have the type name when writing the code. Do we have to create at least a Ruby type for everything returned from an Enumerable.Select? I suppose that's where the module wrapper over LINQ would perhaps come in handy? Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Wed, Feb 3, 2010 at 9:31 AM, Ryan Riley wrote: > Okay, just posted a rough first stab at the topic. This is all generic > delegates, too; I haven't bothered with plain old generics. :) Please let me > know if you have any feedback. I will add the stuff Tomas noted above when I > get a chance a little later. > > http://ironruby.net/Documentation/.NET/Delegates > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > > On Wed, Feb 3, 2010 at 9:01 AM, Ryan Riley wrote: > >> Thanks, Ivan. That's awesome ... that's just like F#. I should have >> realized it would be that simple. I'll post this to the Delegates section of >> the .NET interop page on the wiki, since it currently doesn't exist. >> >> Also, I noticed you alluded to something similar in IronRuby in Action >> where you talk about LightSpeed, but I couldn't find anything in the MEAP >> copy I have. If I am able to spin up a few LINQ samples (probably Rx, Pfx, >> and/or XLinq), I'll shoot them your way, if you are interested. >> >> Cheers! >> >> Ryan Riley >> >> Email: ryan.riley at panesofglass.org >> LinkedIn: http://www.linkedin.com/in/ryanriley >> Blog: http://wizardsofsmart.net/ >> Twitter: @panesofglass >> Website: http://panesofglass.org/ >> >> >> On Tue, Feb 2, 2010 at 11:40 PM, Ivan Porto Carrero < >> ivan at whiterabbitconsulting.eu> wrote: >> >>> just pass your block to the constructor of a delegate and you should be >>> good to go >>> >>> Action.new { more_work_here } >>> --- >>> 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, Feb 2, 2010 at 11:38 PM, Ryan Riley >> > wrote: >>> >>>> That's fantastic, Tomas, thanks! Is there any way to pass a block, >>>> lambda, or Proc into the slot for the delegate, or perhaps a way to create a >>>> .NET delegate (or Expression) from a block, lambda, or Proc? >>>> >>>> Thanks, >>>> >>>> Ryan Riley >>>> >>>> Email: ryan.riley at panesofglass.org >>>> LinkedIn: http://www.linkedin.com/in/ryanriley >>>> Blog: http://wizardsofsmart.net/ >>>> Twitter: @panesofglass >>>> Website: http://panesofglass.org/ >>>> >>>> >>>> On Tue, Feb 2, 2010 at 1:36 AM, Tomas Matousek < >>>> Tomas.Matousek at microsoft.com> wrote: >>>> >>>>> Actually, you can add Ruby methods to List ? IronRuby type system >>>>> does some magic for you J: >>>>> >>>>> >>>>> >>>>> >>> include System::Collections::Generic >>>>> >>>>> => Object >>>>> >>>>> >>> List[Fixnum].included_modules >>>>> >>>>> => [System::Collections::Generic::List[T], >>>>> System::Collections::Generic::IList[Fixnum], >>>>> System::Collections::Generic::IList[T], >>>>> System::Collections::Generic::ICollection[Fixnum], >>>>> System::Collections::Generic::ICollection[T], >>>>> System::Collections::Generic::IEnumerable[Fixnum], >>>>> System::Collections::Generic::IEnumerable[T], >>>>> System::Collections::IEnumerable, Enumerable, System::Collections::IList, >>>>> System::Collections::ICollection, System::Collections::Generic, Kernel] >>>>> >>>>> >>>>> >>>>> As you can see the List<> generic type definition is treated as a >>>>> module that is mixed in each of its instantiations. Although there are no >>>>> predefined methods on it you can open it and add some. First we need to get >>>>> Ruby class for List. If you index System.Collections.Generic.List by a >>>>> fixnum instead of a class/module you?ll get the generic definition of arity >>>>> 1. Let?s name it ListOfT: >>>>> >>>>> >>>>> >>>>> >>> ListOfT = List[1] >>>>> >>>>> >>>>> >>>>> And then we can open it up: >>>>> >>>>> >>>>> >>>>> >>> module ListOfT >>>>> >>>>> ... def size >>>>> >>>>> ... count >>>>> >>>>> ... end >>>>> >>>>> ... end >>>>> >>>>> => nil >>>>> >>>>> >>> l = List[Fixnum].new >>>>> >>>>> => [] >>>>> >>>>> >>> l.add(1) >>>>> >>>>> => nil >>>>> >>>>> >>> l.add(2) >>>>> >>>>> => nil >>>>> >>>>> >>> l.size >>>>> >>>>> => 2 >>>>> >>>>> >>>>> >>>>> Tomas >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> *From:* ironruby-core-bounces at rubyforge.org [mailto: >>>>> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards >>>>> *Sent:* Monday, February 01, 2010 6:31 PM >>>>> *To:* ironruby-core at rubyforge.org >>>>> *Subject:* Re: [Ironruby-core] A nicer syntax for generic extension >>>>> methods >>>>> >>>>> >>>>> >>>>> IIRC you can open "concrete" generics, but not "open" ones: In plain >>>>> english this means you can add methods to List but not List. >>>>> >>>>> >>>>> >>>>> This is essentially because List isn't a real type in the CLR, it's >>>>> basically some metadata that can be used to build a real type when the T is >>>>> supplied. >>>>> >>>>> >>>>> >>>>> You could as an alternative add methods to the underlying non-generic >>>>> IEnumerable interface, but then you'd have to do some run-time reflection to >>>>> figure out that your List is actually a List... This is probably not >>>>> nice. >>>>> >>>>> >>>>> >>>>> In theory when CLR4 lands and has support for co/contra variant >>>>> generics, List should match List and everything else, but I >>>>> don't know if IronRuby would also work for this? >>>>> >>>>> >>>>> >>>>> Good luck >>>>> >>>>> On Tue, Feb 2, 2010 at 7:52 AM, Ryan Riley < >>>>> ryan.riley at panesofglass.org> wrote: >>>>> >>>>> I have been trying to figure out how to Rubify generic extension >>>>> methods for use with the likes of Rx, Open XML SDK, etc. Ivan went over it a >>>>> bit with me this weekend, but I'm still having difficulty including a module >>>>> within a .NET type. Is that even possible? >>>>> >>>>> >>>>> >>>>> ... >>>>> >>>>> >>>>> >>>>> The questions I'm not able to answer are: >>>>> >>>>> 1. Can I somehow open up a .NET class, say >>>>> System::Collections::Generic::List[T] and include the EnumerableExtensions? >>>>> So far, I'm finding that's a no. >>>>> 2. How do I hook in the included(base) method above? I'm assuming >>>>> that's a one-time call, but I don't see anywhere that it's called when a >>>>> module is included. Do I need to use a before_filter or perform that action >>>>> at the beginning of the linq_select method? >>>>> >>>>> >>>>> >>>>> Thanks! >>>>> >>>>> >>>>> Ryan Riley >>>>> >>>>> Email: ryan.riley at panesofglass.org >>>>> LinkedIn: http://www.linkedin.com/in/ryanriley >>>>> Blog: http://wizardsofsmart.net/ >>>>> Twitter: @panesofglass >>>>> Website: http://panesofglass.org/ >>>>> >>>>> _______________________________________________ >>>>> Ironruby-core mailing list >>>>> Ironruby-core at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Ironruby-core mailing list >>>>> Ironruby-core at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> Ironruby-core mailing list >>>> Ironruby-core at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>>> >>>> >>> >>> _______________________________________________ >>> 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 ryan.riley at panesofglass.org Wed Feb 3 10:54:36 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Wed, 3 Feb 2010 09:54:36 -0600 Subject: [Ironruby-core] A nicer syntax for generic extension methods In-Reply-To: References: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: Or is that not even an issue? I suppose if you are writing a LINQ statement within IR, you won't ever create an anonymous type; you would rather create a Ruby type, hash, etc. I suppose this would only be an issue if you had a method returning an anonymous type, which is already a documented no-no, so I will retract my previous question. :) Sorry for the brain-dump. Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Wed, Feb 3, 2010 at 9:52 AM, Ryan Riley wrote: > I just thought of something else. How do you deal with anonymous types in > IronRuby? We don't have the type name when writing the code. Do we have to > create at least a Ruby type for everything returned from an > Enumerable.Select? I suppose that's where the module wrapper over LINQ would > perhaps come in handy? > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > > On Wed, Feb 3, 2010 at 9:31 AM, Ryan Riley wrote: > >> Okay, just posted a rough first stab at the topic. This is all generic >> delegates, too; I haven't bothered with plain old generics. :) Please let me >> know if you have any feedback. I will add the stuff Tomas noted above when I >> get a chance a little later. >> >> http://ironruby.net/Documentation/.NET/Delegates >> >> Ryan Riley >> >> Email: ryan.riley at panesofglass.org >> LinkedIn: http://www.linkedin.com/in/ryanriley >> Blog: http://wizardsofsmart.net/ >> Twitter: @panesofglass >> Website: http://panesofglass.org/ >> >> >> On Wed, Feb 3, 2010 at 9:01 AM, Ryan Riley wrote: >> >>> Thanks, Ivan. That's awesome ... that's just like F#. I should have >>> realized it would be that simple. I'll post this to the Delegates section of >>> the .NET interop page on the wiki, since it currently doesn't exist. >>> >>> Also, I noticed you alluded to something similar in IronRuby in Action >>> where you talk about LightSpeed, but I couldn't find anything in the MEAP >>> copy I have. If I am able to spin up a few LINQ samples (probably Rx, Pfx, >>> and/or XLinq), I'll shoot them your way, if you are interested. >>> >>> Cheers! >>> >>> Ryan Riley >>> >>> Email: ryan.riley at panesofglass.org >>> LinkedIn: http://www.linkedin.com/in/ryanriley >>> Blog: http://wizardsofsmart.net/ >>> Twitter: @panesofglass >>> Website: http://panesofglass.org/ >>> >>> >>> On Tue, Feb 2, 2010 at 11:40 PM, Ivan Porto Carrero < >>> ivan at whiterabbitconsulting.eu> wrote: >>> >>>> just pass your block to the constructor of a delegate and you should be >>>> good to go >>>> >>>> Action.new { more_work_here } >>>> --- >>>> 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, Feb 2, 2010 at 11:38 PM, Ryan Riley < >>>> ryan.riley at panesofglass.org> wrote: >>>> >>>>> That's fantastic, Tomas, thanks! Is there any way to pass a block, >>>>> lambda, or Proc into the slot for the delegate, or perhaps a way to create a >>>>> .NET delegate (or Expression) from a block, lambda, or Proc? >>>>> >>>>> Thanks, >>>>> >>>>> Ryan Riley >>>>> >>>>> Email: ryan.riley at panesofglass.org >>>>> LinkedIn: http://www.linkedin.com/in/ryanriley >>>>> Blog: http://wizardsofsmart.net/ >>>>> Twitter: @panesofglass >>>>> Website: http://panesofglass.org/ >>>>> >>>>> >>>>> On Tue, Feb 2, 2010 at 1:36 AM, Tomas Matousek < >>>>> Tomas.Matousek at microsoft.com> wrote: >>>>> >>>>>> Actually, you can add Ruby methods to List ? IronRuby type system >>>>>> does some magic for you J: >>>>>> >>>>>> >>>>>> >>>>>> >>> include System::Collections::Generic >>>>>> >>>>>> => Object >>>>>> >>>>>> >>> List[Fixnum].included_modules >>>>>> >>>>>> => [System::Collections::Generic::List[T], >>>>>> System::Collections::Generic::IList[Fixnum], >>>>>> System::Collections::Generic::IList[T], >>>>>> System::Collections::Generic::ICollection[Fixnum], >>>>>> System::Collections::Generic::ICollection[T], >>>>>> System::Collections::Generic::IEnumerable[Fixnum], >>>>>> System::Collections::Generic::IEnumerable[T], >>>>>> System::Collections::IEnumerable, Enumerable, System::Collections::IList, >>>>>> System::Collections::ICollection, System::Collections::Generic, Kernel] >>>>>> >>>>>> >>>>>> >>>>>> As you can see the List<> generic type definition is treated as a >>>>>> module that is mixed in each of its instantiations. Although there are no >>>>>> predefined methods on it you can open it and add some. First we need to get >>>>>> Ruby class for List. If you index System.Collections.Generic.List by a >>>>>> fixnum instead of a class/module you?ll get the generic definition of arity >>>>>> 1. Let?s name it ListOfT: >>>>>> >>>>>> >>>>>> >>>>>> >>> ListOfT = List[1] >>>>>> >>>>>> >>>>>> >>>>>> And then we can open it up: >>>>>> >>>>>> >>>>>> >>>>>> >>> module ListOfT >>>>>> >>>>>> ... def size >>>>>> >>>>>> ... count >>>>>> >>>>>> ... end >>>>>> >>>>>> ... end >>>>>> >>>>>> => nil >>>>>> >>>>>> >>> l = List[Fixnum].new >>>>>> >>>>>> => [] >>>>>> >>>>>> >>> l.add(1) >>>>>> >>>>>> => nil >>>>>> >>>>>> >>> l.add(2) >>>>>> >>>>>> => nil >>>>>> >>>>>> >>> l.size >>>>>> >>>>>> => 2 >>>>>> >>>>>> >>>>>> >>>>>> Tomas >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> *From:* ironruby-core-bounces at rubyforge.org [mailto: >>>>>> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards >>>>>> *Sent:* Monday, February 01, 2010 6:31 PM >>>>>> *To:* ironruby-core at rubyforge.org >>>>>> *Subject:* Re: [Ironruby-core] A nicer syntax for generic extension >>>>>> methods >>>>>> >>>>>> >>>>>> >>>>>> IIRC you can open "concrete" generics, but not "open" ones: In plain >>>>>> english this means you can add methods to List but not List. >>>>>> >>>>>> >>>>>> >>>>>> This is essentially because List isn't a real type in the CLR, it's >>>>>> basically some metadata that can be used to build a real type when the T is >>>>>> supplied. >>>>>> >>>>>> >>>>>> >>>>>> You could as an alternative add methods to the underlying non-generic >>>>>> IEnumerable interface, but then you'd have to do some run-time reflection to >>>>>> figure out that your List is actually a List... This is probably not >>>>>> nice. >>>>>> >>>>>> >>>>>> >>>>>> In theory when CLR4 lands and has support for co/contra variant >>>>>> generics, List should match List and everything else, but I >>>>>> don't know if IronRuby would also work for this? >>>>>> >>>>>> >>>>>> >>>>>> Good luck >>>>>> >>>>>> On Tue, Feb 2, 2010 at 7:52 AM, Ryan Riley < >>>>>> ryan.riley at panesofglass.org> wrote: >>>>>> >>>>>> I have been trying to figure out how to Rubify generic extension >>>>>> methods for use with the likes of Rx, Open XML SDK, etc. Ivan went over it a >>>>>> bit with me this weekend, but I'm still having difficulty including a module >>>>>> within a .NET type. Is that even possible? >>>>>> >>>>>> >>>>>> >>>>>> ... >>>>>> >>>>>> >>>>>> >>>>>> The questions I'm not able to answer are: >>>>>> >>>>>> 1. Can I somehow open up a .NET class, say >>>>>> System::Collections::Generic::List[T] and include the EnumerableExtensions? >>>>>> So far, I'm finding that's a no. >>>>>> 2. How do I hook in the included(base) method above? I'm assuming >>>>>> that's a one-time call, but I don't see anywhere that it's called when a >>>>>> module is included. Do I need to use a before_filter or perform that action >>>>>> at the beginning of the linq_select method? >>>>>> >>>>>> >>>>>> >>>>>> Thanks! >>>>>> >>>>>> >>>>>> Ryan Riley >>>>>> >>>>>> Email: ryan.riley at panesofglass.org >>>>>> LinkedIn: http://www.linkedin.com/in/ryanriley >>>>>> Blog: http://wizardsofsmart.net/ >>>>>> Twitter: @panesofglass >>>>>> Website: http://panesofglass.org/ >>>>>> >>>>>> _______________________________________________ >>>>>> Ironruby-core mailing list >>>>>> Ironruby-core at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Ironruby-core mailing list >>>>>> Ironruby-core at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> Ironruby-core mailing list >>>>> Ironruby-core at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> 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 whiterabbitconsulting.eu Wed Feb 3 11:49:16 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Wed, 3 Feb 2010 17:49:16 +0100 Subject: [Ironruby-core] A nicer syntax for generic extension methods In-Reply-To: References: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: For lightspeed I wrote an internal dsl that allows you to query similarly to the regular api but no special module for linq stuff. I skipped linq altogether didn't need it there. so what I created there is (It's in the asp.net mvc chapter btw) find_all User do where a(:name).like("ivan%") & a(:age) > 23 order_by :name.desc end that may be wrong but it's close to something like that.. --- 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, Feb 3, 2010 at 4:01 PM, Ryan Riley wrote: > Thanks, Ivan. That's awesome ... that's just like F#. I should have > realized it would be that simple. I'll post this to the Delegates section of > the .NET interop page on the wiki, since it currently doesn't exist. > > Also, I noticed you alluded to something similar in IronRuby in Action > where you talk about LightSpeed, but I couldn't find anything in the MEAP > copy I have. If I am able to spin up a few LINQ samples (probably Rx, Pfx, > and/or XLinq), I'll shoot them your way, if you are interested. > > Cheers! > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > > On Tue, Feb 2, 2010 at 11:40 PM, Ivan Porto Carrero < > ivan at whiterabbitconsulting.eu> wrote: > >> just pass your block to the constructor of a delegate and you should be >> good to go >> >> Action.new { more_work_here } >> --- >> 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, Feb 2, 2010 at 11:38 PM, Ryan Riley wrote: >> >>> That's fantastic, Tomas, thanks! Is there any way to pass a block, >>> lambda, or Proc into the slot for the delegate, or perhaps a way to create a >>> .NET delegate (or Expression) from a block, lambda, or Proc? >>> >>> Thanks, >>> >>> Ryan Riley >>> >>> Email: ryan.riley at panesofglass.org >>> LinkedIn: http://www.linkedin.com/in/ryanriley >>> Blog: http://wizardsofsmart.net/ >>> Twitter: @panesofglass >>> Website: http://panesofglass.org/ >>> >>> >>> On Tue, Feb 2, 2010 at 1:36 AM, Tomas Matousek < >>> Tomas.Matousek at microsoft.com> wrote: >>> >>>> Actually, you can add Ruby methods to List ? IronRuby type system >>>> does some magic for you J: >>>> >>>> >>>> >>>> >>> include System::Collections::Generic >>>> >>>> => Object >>>> >>>> >>> List[Fixnum].included_modules >>>> >>>> => [System::Collections::Generic::List[T], >>>> System::Collections::Generic::IList[Fixnum], >>>> System::Collections::Generic::IList[T], >>>> System::Collections::Generic::ICollection[Fixnum], >>>> System::Collections::Generic::ICollection[T], >>>> System::Collections::Generic::IEnumerable[Fixnum], >>>> System::Collections::Generic::IEnumerable[T], >>>> System::Collections::IEnumerable, Enumerable, System::Collections::IList, >>>> System::Collections::ICollection, System::Collections::Generic, Kernel] >>>> >>>> >>>> >>>> As you can see the List<> generic type definition is treated as a module >>>> that is mixed in each of its instantiations. Although there are no >>>> predefined methods on it you can open it and add some. First we need to get >>>> Ruby class for List. If you index System.Collections.Generic.List by a >>>> fixnum instead of a class/module you?ll get the generic definition of arity >>>> 1. Let?s name it ListOfT: >>>> >>>> >>>> >>>> >>> ListOfT = List[1] >>>> >>>> >>>> >>>> And then we can open it up: >>>> >>>> >>>> >>>> >>> module ListOfT >>>> >>>> ... def size >>>> >>>> ... count >>>> >>>> ... end >>>> >>>> ... end >>>> >>>> => nil >>>> >>>> >>> l = List[Fixnum].new >>>> >>>> => [] >>>> >>>> >>> l.add(1) >>>> >>>> => nil >>>> >>>> >>> l.add(2) >>>> >>>> => nil >>>> >>>> >>> l.size >>>> >>>> => 2 >>>> >>>> >>>> >>>> Tomas >>>> >>>> >>>> >>>> >>>> >>>> *From:* ironruby-core-bounces at rubyforge.org [mailto: >>>> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards >>>> *Sent:* Monday, February 01, 2010 6:31 PM >>>> *To:* ironruby-core at rubyforge.org >>>> *Subject:* Re: [Ironruby-core] A nicer syntax for generic extension >>>> methods >>>> >>>> >>>> >>>> IIRC you can open "concrete" generics, but not "open" ones: In plain >>>> english this means you can add methods to List but not List. >>>> >>>> >>>> >>>> This is essentially because List isn't a real type in the CLR, it's >>>> basically some metadata that can be used to build a real type when the T is >>>> supplied. >>>> >>>> >>>> >>>> You could as an alternative add methods to the underlying non-generic >>>> IEnumerable interface, but then you'd have to do some run-time reflection to >>>> figure out that your List is actually a List... This is probably not >>>> nice. >>>> >>>> >>>> >>>> In theory when CLR4 lands and has support for co/contra variant >>>> generics, List should match List and everything else, but I >>>> don't know if IronRuby would also work for this? >>>> >>>> >>>> >>>> Good luck >>>> >>>> On Tue, Feb 2, 2010 at 7:52 AM, Ryan Riley >>>> wrote: >>>> >>>> I have been trying to figure out how to Rubify generic extension methods >>>> for use with the likes of Rx, Open XML SDK, etc. Ivan went over it a bit >>>> with me this weekend, but I'm still having difficulty including a module >>>> within a .NET type. Is that even possible? >>>> >>>> >>>> >>>> ... >>>> >>>> >>>> >>>> The questions I'm not able to answer are: >>>> >>>> 1. Can I somehow open up a .NET class, say >>>> System::Collections::Generic::List[T] and include the EnumerableExtensions? >>>> So far, I'm finding that's a no. >>>> 2. How do I hook in the included(base) method above? I'm assuming >>>> that's a one-time call, but I don't see anywhere that it's called when a >>>> module is included. Do I need to use a before_filter or perform that action >>>> at the beginning of the linq_select method? >>>> >>>> >>>> >>>> Thanks! >>>> >>>> >>>> Ryan Riley >>>> >>>> Email: ryan.riley at panesofglass.org >>>> LinkedIn: http://www.linkedin.com/in/ryanriley >>>> Blog: http://wizardsofsmart.net/ >>>> Twitter: @panesofglass >>>> Website: http://panesofglass.org/ >>>> >>>> _______________________________________________ >>>> Ironruby-core mailing list >>>> Ironruby-core at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>>> >>>> >>>> >>>> _______________________________________________ >>>> Ironruby-core mailing list >>>> Ironruby-core at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>>> >>>> >>> >>> _______________________________________________ >>> Ironruby-core mailing list >>> Ironruby-core at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/ironruby-core >>> >>> >> >> _______________________________________________ >> 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 Wed Feb 3 12:12:54 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 3 Feb 2010 17:12:54 +0000 Subject: [Ironruby-core] A nicer syntax for generic extension methods In-Reply-To: References: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C384B026D@TK5EX14MBXC122.redmond.corp.microsoft.com> The LINQ experience should get better as soon as we improve our interaction with the type inference engine in DLR overload resolver. IronRuby currently doesn?t use its full power like IronPython does, so you need to explicitly specify more generic arguments that should be necessary. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Wednesday, February 03, 2010 8:49 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] A nicer syntax for generic extension methods For lightspeed I wrote an internal dsl that allows you to query similarly to the regular api but no special module for linq stuff. I skipped linq altogether didn't need it there. so what I created there is (It's in the asp.net mvc chapter btw) find_all User do where a(:name).like("ivan%") & a(:age) > 23 order_by :name.desc end that may be wrong but it's close to something like that.. --- 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, Feb 3, 2010 at 4:01 PM, Ryan Riley > wrote: Thanks, Ivan. That's awesome ... that's just like F#. I should have realized it would be that simple. I'll post this to the Delegates section of the .NET interop page on the wiki, since it currently doesn't exist. Also, I noticed you alluded to something similar in IronRuby in Action where you talk about LightSpeed, but I couldn't find anything in the MEAP copy I have. If I am able to spin up a few LINQ samples (probably Rx, Pfx, and/or XLinq), I'll shoot them your way, if you are interested. Cheers! Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Tue, Feb 2, 2010 at 11:40 PM, Ivan Porto Carrero > wrote: just pass your block to the constructor of a delegate and you should be good to go Action.new { more_work_here } --- 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, Feb 2, 2010 at 11:38 PM, Ryan Riley > wrote: That's fantastic, Tomas, thanks! Is there any way to pass a block, lambda, or Proc into the slot for the delegate, or perhaps a way to create a .NET delegate (or Expression) from a block, lambda, or Proc? Thanks, Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Tue, Feb 2, 2010 at 1:36 AM, Tomas Matousek > wrote: Actually, you can add Ruby methods to List ? IronRuby type system does some magic for you ?: >>> include System::Collections::Generic => Object >>> List[Fixnum].included_modules => [System::Collections::Generic::List[T], System::Collections::Generic::IList[Fixnum], System::Collections::Generic::IList[T], System::Collections::Generic::ICollection[Fixnum], System::Collections::Generic::ICollection[T], System::Collections::Generic::IEnumerable[Fixnum], System::Collections::Generic::IEnumerable[T], System::Collections::IEnumerable, Enumerable, System::Collections::IList, System::Collections::ICollection, System::Collections::Generic, Kernel] As you can see the List<> generic type definition is treated as a module that is mixed in each of its instantiations. Although there are no predefined methods on it you can open it and add some. First we need to get Ruby class for List. If you index System.Collections.Generic.List by a fixnum instead of a class/module you?ll get the generic definition of arity 1. Let?s name it ListOfT: >>> ListOfT = List[1] And then we can open it up: >>> module ListOfT ... def size ... count ... end ... end => nil >>> l = List[Fixnum].new => [] >>> l.add(1) => nil >>> l.add(2) => nil >>> l.size => 2 Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Monday, February 01, 2010 6:31 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] A nicer syntax for generic extension methods IIRC you can open "concrete" generics, but not "open" ones: In plain english this means you can add methods to List but not List. This is essentially because List isn't a real type in the CLR, it's basically some metadata that can be used to build a real type when the T is supplied. You could as an alternative add methods to the underlying non-generic IEnumerable interface, but then you'd have to do some run-time reflection to figure out that your List is actually a List... This is probably not nice. In theory when CLR4 lands and has support for co/contra variant generics, List should match List and everything else, but I don't know if IronRuby would also work for this? Good luck On Tue, Feb 2, 2010 at 7:52 AM, Ryan Riley > wrote: I have been trying to figure out how to Rubify generic extension methods for use with the likes of Rx, Open XML SDK, etc. Ivan went over it a bit with me this weekend, but I'm still having difficulty including a module within a .NET type. Is that even possible? ... The questions I'm not able to answer are: 1. Can I somehow open up a .NET class, say System::Collections::Generic::List[T] and include the EnumerableExtensions? So far, I'm finding that's a no. 2. How do I hook in the included(base) method above? I'm assuming that's a one-time call, but I don't see anywhere that it's called when a module is included. Do I need to use a before_filter or perform that action at the beginning of the linq_select method? Thanks! Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ 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 ryan.riley at panesofglass.org Wed Feb 3 12:15:59 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Wed, 3 Feb 2010 11:15:59 -0600 Subject: [Ironruby-core] A nicer syntax for generic extension methods In-Reply-To: References: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: On Wed, Feb 3, 2010 at 10:49 AM, Ivan Porto Carrero < ivan at whiterabbitconsulting.eu> wrote: > For lightspeed I wrote an internal dsl that allows you to query similarly > to the regular api but no special module for linq stuff. I skipped linq > altogether didn't need it there. > > so what I created there is (It's in the asp.net mvc chapter btw) > > find_all User do > where a(:name).like("ivan%") & a(:age) > 23 > order_by :name.desc > end > > that may be wrong but it's close to something like that.. > I like that syntax. It reminds me of F#'s computation expressions. I was thinking something more along the lines of what arelis doing. Ryan -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at whiterabbitconsulting.eu Wed Feb 3 11:59:16 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Wed, 3 Feb 2010 17:59:16 +0100 Subject: [Ironruby-core] A nicer syntax for generic extension methods In-Reply-To: References: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: hashes? but may i ask why you're so hell-bent on linq? Linq is a really bad match to ruby with the expressions. it would require some significant amount of work to get that to work correctly. AFAIK there is no way in IronRuby to build expressions except use the raw API, but nothing is in there yet that makes this easier to do. Anyway you can reuse anonymous types did you know that? Alex James learnt the trick from Wes Dyer http://blogs.msdn.com/alexj/archive/2007/11/22/t-castbyexample-t-object-o-t-example.aspx --- 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, Feb 3, 2010 at 4:52 PM, Ryan Riley wrote: > I just thought of something else. How do you deal with anonymous types in > IronRuby? We don't have the type name when writing the code. Do we have to > create at least a Ruby type for everything returned from an > Enumerable.Select? I suppose that's where the module wrapper over LINQ would > perhaps come in handy? > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > > On Wed, Feb 3, 2010 at 9:31 AM, Ryan Riley wrote: > >> Okay, just posted a rough first stab at the topic. This is all generic >> delegates, too; I haven't bothered with plain old generics. :) Please let me >> know if you have any feedback. I will add the stuff Tomas noted above when I >> get a chance a little later. >> >> http://ironruby.net/Documentation/.NET/Delegates >> >> Ryan Riley >> >> Email: ryan.riley at panesofglass.org >> LinkedIn: http://www.linkedin.com/in/ryanriley >> Blog: http://wizardsofsmart.net/ >> Twitter: @panesofglass >> Website: http://panesofglass.org/ >> >> >> On Wed, Feb 3, 2010 at 9:01 AM, Ryan Riley wrote: >> >>> Thanks, Ivan. That's awesome ... that's just like F#. I should have >>> realized it would be that simple. I'll post this to the Delegates section of >>> the .NET interop page on the wiki, since it currently doesn't exist. >>> >>> Also, I noticed you alluded to something similar in IronRuby in Action >>> where you talk about LightSpeed, but I couldn't find anything in the MEAP >>> copy I have. If I am able to spin up a few LINQ samples (probably Rx, Pfx, >>> and/or XLinq), I'll shoot them your way, if you are interested. >>> >>> Cheers! >>> >>> Ryan Riley >>> >>> Email: ryan.riley at panesofglass.org >>> LinkedIn: http://www.linkedin.com/in/ryanriley >>> Blog: http://wizardsofsmart.net/ >>> Twitter: @panesofglass >>> Website: http://panesofglass.org/ >>> >>> >>> On Tue, Feb 2, 2010 at 11:40 PM, Ivan Porto Carrero < >>> ivan at whiterabbitconsulting.eu> wrote: >>> >>>> just pass your block to the constructor of a delegate and you should be >>>> good to go >>>> >>>> Action.new { more_work_here } >>>> --- >>>> 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, Feb 2, 2010 at 11:38 PM, Ryan Riley < >>>> ryan.riley at panesofglass.org> wrote: >>>> >>>>> That's fantastic, Tomas, thanks! Is there any way to pass a block, >>>>> lambda, or Proc into the slot for the delegate, or perhaps a way to create a >>>>> .NET delegate (or Expression) from a block, lambda, or Proc? >>>>> >>>>> Thanks, >>>>> >>>>> Ryan Riley >>>>> >>>>> Email: ryan.riley at panesofglass.org >>>>> LinkedIn: http://www.linkedin.com/in/ryanriley >>>>> Blog: http://wizardsofsmart.net/ >>>>> Twitter: @panesofglass >>>>> Website: http://panesofglass.org/ >>>>> >>>>> >>>>> On Tue, Feb 2, 2010 at 1:36 AM, Tomas Matousek < >>>>> Tomas.Matousek at microsoft.com> wrote: >>>>> >>>>>> Actually, you can add Ruby methods to List ? IronRuby type system >>>>>> does some magic for you J: >>>>>> >>>>>> >>>>>> >>>>>> >>> include System::Collections::Generic >>>>>> >>>>>> => Object >>>>>> >>>>>> >>> List[Fixnum].included_modules >>>>>> >>>>>> => [System::Collections::Generic::List[T], >>>>>> System::Collections::Generic::IList[Fixnum], >>>>>> System::Collections::Generic::IList[T], >>>>>> System::Collections::Generic::ICollection[Fixnum], >>>>>> System::Collections::Generic::ICollection[T], >>>>>> System::Collections::Generic::IEnumerable[Fixnum], >>>>>> System::Collections::Generic::IEnumerable[T], >>>>>> System::Collections::IEnumerable, Enumerable, System::Collections::IList, >>>>>> System::Collections::ICollection, System::Collections::Generic, Kernel] >>>>>> >>>>>> >>>>>> >>>>>> As you can see the List<> generic type definition is treated as a >>>>>> module that is mixed in each of its instantiations. Although there are no >>>>>> predefined methods on it you can open it and add some. First we need to get >>>>>> Ruby class for List. If you index System.Collections.Generic.List by a >>>>>> fixnum instead of a class/module you?ll get the generic definition of arity >>>>>> 1. Let?s name it ListOfT: >>>>>> >>>>>> >>>>>> >>>>>> >>> ListOfT = List[1] >>>>>> >>>>>> >>>>>> >>>>>> And then we can open it up: >>>>>> >>>>>> >>>>>> >>>>>> >>> module ListOfT >>>>>> >>>>>> ... def size >>>>>> >>>>>> ... count >>>>>> >>>>>> ... end >>>>>> >>>>>> ... end >>>>>> >>>>>> => nil >>>>>> >>>>>> >>> l = List[Fixnum].new >>>>>> >>>>>> => [] >>>>>> >>>>>> >>> l.add(1) >>>>>> >>>>>> => nil >>>>>> >>>>>> >>> l.add(2) >>>>>> >>>>>> => nil >>>>>> >>>>>> >>> l.size >>>>>> >>>>>> => 2 >>>>>> >>>>>> >>>>>> >>>>>> Tomas >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> *From:* ironruby-core-bounces at rubyforge.org [mailto: >>>>>> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards >>>>>> *Sent:* Monday, February 01, 2010 6:31 PM >>>>>> *To:* ironruby-core at rubyforge.org >>>>>> *Subject:* Re: [Ironruby-core] A nicer syntax for generic extension >>>>>> methods >>>>>> >>>>>> >>>>>> >>>>>> IIRC you can open "concrete" generics, but not "open" ones: In plain >>>>>> english this means you can add methods to List but not List. >>>>>> >>>>>> >>>>>> >>>>>> This is essentially because List isn't a real type in the CLR, it's >>>>>> basically some metadata that can be used to build a real type when the T is >>>>>> supplied. >>>>>> >>>>>> >>>>>> >>>>>> You could as an alternative add methods to the underlying non-generic >>>>>> IEnumerable interface, but then you'd have to do some run-time reflection to >>>>>> figure out that your List is actually a List... This is probably not >>>>>> nice. >>>>>> >>>>>> >>>>>> >>>>>> In theory when CLR4 lands and has support for co/contra variant >>>>>> generics, List should match List and everything else, but I >>>>>> don't know if IronRuby would also work for this? >>>>>> >>>>>> >>>>>> >>>>>> Good luck >>>>>> >>>>>> On Tue, Feb 2, 2010 at 7:52 AM, Ryan Riley < >>>>>> ryan.riley at panesofglass.org> wrote: >>>>>> >>>>>> I have been trying to figure out how to Rubify generic extension >>>>>> methods for use with the likes of Rx, Open XML SDK, etc. Ivan went over it a >>>>>> bit with me this weekend, but I'm still having difficulty including a module >>>>>> within a .NET type. Is that even possible? >>>>>> >>>>>> >>>>>> >>>>>> ... >>>>>> >>>>>> >>>>>> >>>>>> The questions I'm not able to answer are: >>>>>> >>>>>> 1. Can I somehow open up a .NET class, say >>>>>> System::Collections::Generic::List[T] and include the EnumerableExtensions? >>>>>> So far, I'm finding that's a no. >>>>>> 2. How do I hook in the included(base) method above? I'm assuming >>>>>> that's a one-time call, but I don't see anywhere that it's called when a >>>>>> module is included. Do I need to use a before_filter or perform that action >>>>>> at the beginning of the linq_select method? >>>>>> >>>>>> >>>>>> >>>>>> Thanks! >>>>>> >>>>>> >>>>>> Ryan Riley >>>>>> >>>>>> Email: ryan.riley at panesofglass.org >>>>>> LinkedIn: http://www.linkedin.com/in/ryanriley >>>>>> Blog: http://wizardsofsmart.net/ >>>>>> Twitter: @panesofglass >>>>>> Website: http://panesofglass.org/ >>>>>> >>>>>> _______________________________________________ >>>>>> Ironruby-core mailing list >>>>>> Ironruby-core at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Ironruby-core mailing list >>>>>> Ironruby-core at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> Ironruby-core mailing list >>>>> Ironruby-core at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/ironruby-core >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> 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 ryan.riley at panesofglass.org Wed Feb 3 12:36:40 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Wed, 3 Feb 2010 11:36:40 -0600 Subject: [Ironruby-core] A nicer syntax for generic extension methods In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C384B026D@TK5EX14MBXC122.redmond.corp.microsoft.com> References: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> <4B342496A3EFEB48839E10BB4BF5964C384B026D@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: Will that be 1.0 or after? Ryan Riley On Wed, Feb 3, 2010 at 11:12 AM, Tomas Matousek < Tomas.Matousek at microsoft.com> wrote: > The LINQ experience should get better as soon as we improve our interaction > with the type inference engine in DLR overload resolver. IronRuby currently > doesn?t use its full power like IronPython does, so you need to explicitly > specify more generic arguments that should be necessary. > > > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Wednesday, February 03, 2010 8:49 AM > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] A nicer syntax for generic extension > methods > > > > For lightspeed I wrote an internal dsl that allows you to query similarly > to the regular api but no special module for linq stuff. I skipped linq > altogether didn't need it there. > > > > so what I created there is (It's in the asp.net mvc chapter btw) > > > > find_all User do > > where a(:name).like("ivan%") & a(:age) > 23 > > order_by :name.desc > > end > > > > that may be wrong but it's close to something like that.. > > --- > 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, Feb 3, 2010 at 4:01 PM, Ryan Riley > wrote: > > Thanks, Ivan. That's awesome ... that's just like F#. I should have > realized it would be that simple. I'll post this to the Delegates section of > the .NET interop page on the wiki, since it currently doesn't exist. > > > > Also, I noticed you alluded to something similar in IronRuby in Action > where you talk about LightSpeed, but I couldn't find anything in the MEAP > copy I have. If I am able to spin up a few LINQ samples (probably Rx, Pfx, > and/or XLinq), I'll shoot them your way, if you are interested. > > > > Cheers! > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > On Tue, Feb 2, 2010 at 11:40 PM, Ivan Porto Carrero < > ivan at whiterabbitconsulting.eu> wrote: > > just pass your block to the constructor of a delegate and you should be > good to go > > > > Action.new { more_work_here } > --- > 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, Feb 2, 2010 at 11:38 PM, Ryan Riley > wrote: > > That's fantastic, Tomas, thanks! Is there any way to pass a block, lambda, > or Proc into the slot for the delegate, or perhaps a way to create a .NET > delegate (or Expression) from a block, lambda, or Proc? > > > > Thanks, > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > On Tue, Feb 2, 2010 at 1:36 AM, Tomas Matousek < > Tomas.Matousek at microsoft.com> wrote: > > Actually, you can add Ruby methods to List ? IronRuby type system does > some magic for you J: > > > > >>> include System::Collections::Generic > > => Object > > >>> List[Fixnum].included_modules > > => [System::Collections::Generic::List[T], > System::Collections::Generic::IList[Fixnum], > System::Collections::Generic::IList[T], > System::Collections::Generic::ICollection[Fixnum], > System::Collections::Generic::ICollection[T], > System::Collections::Generic::IEnumerable[Fixnum], > System::Collections::Generic::IEnumerable[T], > System::Collections::IEnumerable, Enumerable, System::Collections::IList, > System::Collections::ICollection, System::Collections::Generic, Kernel] > > > > As you can see the List<> generic type definition is treated as a module > that is mixed in each of its instantiations. Although there are no > predefined methods on it you can open it and add some. First we need to get > Ruby class for List. If you index System.Collections.Generic.List by a > fixnum instead of a class/module you?ll get the generic definition of arity > 1. Let?s name it ListOfT: > > > > >>> ListOfT = List[1] > > > > And then we can open it up: > > > > >>> module ListOfT > > ... def size > > ... count > > ... end > > ... end > > => nil > > >>> l = List[Fixnum].new > > => [] > > >>> l.add(1) > > => nil > > >>> l.add(2) > > => nil > > >>> l.size > > => 2 > > > > Tomas > > > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards > *Sent:* Monday, February 01, 2010 6:31 PM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] A nicer syntax for generic extension > methods > > > > IIRC you can open "concrete" generics, but not "open" ones: In plain > english this means you can add methods to List but not List. > > > > This is essentially because List isn't a real type in the CLR, it's > basically some metadata that can be used to build a real type when the T is > supplied. > > > > You could as an alternative add methods to the underlying non-generic > IEnumerable interface, but then you'd have to do some run-time reflection to > figure out that your List is actually a List... This is probably not > nice. > > > > In theory when CLR4 lands and has support for co/contra variant generics, > List should match List and everything else, but I don't know > if IronRuby would also work for this? > > > > Good luck > > On Tue, Feb 2, 2010 at 7:52 AM, Ryan Riley > wrote: > > I have been trying to figure out how to Rubify generic extension methods > for use with the likes of Rx, Open XML SDK, etc. Ivan went over it a bit > with me this weekend, but I'm still having difficulty including a module > within a .NET type. Is that even possible? > > > > ... > > > > The questions I'm not able to answer are: > > 1. Can I somehow open up a .NET class, say > System::Collections::Generic::List[T] and include the EnumerableExtensions? > So far, I'm finding that's a no. > 2. How do I hook in the included(base) method above? I'm assuming > that's a one-time call, but I don't see anywhere that it's called when a > module is included. Do I need to use a before_filter or perform that action > at the beginning of the linq_select method? > > > > Thanks! > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > _______________________________________________ > 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 ryan.riley at panesofglass.org Wed Feb 3 13:05:46 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Wed, 3 Feb 2010 12:05:46 -0600 Subject: [Ironruby-core] A nicer syntax for generic extension methods In-Reply-To: References: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: On Wed, Feb 3, 2010 at 10:59 AM, Ivan Porto Carrero < ivan at whiterabbitconsulting.eu> wrote: > hashes? Just an example, though perhaps not the best. :) but may i ask why you're so hell-bent on linq? > I mostly want some way to use the Reactive Extensions for asynchronous programming and OpenXML SDK for working with Office docs. In particular, I'm thinking of working with IR on top of other C# and/or F# libraries which might be using one or both of those libraries. If I were to write it in all Ruby, I'd probably look at eventmachine for an event loop processor. I'm definitely open to other solutions. > Linq is a really bad match to ruby with the expressions. it would require > some significant amount of work to get that to work correctly. AFAIK there > is no way in IronRuby to build expressions except use the raw API, but > nothing is in there yet that makes this easier to do. > L2S uses expressions, but I don't think everything uses them. If all that's required is a delegate, that's not so hard and can be be accomplished with a wrapping Ruby method that accepts a block and wraps the block into a Func to pass into the LINQ method. Given some of the previous posts, I think creating a general module to wrap these methods shouldn't be too difficult. Thoughts? Anyway you can reuse anonymous types did you know that? Alex James learnt > the trick from Wes Dyer > > http://blogs.msdn.com/alexj/archive/2007/11/22/t-castbyexample-t-object-o-t-example.aspx > Yeah, I knew about that, but I don't really want to touch casting by example in Ruby. It might not be bad, but why bother when I can use something from Ruby? Ryan -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at miguelmadero.com Wed Feb 3 15:38:55 2010 From: me at miguelmadero.com (Miguel Madero) Date: Thu, 4 Feb 2010 07:38:55 +1100 Subject: [Ironruby-core] A nicer syntax for generic extension methods In-Reply-To: References: <7c1b59c01002011831x3734b499xda6909ee46a920c3@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C384AF9F0@TK5EX14MBXC122.redmond.corp.microsoft.com> Message-ID: <581455be1002031238h1f903e0bp4c8e82a8cd5ef1f8@mail.gmail.com> This might help, there's a library in the VS directory samples/CSharpSamples.zip/LinqSamples/DynamicQuery take a look, under the covers it's creating expressions LINQ Expressions. In C# you will just chain methods like: myCollection.Where("property=myValue").OrderBy("anotherProp desc"); I think this library could be extended to "easily" create any type of expression in IR. This could be useful to consume existing libraries that already expect an expression. On Thu, Feb 4, 2010 at 5:05 AM, Ryan Riley wrote: > On Wed, Feb 3, 2010 at 10:59 AM, Ivan Porto Carrero < > ivan at whiterabbitconsulting.eu> wrote: > >> hashes? > > > Just an example, though perhaps not the best. :) > > but may i ask why you're so hell-bent on linq? >> > > I mostly want some way to use the Reactive Extensions for asynchronous > programming and OpenXML SDK for working with Office docs. In particular, I'm > thinking of working with IR on top of other C# and/or F# libraries which > might be using one or both of those libraries. If I were to write it in all > Ruby, I'd probably look at eventmachine for an event loop processor. > > I'm definitely open to other solutions. > > >> Linq is a really bad match to ruby with the expressions. it would require >> some significant amount of work to get that to work correctly. AFAIK there >> is no way in IronRuby to build expressions except use the raw API, but >> nothing is in there yet that makes this easier to do. >> > > L2S uses expressions, but I don't think everything uses them. If all that's > required is a delegate, that's not so hard and can be be accomplished with a > wrapping Ruby method that accepts a block and wraps the block into a Func to > pass into the LINQ method. Given some of the previous posts, I think > creating a general module to wrap these methods shouldn't be too difficult. > Thoughts? > > Anyway you can reuse anonymous types did you know that? Alex James learnt >> the trick from Wes Dyer >> >> http://blogs.msdn.com/alexj/archive/2007/11/22/t-castbyexample-t-object-o-t-example.aspx >> > > Yeah, I knew about that, but I don't really want to touch casting by > example in Ruby. It might not be bad, but why bother when I can use > something from Ruby? > > Ryan > > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > -- Miguel A. Madero Reyes www.miguelmadero.com (blog) me at miguelmadero.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at whiterabbitconsulting.eu Thu Feb 4 10:21:39 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Thu, 4 Feb 2010 16:21:39 +0100 Subject: [Ironruby-core] reopen workitem 3688 and/or 3718 Message-ID: It might be the wrong one of the 2 but the end result is the same. I'm unable to build ironruby on mono I tried with rake and with xbuild on mono 2.6.1 (current release) and mono trunk. I've tried mono trunk on a linux box and the other one on both linux and OSX http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3688 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3718 http://monobin.com/__m367a524b build with xbuild: MONO_IOMAP=case xbuild /verbosity:diagnostic Ruby.sln /p:TreatWarningsAsErrors=false --- 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 whiterabbitconsulting.eu Thu Feb 4 10:44:28 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Thu, 4 Feb 2010 16:44:28 +0100 Subject: [Ironruby-core] reopen workitem 3688 and/or 3718 In-Reply-To: References: Message-ID: https://bugzilla.novell.com/show_bug.cgi?id=577029 --- 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, Feb 4, 2010 at 4:21 PM, Ivan Porto Carrero < ivan at whiterabbitconsulting.eu> wrote: > It might be the wrong one of the 2 but the end result is the same. I'm > unable to build ironruby on mono > > I tried with rake and with xbuild on mono 2.6.1 (current release) and mono > trunk. > I've tried mono trunk on a linux box and the other one on both linux and > OSX > > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3688 > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3718 > http://monobin.com/__m367a524b > > build with xbuild: > MONO_IOMAP=case xbuild /verbosity:diagnostic Ruby.sln > /p:TreatWarningsAsErrors=false > --- > 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 orion.edwards at gmail.com Thu Feb 4 14:38:29 2010 From: orion.edwards at gmail.com (Orion Edwards) Date: Fri, 5 Feb 2010 08:38:29 +1300 Subject: [Ironruby-core] Hanselminutes Message-ID: <7c1b59c01002041138k1b1f91e3q13bc0df4d0b9ded7@mail.gmail.com> Just listened to jimmy on hanselminutes (yeah I know it was a week or 2 ago, I'm catching up on podcasts) talking about IronRuby. Congrats on a job well done. Hopefully that will get some more people interested in IR :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tim at Hoolihan.net Thu Feb 4 15:10:29 2010 From: Tim at Hoolihan.net (Tim Hoolihan) Date: Thu, 4 Feb 2010 15:10:29 -0500 Subject: [Ironruby-core] autospec In-Reply-To: <7c1b59c01002041138k1b1f91e3q13bc0df4d0b9ded7@mail.gmail.com> References: <7c1b59c01002041138k1b1f91e3q13bc0df4d0b9ded7@mail.gmail.com> Message-ID: autospec (part of ZenTest gem) does not work for me with Ironruby. Is this a known issue? I am using a relatively simple example that works fine on ubuntu with traditional ruby. I'm using 1.0RC1 (version number on the assembly is out of date). D:\workspace\ruby\rspec_tutorial>dir lib\* spec\* Volume in drive D is FILES Volume Serial Number is AC2C-C255 Directory of D:\workspace\ruby\rspec_tutorial\lib 02/03/2010 01:13 PM . 02/03/2010 01:13 PM .. 02/03/2010 11:22 AM 109 user.rb 1 File(s) 109 bytes Directory of D:\workspace\ruby\rspec_tutorial\spec 02/03/2010 01:14 PM . 02/03/2010 01:14 PM .. 02/03/2010 01:22 PM 354 user_spec.rb 1 File(s) 354 bytes 2 Dir(s) 125,102,854,144 bytes free D:\workspace\ruby\rspec_tutorial>ir -v IronRuby 0.9.3.0 on .NET 2.0.0.0 D:\workspace\ruby\rspec_tutorial>autospec D:\workspace\ruby\rspec_tutorial>spec --autospec spec .. Finished in 0.2330133 seconds 2 examples, 0 failures D:\workspace\ruby\rspec_tutorial> -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at whiterabbitconsulting.eu Thu Feb 4 15:38:47 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Thu, 4 Feb 2010 21:38:47 +0100 Subject: [Ironruby-core] autospec In-Reply-To: References: <7c1b59c01002041138k1b1f91e3q13bc0df4d0b9ded7@mail.gmail.com> Message-ID: you'll have to do this for the ironruby version. http://flanders.co.nz/2009/10/26/creating-launcher-scripts-for-ironruby/ when RC2 is there it becomes ir -S autospec --- 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, Feb 4, 2010 at 9:10 PM, Tim Hoolihan wrote: > autospec (part of ZenTest gem) does not work for me with Ironruby. Is > this a known issue? I am using a relatively simple example that works fine > on ubuntu with traditional ruby. I'm using 1.0RC1 (version number on the > assembly is out of date). > > D:\workspace\ruby\rspec_tutorial>dir lib\* spec\* > Volume in drive D is FILES > Volume Serial Number is AC2C-C255 > > Directory of D:\workspace\ruby\rspec_tutorial\lib > > 02/03/2010 01:13 PM . > 02/03/2010 01:13 PM .. > 02/03/2010 11:22 AM 109 user.rb > 1 File(s) 109 bytes > > Directory of D:\workspace\ruby\rspec_tutorial\spec > > 02/03/2010 01:14 PM . > 02/03/2010 01:14 PM .. > 02/03/2010 01:22 PM 354 user_spec.rb > 1 File(s) 354 bytes > 2 Dir(s) 125,102,854,144 bytes free > > D:\workspace\ruby\rspec_tutorial>ir -v > IronRuby 0.9.3.0 on .NET 2.0.0.0 > > D:\workspace\ruby\rspec_tutorial>autospec > > D:\workspace\ruby\rspec_tutorial>spec --autospec spec > .. > > Finished in 0.2330133 seconds > > 2 examples, 0 failures > > D:\workspace\ruby\rspec_tutorial> > > _______________________________________________ > 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 Tim at Hoolihan.net Thu Feb 4 15:58:44 2010 From: Tim at Hoolihan.net (Tim Hoolihan) Date: Thu, 4 Feb 2010 15:58:44 -0500 Subject: [Ironruby-core] autospec In-Reply-To: References: <7c1b59c01002041138k1b1f91e3q13bc0df4d0b9ded7@mail.gmail.com> Message-ID: Thanks for the response. I have C:\ironruby\lib\ironruby\gems\1.8\bin\ in my path and can run spec commands fine. However, I followed the post anyway, and created iautospec, iautospec.bat, ispec, and ispec.bat in C:\ironruby\bin ispec runs fine as does spec, but autospec just returns to the command line. D:\workspace\ruby\rspec_tutorial>ispec spec --format specdoc User - should be an any assigned roles - should NOT be in any unassigned roles Finished in 0.2180125 seconds 2 examples, 0 failures D:\workspace\ruby\rspec_tutorial>iautospec D:\workspace\ruby\rspec_tutorial>iautospec spec D:\workspace\ruby\rspec_tutorial> From: Ivan Porto Carrero Sent: Thursday, February 04, 2010 3:38 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] autospec you'll have to do this for the ironruby version. http://flanders.co.nz/2009/10/26/creating-launcher-scripts-for-ironruby/ when RC2 is there it becomes ir -S autospec --- 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, Feb 4, 2010 at 9:10 PM, Tim Hoolihan wrote: autospec (part of ZenTest gem) does not work for me with Ironruby. Is this a known issue? I am using a relatively simple example that works fine on ubuntu with traditional ruby. I'm using 1.0RC1 (version number on the assembly is out of date). D:\workspace\ruby\rspec_tutorial>dir lib\* spec\* Volume in drive D is FILES Volume Serial Number is AC2C-C255 Directory of D:\workspace\ruby\rspec_tutorial\lib 02/03/2010 01:13 PM . 02/03/2010 01:13 PM .. 02/03/2010 11:22 AM 109 user.rb 1 File(s) 109 bytes Directory of D:\workspace\ruby\rspec_tutorial\spec 02/03/2010 01:14 PM . 02/03/2010 01:14 PM .. 02/03/2010 01:22 PM 354 user_spec.rb 1 File(s) 354 bytes 2 Dir(s) 125,102,854,144 bytes free D:\workspace\ruby\rspec_tutorial>ir -v IronRuby 0.9.3.0 on .NET 2.0.0.0 D:\workspace\ruby\rspec_tutorial>autospec D:\workspace\ruby\rspec_tutorial>spec --autospec spec .. Finished in 0.2330133 seconds 2 examples, 0 failures D:\workspace\ruby\rspec_tutorial> _______________________________________________ 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 Thu Feb 4 17:26:06 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 4 Feb 2010 22:26:06 +0000 Subject: [Ironruby-core] autospec In-Reply-To: References: <7c1b59c01002041138k1b1f91e3q13bc0df4d0b9ded7@mail.gmail.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3C9733D7@TK5EX14MBXC124.redmond.corp.microsoft.com> Does autospec use END block? If so, you need the latest IronRuby build (from source code) where this feature is implemented. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tim Hoolihan Sent: Thursday, February 04, 2010 12:59 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] autospec Thanks for the response. I have C:\ironruby\lib\ironruby\gems\1.8\bin\ in my path and can run spec commands fine. However, I followed the post anyway, and created iautospec, iautospec.bat, ispec, and ispec.bat in C:\ironruby\bin ispec runs fine as does spec, but autospec just returns to the command line. D:\workspace\ruby\rspec_tutorial>ispec spec --format specdoc User - should be an any assigned roles - should NOT be in any unassigned roles Finished in 0.2180125 seconds 2 examples, 0 failures D:\workspace\ruby\rspec_tutorial>iautospec D:\workspace\ruby\rspec_tutorial>iautospec spec D:\workspace\ruby\rspec_tutorial> From: Ivan Porto Carrero Sent: Thursday, February 04, 2010 3:38 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] autospec you'll have to do this for the ironruby version. http://flanders.co.nz/2009/10/26/creating-launcher-scripts-for-ironruby/ when RC2 is there it becomes ir -S autospec --- 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, Feb 4, 2010 at 9:10 PM, Tim Hoolihan > wrote: autospec (part of ZenTest gem) does not work for me with Ironruby. Is this a known issue? I am using a relatively simple example that works fine on ubuntu with traditional ruby. I'm using 1.0RC1 (version number on the assembly is out of date). D:\workspace\ruby\rspec_tutorial>dir lib\* spec\* Volume in drive D is FILES Volume Serial Number is AC2C-C255 Directory of D:\workspace\ruby\rspec_tutorial\lib 02/03/2010 01:13 PM . 02/03/2010 01:13 PM .. 02/03/2010 11:22 AM 109 user.rb 1 File(s) 109 bytes Directory of D:\workspace\ruby\rspec_tutorial\spec 02/03/2010 01:14 PM . 02/03/2010 01:14 PM .. 02/03/2010 01:22 PM 354 user_spec.rb 1 File(s) 354 bytes 2 Dir(s) 125,102,854,144 bytes free D:\workspace\ruby\rspec_tutorial>ir -v IronRuby 0.9.3.0 on .NET 2.0.0.0 D:\workspace\ruby\rspec_tutorial>autospec D:\workspace\ruby\rspec_tutorial>spec --autospec spec .. Finished in 0.2330133 seconds 2 examples, 0 failures D:\workspace\ruby\rspec_tutorial> _______________________________________________ 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 Shri.Borde at microsoft.com Thu Feb 4 17:46:22 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Thu, 4 Feb 2010 22:46:22 +0000 Subject: [Ironruby-core] autospec In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C3C9733D7@TK5EX14MBXC124.redmond.corp.microsoft.com> References: <7c1b59c01002041138k1b1f91e3q13bc0df4d0b9ded7@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C3C9733D7@TK5EX14MBXC124.redmond.corp.microsoft.com> Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C8DAEAB@TK5EX14MBXC140.redmond.corp.microsoft.com> The current sources also has a fix for open(?| cmd?) which was discussed in the attached thread. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Thursday, February 04, 2010 2:26 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] autospec Does autospec use END block? If so, you need the latest IronRuby build (from source code) where this feature is implemented. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tim Hoolihan Sent: Thursday, February 04, 2010 12:59 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] autospec Thanks for the response. I have C:\ironruby\lib\ironruby\gems\1.8\bin\ in my path and can run spec commands fine. However, I followed the post anyway, and created iautospec, iautospec.bat, ispec, and ispec.bat in C:\ironruby\bin ispec runs fine as does spec, but autospec just returns to the command line. D:\workspace\ruby\rspec_tutorial>ispec spec --format specdoc User - should be an any assigned roles - should NOT be in any unassigned roles Finished in 0.2180125 seconds 2 examples, 0 failures D:\workspace\ruby\rspec_tutorial>iautospec D:\workspace\ruby\rspec_tutorial>iautospec spec D:\workspace\ruby\rspec_tutorial> From: Ivan Porto Carrero Sent: Thursday, February 04, 2010 3:38 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] autospec you'll have to do this for the ironruby version. http://flanders.co.nz/2009/10/26/creating-launcher-scripts-for-ironruby/ when RC2 is there it becomes ir -S autospec --- 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, Feb 4, 2010 at 9:10 PM, Tim Hoolihan > wrote: autospec (part of ZenTest gem) does not work for me with Ironruby. Is this a known issue? I am using a relatively simple example that works fine on ubuntu with traditional ruby. I'm using 1.0RC1 (version number on the assembly is out of date). D:\workspace\ruby\rspec_tutorial>dir lib\* spec\* Volume in drive D is FILES Volume Serial Number is AC2C-C255 Directory of D:\workspace\ruby\rspec_tutorial\lib 02/03/2010 01:13 PM . 02/03/2010 01:13 PM .. 02/03/2010 11:22 AM 109 user.rb 1 File(s) 109 bytes Directory of D:\workspace\ruby\rspec_tutorial\spec 02/03/2010 01:14 PM . 02/03/2010 01:14 PM .. 02/03/2010 01:22 PM 354 user_spec.rb 1 File(s) 354 bytes 2 Dir(s) 125,102,854,144 bytes free D:\workspace\ruby\rspec_tutorial>ir -v IronRuby 0.9.3.0 on .NET 2.0.0.0 D:\workspace\ruby\rspec_tutorial>autospec D:\workspace\ruby\rspec_tutorial>spec --autospec spec .. Finished in 0.2330133 seconds 2 examples, 0 failures D:\workspace\ruby\rspec_tutorial> _______________________________________________ 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: -------------- next part -------------- An embedded message was scrubbed... From: Shri Borde Subject: Re: [Ironruby-core] AutoSpec exits after executing Date: Wed, 20 Jan 2010 21:50:25 +0000 Size: 6760 URL: From ben2004uk at googlemail.com Thu Feb 4 17:54:41 2010 From: ben2004uk at googlemail.com (Ben Hall) Date: Thu, 4 Feb 2010 22:54:41 +0000 Subject: [Ironruby-core] autospec In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C3C9733D7@TK5EX14MBXC124.redmond.corp.microsoft.com> References: <7c1b59c01002041138k1b1f91e3q13bc0df4d0b9ded7@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C3C9733D7@TK5EX14MBXC124.redmond.corp.microsoft.com> Message-ID: hmm, I hacked my code base - http://github.com/BenHall/ironruby Basically, autospec launches a sub-process in Kernal.cs - IronRuby doesn't\didn't support this. Pretty sure this was the reason. If not, let me know as I have it working on my local instance. Ben On Thu, Feb 4, 2010 at 10:26 PM, Tomas Matousek wrote: > Does autospec use END block? If so, you need the latest IronRuby build (from > source code) where this feature is implemented. > > > > Tomas > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tim Hoolihan > Sent: Thursday, February 04, 2010 12:59 PM > > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] autospec > > > > Thanks for the response. > > > > I have C:\ironruby\lib\ironruby\gems\1.8\bin\ in my path and can run spec > commands fine. > > > > However, I followed the post anyway, and created iautospec, iautospec.bat, > ispec, and ispec.bat in C:\ironruby\bin > > > > ispec runs fine as does spec, but autospec just returns to the command line. > > > > D:\workspace\ruby\rspec_tutorial>ispec spec --format specdoc > > > > User > - should be an any assigned roles > - should NOT be in any unassigned roles > > > > Finished in 0.2180125 seconds > > > > 2 examples, 0 failures > > > > D:\workspace\ruby\rspec_tutorial>iautospec > > > > D:\workspace\ruby\rspec_tutorial>iautospec spec > > > > D:\workspace\ruby\rspec_tutorial> > > > > > > From: Ivan Porto Carrero > > Sent: Thursday, February 04, 2010 3:38 PM > > To: ironruby-core at rubyforge.org > > Subject: Re: [Ironruby-core] autospec > > > > you'll have to do this for the ironruby version. > > > > http://flanders.co.nz/2009/10/26/creating-launcher-scripts-for-ironruby/ > > > > when RC2 is there it becomes > > > > ir -S autospec > > --- > 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, Feb 4, 2010 at 9:10 PM, Tim Hoolihan wrote: > > autospec (part of ZenTest gem) does not work for me with Ironruby.? Is this > a known issue?? I am using a relatively simple example that works fine on > ubuntu with traditional ruby.?? I'm using 1.0RC1 (version number?on the > assembly is out of date). > > > > D:\workspace\ruby\rspec_tutorial>dir lib\* spec\* > ?Volume in drive D is FILES > ?Volume Serial Number is AC2C-C255 > > > > ?Directory of D:\workspace\ruby\rspec_tutorial\lib > > > > 02/03/2010? 01:13 PM??? ????????? . > 02/03/2010? 01:13 PM??? ????????? .. > 02/03/2010? 11:22 AM?????????????? 109 user.rb > ?????????????? 1 File(s)??????????? 109 bytes > > > > ?Directory of D:\workspace\ruby\rspec_tutorial\spec > > > > 02/03/2010? 01:14 PM??? ????????? . > 02/03/2010? 01:14 PM??? ????????? .. > 02/03/2010? 01:22 PM?????????????? 354 user_spec.rb > ?????????????? 1 File(s)??????????? 354 bytes > ?????????????? 2 Dir(s)? 125,102,854,144 bytes free > > > > D:\workspace\ruby\rspec_tutorial>ir -v > IronRuby 0.9.3.0 on .NET 2.0.0.0 > > > > D:\workspace\ruby\rspec_tutorial>autospec > > > > D:\workspace\ruby\rspec_tutorial>spec --autospec spec > .. > > > > Finished in 0.2330133 seconds > > > > 2 examples, 0 failures > > > > D:\workspace\ruby\rspec_tutorial> > > _______________________________________________ > 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 ben2004uk at googlemail.com Thu Feb 4 18:07:06 2010 From: ben2004uk at googlemail.com (Ben Hall) Date: Thu, 4 Feb 2010 23:07:06 +0000 Subject: [Ironruby-core] autospec In-Reply-To: <8E45365BECA665489F3CB8878A6C1B7D0C8DAEAB@TK5EX14MBXC140.redmond.corp.microsoft.com> References: <7c1b59c01002041138k1b1f91e3q13bc0df4d0b9ded7@mail.gmail.com> <4B342496A3EFEB48839E10BB4BF5964C3C9733D7@TK5EX14MBXC124.redmond.corp.microsoft.com> <8E45365BECA665489F3CB8878A6C1B7D0C8DAEAB@TK5EX14MBXC140.redmond.corp.microsoft.com> Message-ID: Sorry, didn't see that thread. In that case, ensure your .autotest file is setup correctly to detect spec files. On Thu, Feb 4, 2010 at 10:46 PM, Shri Borde wrote: > The current sources also has a fix for open(?| cmd?) which was discussed in > the attached thread. > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek > Sent: Thursday, February 04, 2010 2:26 PM > > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] autospec > > > > Does autospec use END block? If so, you need the latest IronRuby build (from > source code) where this feature is implemented. > > > > Tomas > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tim Hoolihan > Sent: Thursday, February 04, 2010 12:59 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] autospec > > > > Thanks for the response. > > > > I have C:\ironruby\lib\ironruby\gems\1.8\bin\ in my path and can run spec > commands fine. > > > > However, I followed the post anyway, and created iautospec, iautospec.bat, > ispec, and ispec.bat in C:\ironruby\bin > > > > ispec runs fine as does spec, but autospec just returns to the command line. > > > > D:\workspace\ruby\rspec_tutorial>ispec spec --format specdoc > > > > User > - should be an any assigned roles > - should NOT be in any unassigned roles > > > > Finished in 0.2180125 seconds > > > > 2 examples, 0 failures > > > > D:\workspace\ruby\rspec_tutorial>iautospec > > > > D:\workspace\ruby\rspec_tutorial>iautospec spec > > > > D:\workspace\ruby\rspec_tutorial> > > > > > > From: Ivan Porto Carrero > > Sent: Thursday, February 04, 2010 3:38 PM > > To: ironruby-core at rubyforge.org > > Subject: Re: [Ironruby-core] autospec > > > > you'll have to do this for the ironruby version. > > > > http://flanders.co.nz/2009/10/26/creating-launcher-scripts-for-ironruby/ > > > > when RC2 is there it becomes > > > > ir -S autospec > > --- > 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, Feb 4, 2010 at 9:10 PM, Tim Hoolihan wrote: > > autospec (part of ZenTest gem) does not work for me with Ironruby.? Is this > a known issue?? I am using a relatively simple example that works fine on > ubuntu with traditional ruby.?? I'm using 1.0RC1 (version number?on the > assembly is out of date). > > > > D:\workspace\ruby\rspec_tutorial>dir lib\* spec\* > ?Volume in drive D is FILES > ?Volume Serial Number is AC2C-C255 > > > > ?Directory of D:\workspace\ruby\rspec_tutorial\lib > > > > 02/03/2010? 01:13 PM??? ????????? . > 02/03/2010? 01:13 PM??? ????????? .. > 02/03/2010? 11:22 AM?????????????? 109 user.rb > ?????????????? 1 File(s)??????????? 109 bytes > > > > ?Directory of D:\workspace\ruby\rspec_tutorial\spec > > > > 02/03/2010? 01:14 PM??? ????????? . > 02/03/2010? 01:14 PM??? ????????? .. > 02/03/2010? 01:22 PM?????????????? 354 user_spec.rb > ?????????????? 1 File(s)??????????? 354 bytes > ?????????????? 2 Dir(s)? 125,102,854,144 bytes free > > > > D:\workspace\ruby\rspec_tutorial>ir -v > IronRuby 0.9.3.0 on .NET 2.0.0.0 > > > > D:\workspace\ruby\rspec_tutorial>autospec > > > > D:\workspace\ruby\rspec_tutorial>spec --autospec spec > .. > > > > Finished in 0.2330133 seconds > > > > 2 examples, 0 failures > > > > D:\workspace\ruby\rspec_tutorial> > > _______________________________________________ > 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 Tomas.Matousek at microsoft.com Thu Feb 4 21:00:35 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 5 Feb 2010 02:00:35 +0000 Subject: [Ironruby-core] Code Review: Equality Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3C993203@TK5EX14MBXC124.redmond.corp.microsoft.com> tfpt review "/shelveset:Equality;REDMOND\tomat" Comment : Fixes comparisons of hashes, arrays and strings to behave according to http://redmine.ruby-lang.org/repositories/revision/2?rev=3442 Adds specs for this behavior. Also fixes: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3565 (the failures are not critical any more, our behavior is now the same as 1.8.6). Fixes interop test assembly build so that it works on machine with VS2010. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Equality.diff Type: application/octet-stream Size: 34324 bytes Desc: Equality.diff URL: From jdeville at microsoft.com Fri Feb 5 01:47:28 2010 From: jdeville at microsoft.com (Jim Deville) Date: Fri, 5 Feb 2010 06:47:28 +0000 Subject: [Ironruby-core] Code Review: wix3installer Message-ID: tfpt review "/shelveset:wix3installer;REDMOND\jdeville" Comment : Upgrades the IronRuby installer creation to Wix3. * Adds Wix3 files to External * Refactor's installer wxs's to allow per-user installs * lays the foundations for per user installs ** At this time I am unable to get a true single package installer to work correctly. I plan on looking into this more, but for now elevation is still required * Adds a rake library and a Rakefile for building the MSI. `rake IronRuby-0.9.4.0.msi` will build the stated file. This requires Wix3 since it uses the HEAT tool. * Updates the version number to 0.9.4.0 -------------- next part -------------- A non-text attachment was scrubbed... Name: wix3installer.diff Type: application/octet-stream Size: 434897 bytes Desc: wix3installer.diff URL: From mark at markrendle.net Fri Feb 5 05:20:58 2010 From: mark at markrendle.net (Mark Rendle) Date: Fri, 5 Feb 2010 10:20:58 +0000 Subject: [Ironruby-core] Rails 3? Message-ID: <3d65f4711002050220u407b8bdblaca2550d02afc0e3@mail.gmail.com> I'm planning to try the Rails 3 beta with IronRuby later today. Is there any reason it just flat-out won't work yet? I noted that R3 requires MRI 1.8.7 because of a hash-equality bug in 1.8.6, whereby two different hashes containing the same values are not considered equal, preventing hashes from being used as keys in other hashes. Cheers, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at whiterabbitconsulting.eu Fri Feb 5 05:46:19 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Fri, 5 Feb 2010 11:46:19 +0100 Subject: [Ironruby-core] Rails 3? In-Reply-To: <3d65f4711002050220u407b8bdblaca2550d02afc0e3@mail.gmail.com> References: <3d65f4711002050220u407b8bdblaca2550d02afc0e3@mail.gmail.com> Message-ID: I don't think anybody tried that already. I'd be keen to get your results --- 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, Feb 5, 2010 at 11:20 AM, Mark Rendle wrote: > I'm planning to try the Rails 3 beta with IronRuby later today. Is there > any reason it just flat-out won't work yet? I noted that R3 requires MRI > 1.8.7 because of a hash-equality bug in 1.8.6, whereby two different hashes > containing the same values are not considered equal, preventing hashes from > being used as keys in other hashes. > > Cheers, > Mark > > _______________________________________________ > 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 Tim at Hoolihan.net Fri Feb 5 09:25:01 2010 From: Tim at Hoolihan.net (Tim Hoolihan) Date: Fri, 5 Feb 2010 09:25:01 -0500 Subject: [Ironruby-core] autospec In-Reply-To: References: <7c1b59c01002041138k1b1f91e3q13bc0df4d0b9ded7@mail.gmail.com><4B342496A3EFEB48839E10BB4BF5964C3C9733D7@TK5EX14MBXC124.redmond.corp.microsoft.com><8E45365BECA665489F3CB8878A6C1B7D0C8DAEAB@TK5EX14MBXC140.redmond.corp.microsoft.com> Message-ID: <85E1ECC16D65497B99017FAD4E96634B@SBSTAHW7> My autotest file is: Autotest.add_hook :initialize do |at| %w{.svn .hg .git vendor}.each {|exception| at.add_exception(exception)} Again, I don't think this is the problem, as I can check out this project and immediately run autospec under the MRI on ubuntu. -Tim -------------------------------------------------- From: "Ben Hall" Sent: Thursday, February 04, 2010 6:07 PM To: Subject: Re: [Ironruby-core] autospec > Sorry, didn't see that thread. In that case, ensure your .autotest > file is setup correctly to detect spec files. > > On Thu, Feb 4, 2010 at 10:46 PM, Shri Borde > wrote: >> The current sources also has a fix for open(?| cmd?) which was discussed >> in >> the attached thread. >> >> >> >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek >> Sent: Thursday, February 04, 2010 2:26 PM >> >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] autospec >> >> >> >> Does autospec use END block? If so, you need the latest IronRuby build >> (from >> source code) where this feature is implemented. >> >> >> >> Tomas >> >> >> >> From: ironruby-core-bounces at rubyforge.org >> [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tim Hoolihan >> Sent: Thursday, February 04, 2010 12:59 PM >> To: ironruby-core at rubyforge.org >> Subject: Re: [Ironruby-core] autospec >> >> >> >> Thanks for the response. >> >> >> >> I have C:\ironruby\lib\ironruby\gems\1.8\bin\ in my path and can run spec >> commands fine. >> >> >> >> However, I followed the post anyway, and created iautospec, >> iautospec.bat, >> ispec, and ispec.bat in C:\ironruby\bin >> >> >> >> ispec runs fine as does spec, but autospec just returns to the command >> line. >> >> >> >> D:\workspace\ruby\rspec_tutorial>ispec spec --format specdoc >> >> >> >> User >> - should be an any assigned roles >> - should NOT be in any unassigned roles >> >> >> >> Finished in 0.2180125 seconds >> >> >> >> 2 examples, 0 failures >> >> >> >> D:\workspace\ruby\rspec_tutorial>iautospec >> >> >> >> D:\workspace\ruby\rspec_tutorial>iautospec spec >> >> >> >> D:\workspace\ruby\rspec_tutorial> >> >> >> >> >> >> From: Ivan Porto Carrero >> >> Sent: Thursday, February 04, 2010 3:38 PM >> >> To: ironruby-core at rubyforge.org >> >> Subject: Re: [Ironruby-core] autospec >> >> >> >> you'll have to do this for the ironruby version. >> >> >> >> http://flanders.co.nz/2009/10/26/creating-launcher-scripts-for-ironruby/ >> >> >> >> when RC2 is there it becomes >> >> >> >> ir -S autospec >> >> --- >> 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, Feb 4, 2010 at 9:10 PM, Tim Hoolihan wrote: >> >> autospec (part of ZenTest gem) does not work for me with Ironruby. Is >> this >> a known issue? I am using a relatively simple example that works fine on >> ubuntu with traditional ruby. I'm using 1.0RC1 (version number on the >> assembly is out of date). >> >> >> >> D:\workspace\ruby\rspec_tutorial>dir lib\* spec\* >> Volume in drive D is FILES >> Volume Serial Number is AC2C-C255 >> >> >> >> Directory of D:\workspace\ruby\rspec_tutorial\lib >> >> >> >> 02/03/2010 01:13 PM . >> 02/03/2010 01:13 PM .. >> 02/03/2010 11:22 AM 109 user.rb >> 1 File(s) 109 bytes >> >> >> >> Directory of D:\workspace\ruby\rspec_tutorial\spec >> >> >> >> 02/03/2010 01:14 PM . >> 02/03/2010 01:14 PM .. >> 02/03/2010 01:22 PM 354 user_spec.rb >> 1 File(s) 354 bytes >> 2 Dir(s) 125,102,854,144 bytes free >> >> >> >> D:\workspace\ruby\rspec_tutorial>ir -v >> IronRuby 0.9.3.0 on .NET 2.0.0.0 >> >> >> >> D:\workspace\ruby\rspec_tutorial>autospec >> >> >> >> D:\workspace\ruby\rspec_tutorial>spec --autospec spec >> .. >> >> >> >> Finished in 0.2330133 seconds >> >> >> >> 2 examples, 0 failures >> >> >> >> D:\workspace\ruby\rspec_tutorial> >> >> _______________________________________________ >> 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 jdeville at microsoft.com Fri Feb 5 11:51:35 2010 From: jdeville at microsoft.com (Jim Deville) Date: Fri, 5 Feb 2010 16:51:35 +0000 Subject: [Ironruby-core] Rails 3? In-Reply-To: References: <3d65f4711002050220u407b8bdblaca2550d02afc0e3@mail.gmail.com> Message-ID: I?ve tried earlier versions of rails 3 and it appears that it might rely on constant lookup differences as well. I?d also like to know if things have changed. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Friday, February 05, 2010 2:46 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Rails 3? I don't think anybody tried that already. I'd be keen to get your results --- 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, Feb 5, 2010 at 11:20 AM, Mark Rendle > wrote: I'm planning to try the Rails 3 beta with IronRuby later today. Is there any reason it just flat-out won't work yet? I noted that R3 requires MRI 1.8.7 because of a hash-equality bug in 1.8.6, whereby two different hashes containing the same values are not considered equal, preventing hashes from being used as keys in other hashes. Cheers, Mark _______________________________________________ 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 ejstembler at mac.com Fri Feb 5 13:27:21 2010 From: ejstembler at mac.com (Edward J. Stembler) Date: Fri, 05 Feb 2010 13:27:21 -0500 Subject: [Ironruby-core] IronRuby + Rails on IIS via Rack In-Reply-To: References: <3d65f4711002050220u407b8bdblaca2550d02afc0e3@mail.gmail.com> Message-ID: Anyone have a link for instructions on getting IronRuby + Rails up and running on IIS via Rack? I already have everything installed, but I'm not sure how to configure IIS to use Rack. Already created a seperate AppPool. A few more questions... What directory should be used as the virtual dirctory (root of rails app? Public?). What is the bare minimum needed in web.config? Where can I find the config.ru mentioned? Do any mime types need to be added to IIS? Thanks From mark at markrendle.net Fri Feb 5 14:35:33 2010 From: mark at markrendle.net (Mark Rendle) Date: Fri, 5 Feb 2010 19:35:33 +0000 Subject: [Ironruby-core] Rails 3? In-Reply-To: References: <3d65f4711002050220u407b8bdblaca2550d02afc0e3@mail.gmail.com> Message-ID: <3d65f4711002051135s30473c97hb2325e895a06f839@mail.gmail.com> Right, I'll have a crack at that over the weekend then. M On Fri, Feb 5, 2010 at 4:51 PM, Jim Deville wrote: > I?ve tried earlier versions of rails 3 and it appears that it might rely on > constant lookup differences as well. > > > > I?d also like to know if things have changed. > > > > JD > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Friday, February 05, 2010 2:46 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Rails 3? > > > > I don't think anybody tried that already. I'd be keen to get your results > --- > 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, Feb 5, 2010 at 11:20 AM, Mark Rendle wrote: > > I'm planning to try the Rails 3 beta with IronRuby later today. Is there > any reason it just flat-out won't work yet? I noted that R3 requires MRI > 1.8.7 because of a hash-equality bug in 1.8.6, whereby two different hashes > containing the same values are not considered equal, preventing hashes from > being used as keys in other hashes. > > > > Cheers, > > Mark > > > _______________________________________________ > 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 Fri Feb 5 15:00:58 2010 From: jdeville at microsoft.com (Jim Deville) Date: Fri, 5 Feb 2010 20:00:58 +0000 Subject: [Ironruby-core] Code Review: Equality In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C3C993203@TK5EX14MBXC124.redmond.corp.microsoft.com> References: <4B342496A3EFEB48839E10BB4BF5964C3C993203@TK5EX14MBXC124.redmond.corp.microsoft.com> Message-ID: Test changes look good. -----Original Message----- From: Tomas Matousek Sent: Thursday, February 04, 2010 6:01 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: Equality tfpt review "/shelveset:Equality;REDMOND\tomat" Comment : Fixes comparisons of hashes, arrays and strings to behave according to http://redmine.ruby-lang.org/repositories/revision/2?rev=3442 Adds specs for this behavior. Also fixes: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3565 (the failures are not critical any more, our behavior is now the same as 1.8.6). Fixes interop test assembly build so that it works on machine with VS2010. Tomas From Tomas.Matousek at microsoft.com Fri Feb 5 17:38:48 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 5 Feb 2010 22:38:48 +0000 Subject: [Ironruby-core] Code Review: OverloadInfo Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3C9ACE13@TK5EX14MBXC129.redmond.corp.microsoft.com> tfpt review "/shelveset:OverloadInfo8;REDMOND\tomat" Affects DLR, Python, Ruby. The OverloadResolver was performing quite a bit of reflection (mostly calling ParameterInfo.IsDefined) which turned out to consume about 15% of RoR request time. This change introduces OverloadInfo abstraction which captures all properties of a method that are needed to perform overload resolution. The default implementation (ReflectionOverloadInfo) holds on a MethodBase and uses reflection to determine these properties. The implementation caches information that is expensive to retrieve via reflection. The OverloadInfo is a public abstract class and could be implemented by languages so that almost no reflection is needed at runtime. The ultimate goal is to remove OverloadResolver's dependency on Reflection types (other than Type). This change goes half way - it abstracts away reflection in the first phase of overload resolution (building target sets). More work needs to be done to remove the dependency on Reflection completely in the expression building phase. It would also require some breaking changes in DLR so we keep that part post IronRuby v1.0. IronRuby implements LibraryOverload subclass of OverloadInfo. Library initializers generator performs custom attribute reflection on library methods and compresses the retrieved information to 31 bits. It imposes a limit of 15 parameters on library methods (more parameters can be supported if needed). The flags are then used at overload resolution time instead of calling ParameterInfo.IsDefined. The difference in perf: > ir.exe -X:CompilationThreshold 2 test.rb // before change Initialized in 7.8005s 10000 requests: 289 requests per second Peak working set: 217MB // after change Initialized in 7.64449s 10000 requests: 337 requests per second Peak working set: 216MB Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: OverloadInfo8.diff Type: application/octet-stream Size: 776933 bytes Desc: OverloadInfo8.diff URL: From ivan at whiterabbitconsulting.eu Sat Feb 6 12:52:11 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Sat, 6 Feb 2010 18:52:11 +0100 Subject: [Ironruby-core] FYI: ir -S gem doesn't work on *nix Message-ID: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3898 it looks in the current directory for the script ? ir -S gem list unknown: Could not find file "/Users/ivan/Dropbox/CloudSlide/Presentations/fosdem/samples/gem". (Errno::ENOENT) igem doesn't work either it's complaining about OpenSSL ? igem install rails ERROR: While executing gem ... (NameError) uninitialized constant OpenSSL::SSL::SSLSocket Mono JIT compiler version 2.6.1 (tarball Thu Dec 17 10:19:23 MST 2009) Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com TLS: normal GC: Included Boehm (with typed GC) SIGSEGV: normal Notification: Thread + polling Architecture: x86 Disabled: none --- 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 jdeville at microsoft.com Sat Feb 6 13:34:11 2010 From: jdeville at microsoft.com (Jim Deville) Date: Sat, 6 Feb 2010 18:34:11 +0000 Subject: [Ironruby-core] FYI: ir -S gem doesn't work on *nix In-Reply-To: References: Message-ID: Where is the gem executable? Also, can you do : ir -S igem list (since we still currently have the igem script) JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Saturday, February 06, 2010 9:52 AM To: ironruby-core Subject: [Ironruby-core] FYI: ir -S gem doesn't work on *nix http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3898 it looks in the current directory for the script ? ir -S gem list unknown: Could not find file "/Users/ivan/Dropbox/CloudSlide/Presentations/fosdem/samples/gem". (Errno::ENOENT) igem doesn't work either it's complaining about OpenSSL ? igem install rails ERROR: While executing gem ... (NameError) uninitialized constant OpenSSL::SSL::SSLSocket Mono JIT compiler version 2.6.1 (tarball Thu Dec 17 10:19:23 MST 2009) Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com TLS: normal GC: Included Boehm (with typed GC) SIGSEGV: normal Notification: Thread + polling Architecture: x86 Disabled: none --- 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 whiterabbitconsulting.eu Sat Feb 6 14:19:59 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Sat, 6 Feb 2010 20:19:59 +0100 Subject: [Ironruby-core] FYI: ir -S gem doesn't work on *nix In-Reply-To: References: Message-ID: ? ir -S igem list unknown: Could not find file "/Users/ivan/igem". (Errno::ENOENT) I have them in my path. on this particular box I have it in /usr/local/cloudslide/ironruby/bin --- 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 Sat, Feb 6, 2010 at 7:34 PM, Jim Deville wrote: > Where is the gem executable? Also, can you do : > > > > ir -S igem list (since we still currently have the igem script) > > > > JD > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ivan Porto Carrero > *Sent:* Saturday, February 06, 2010 9:52 AM > *To:* ironruby-core > *Subject:* [Ironruby-core] FYI: ir -S gem doesn't work on *nix > > > > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3898 > > > > > > it looks in the current directory for the script > > > > ? ir -S gem list > > unknown: Could not find file > "/Users/ivan/Dropbox/CloudSlide/Presentations/fosdem/samples/gem". > (Errno::ENOENT) > > > > > > igem doesn't work either it's complaining about OpenSSL > > > > ? igem install rails > > ERROR: While executing gem ... (NameError) > > uninitialized constant OpenSSL::SSL::SSLSocket > > > > Mono JIT compiler version 2.6.1 (tarball Thu Dec 17 10:19:23 MST 2009) > > Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com > > TLS: normal > > GC: Included Boehm (with typed GC) > > SIGSEGV: normal > > Notification: Thread + polling > > Architecture: x86 > > Disabled: none > > > > --- > 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 jdeville at microsoft.com Sat Feb 6 14:40:50 2010 From: jdeville at microsoft.com (Jim Deville) Date: Sat, 6 Feb 2010 19:40:50 +0000 Subject: [Ironruby-core] FYI: ir -S gem doesn't work on *nix In-Reply-To: References: Message-ID: Interesting. Thanks for checking though. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Saturday, February 06, 2010 11:20 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] FYI: ir -S gem doesn't work on *nix ? ir -S igem list unknown: Could not find file "/Users/ivan/igem". (Errno::ENOENT) I have them in my path. on this particular box I have it in /usr/local/cloudslide/ironruby/bin --- 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 Sat, Feb 6, 2010 at 7:34 PM, Jim Deville > wrote: Where is the gem executable? Also, can you do : ir -S igem list (since we still currently have the igem script) JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Saturday, February 06, 2010 9:52 AM To: ironruby-core Subject: [Ironruby-core] FYI: ir -S gem doesn't work on *nix http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3898 it looks in the current directory for the script ? ir -S gem list unknown: Could not find file "/Users/ivan/Dropbox/CloudSlide/Presentations/fosdem/samples/gem". (Errno::ENOENT) igem doesn't work either it's complaining about OpenSSL ? igem install rails ERROR: While executing gem ... (NameError) uninitialized constant OpenSSL::SSL::SSLSocket Mono JIT compiler version 2.6.1 (tarball Thu Dec 17 10:19:23 MST 2009) Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com TLS: normal GC: Included Boehm (with typed GC) SIGSEGV: normal Notification: Thread + polling Architecture: x86 Disabled: none --- 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 Sun Feb 7 04:23:27 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Sun, 7 Feb 2010 09:23:27 +0000 Subject: [Ironruby-core] Ruby Libraries ==> IronRuby In-Reply-To: References: Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C960219@TK5EX14MBXC140.redmond.corp.microsoft.com> About OpenSSL, IronPython already supports ssl (http://www.python.org/doc/2.6/library/ssl.html) and that code could be used as a starting point. Not sure how much overlap there is between the two versions of SSL. Just updating the mailing list after hearing about the IronPython version recently... ________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of Ryan Riley [ryan.riley at panesofglass.org] Sent: Thursday, December 17, 2009 8:59 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Ruby Libraries ==> IronRuby Tomas's message below seems to reflect what I've been thinking lately. Does anyone else think that in many cases porting C libraries to Ruby or even reusing ports from the Rubinius project would be beneficial to getting more libraries running on IronRuby? I'm supposing that IR performance will continue to improve, and I like the idea of contributing to more than one project (or reusing someone else's work). Is that a good idea? Should we instead wait for FFI on IR? Or is all of this a case-by-case basis approach? I have nothing concrete in mind, atm, I'm just wondering "out loud." Cheers! Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Fri, Nov 27, 2009 at 4:46 PM, Tomas Matousek > wrote: BTW: Since parts of the OpenSSL library are already written in Ruby (see ruby-1.8.6p368\lib\ruby\1.8\openssl directory) it might be easier to write the rest in Ruby as well. With calls to .NET implementation of the cryptographic algorithms, of course. If you chose to go that way you can add the scripts to Merlin\Main\Languages\Ruby\Libs. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Friday, November 27, 2009 2:38 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] handling ruby types and CallSiteStorage in std library It depends whether the method is supposed to invoke Digest's methods dynamically or not. Does pkcs5_keyivgen method accept any Ruby object that implements the methods pkcs5_keyivgen calls? Or does it need to be an instance of Digest class? If the former is true than you need to use "object" as the parameter type and use dynamic call sites to invoke those methods. An example of such dynamic behavior would be MutableStringOps.Compare. If the latter is true you can just type the parameter to Digest CLR type and call its methods directly. Tomas -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Dylan McClung Sent: Friday, November 27, 2009 9:34 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] handling ruby types and CallSiteStorage in std library I'm working on adding code to the OpenSSL extension of the standard library and I need to understand the design for invoking and typing Ruby code. I read the 'Modifying the sources' github page and it mentions using CallSiteStorage to call into Ruby code. Specifically, the Cipher ruby class has a dependency on the Digest ruby classes for the pkcs5_keyivgen method. An optional parameter for this method is an instance of the Ruby class Digest::Base. How would the type look, maybe Digest.Digest.Base digest/*optional*/? Or would it be an object and I'd also need to pass in CallSiteStorage to call methods on the object? An example in the standard library of such behavior would be much appreciated, thanks for any help. -- 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 Sun Feb 7 18:32:40 2010 From: lists at ruby-forum.com (Ameer Deen) Date: Mon, 8 Feb 2010 00:32:40 +0100 Subject: [Ironruby-core] Iron Ruby Windows Service In-Reply-To: References: Message-ID: <9d641c4f59f781f8e9087c46ce838757@ruby-forum.com> Got your book by the way and I'm liking it. Thank you. Ameer. Ivan Porto carrero wrote: > win32-service lets you control services > > This lets you create services. ultimately you're running ir.exe a C# > program > with a bunch of command line parameters > http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/d8f300e3-6c09-424f-829e-c5fda34c1bc7 > --- > 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 Mon Feb 8 03:41:01 2010 From: lists at ruby-forum.com (Aaron Clauson) Date: Mon, 8 Feb 2010 09:41:01 +0100 Subject: [Ironruby-core] Create pseudo sandbox for hosted IronRuby script Message-ID: <56adb368bcfa570130cbd20f85b346c1@ruby-forum.com> Hi, I have an multi-user VoIP application that allows users to execute IronRuby scripts for their call dial plans. I'm looking to restrict what the IronRuby scripts are allowed to do to protect the server in case a nasty user should decide to try and cause some damage. I've restricted the process executing the scripts as much as I can but would like to go further. For example my users don't need to be able to access the file system so I'd like to disable the File and Dir Ruby standard library classes. The approach I've looked into and that seems to work is to comment out the modules I don't want in the IronRuby.Libraries assembly and the BuiltinsLibraryInitializer.LoadModules class. Is that a reasonable approach? Thanks, Aaron -- Posted via http://www.ruby-forum.com/. From thibaut.barrere at gmail.com Mon Feb 8 03:45:39 2010 From: thibaut.barrere at gmail.com (=?ISO-8859-1?Q?Thibaut_Barr=E8re?=) Date: Mon, 8 Feb 2010 09:45:39 +0100 Subject: [Ironruby-core] Create pseudo sandbox for hosted IronRuby script In-Reply-To: <56adb368bcfa570130cbd20f85b346c1@ruby-forum.com> References: <56adb368bcfa570130cbd20f85b346c1@ruby-forum.com> Message-ID: <4a68b8cf1002080045jb48287drc3d0944e72a7f0c6@mail.gmail.com> > I have an multi-user VoIP application that allows users to execute > IronRuby scripts for their call dial plans. I'm looking to restrict what > the IronRuby scripts are allowed to do to protect the server in case a > nasty user should decide to try and cause some damage. This kind of "blank-slate" approach would be useful to me too. Is that something that can be achieved using isolated scopes ? -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Mon Feb 8 03:45:19 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Mon, 8 Feb 2010 08:45:19 +0000 Subject: [Ironruby-core] Code Review: ActiveRecord fixes Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C9636C3@TK5EX14MBXC140.redmond.corp.microsoft.com> tfpt review "/shelveset:ar;REDMOND\sborde" Comment : Fixed issue with extra 0s being appended to id. This was being caused by a bug in BigDecimal#to_i Fixed issue in ironruby-dbi with Statement#fetch being called after the reader was closed Fixed issue in ironruby-dbi where multiple Statements were active for a connection. We need to close the previous Statement first Will follow up to get these fixes into the ironruby-dbi gem Modified "utr -i foo" to generate tags to disable failing test in the utr\foo_tests.rb file itself. This way, it is possible to run "utr -i foo" in a loop and generate tags for all flaky tests (ie. tests which fail non-deterministically) Enabling the ActiveRecord tests in irtests (assuming they pass consistently in the over-night run tonight on my machine) This puts the pass rate at around 95% (116 tests disabled out of a total of 2123 tests) -------------- next part -------------- A non-text attachment was scrubbed... Name: ar.diff Type: application/octet-stream Size: 250042 bytes Desc: ar.diff URL: From pascal.normandin at convergentware.com Mon Feb 8 09:25:15 2010 From: pascal.normandin at convergentware.com (Pascal Normandin) Date: Mon, 8 Feb 2010 09:25:15 -0500 Subject: [Ironruby-core] Create pseudo sandbox for hosted IronRuby script In-Reply-To: <4a68b8cf1002080045jb48287drc3d0944e72a7f0c6@mail.gmail.com> References: <56adb368bcfa570130cbd20f85b346c1@ruby-forum.com> <4a68b8cf1002080045jb48287drc3d0944e72a7f0c6@mail.gmail.com> Message-ID: <001501caa8ca$8873c8b0$995b5a10$@normandin@convergentware.com> Hello, Here is what I've done to achieve this but I'd really like to know if this is the right method. It gets really confusing when it comes to TrustLevel and assembly permissions. >From my basic tests I was unable to access any resources from the computer not even the file system. Pascal Normandin protected static ScriptRuntime CreateIronRubyRuntime(bool runInSandBox) { // Setup the ruby engine in a Sandbox var rubySetup = Ruby.CreateRubySetup(); rubySetup.Options["InterpretedMode"] = true; var runtimeSetup = new ScriptRuntimeSetup(); runtimeSetup.LanguageSetups.Add(rubySetup); runtimeSetup.DebugMode = false; ScriptRuntime runtime; if (runInSandBox) { // Create AppDomain Info AppDomainSetup info = new AppDomainSetup(); info.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory + "\\bin"; info.ApplicationName = "IRPlugin"; // Set permissions PermissionSet ps1 = new PermissionSet(PermissionState.None); SecurityPermissionFlag flag = SecurityPermissionFlag.SkipVerification | SecurityPermissionFlag.Execution | SecurityPermissionFlag.ControlAppDomain; ps1.AddPermission(new SecurityPermission(flag)); // Create the AppDomain AppDomain newDomain = AppDomain.CreateDomain("IRPluginDomain", null, info, ps1); runtime = ScriptRuntime.CreateRemote(newDomain, runtimeSetup); } else { runtime = Ruby.CreateRuntime(runtimeSetup); } return runtime; } From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re Sent: February-08-10 3:46 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Create pseudo sandbox for hosted IronRuby script > I have an multi-user VoIP application that allows users to execute > IronRuby scripts for their call dial plans. I'm looking to restrict what > the IronRuby scripts are allowed to do to protect the server in case a > nasty user should decide to try and cause some damage. This kind of "blank-slate" approach would be useful to me too. Is that something that can be achieved using isolated scopes ? -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Mon Feb 8 11:46:53 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 8 Feb 2010 16:46:53 +0000 Subject: [Ironruby-core] Code Review: ActiveRecord fixes In-Reply-To: <8E45365BECA665489F3CB8878A6C1B7D0C9636C3@TK5EX14MBXC140.redmond.corp.microsoft.com> References: <8E45365BECA665489F3CB8878A6C1B7D0C9636C3@TK5EX14MBXC140.redmond.corp.microsoft.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3CE5AFC9@TK5EX14MBXC131.redmond.corp.microsoft.com> Code change looks good. Tomas -----Original Message----- From: Shri Borde Sent: Monday, February 08, 2010 12:45 AM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: ActiveRecord fixes tfpt review "/shelveset:ar;REDMOND\sborde" Comment : Fixed issue with extra 0s being appended to id. This was being caused by a bug in BigDecimal#to_i Fixed issue in ironruby-dbi with Statement#fetch being called after the reader was closed Fixed issue in ironruby-dbi where multiple Statements were active for a connection. We need to close the previous Statement first Will follow up to get these fixes into the ironruby-dbi gem Modified "utr -i foo" to generate tags to disable failing test in the utr\foo_tests.rb file itself. This way, it is possible to run "utr -i foo" in a loop and generate tags for all flaky tests (ie. tests which fail non-deterministically) Enabling the ActiveRecord tests in irtests (assuming they pass consistently in the over-night run tonight on my machine) This puts the pass rate at around 95% (116 tests disabled out of a total of 2123 tests) From Shri.Borde at microsoft.com Mon Feb 8 14:06:41 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Mon, 8 Feb 2010 19:06:41 +0000 Subject: [Ironruby-core] Create pseudo sandbox for hosted IronRuby script In-Reply-To: <001501caa8ca$8873c8b0$995b5a10$@normandin@convergentware.com> References: <56adb368bcfa570130cbd20f85b346c1@ruby-forum.com> <4a68b8cf1002080045jb48287drc3d0944e72a7f0c6@mail.gmail.com>, <001501caa8ca$8873c8b0$995b5a10$@normandin@convergentware.com> Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C963CD4@TK5EX14MBXC140.redmond.corp.microsoft.com> You should start without IronRuby, and get a basic C# test dll sandboxed first. One less variable to worry about. The links below have some useful information. http://msdn.microsoft.com/en-us/magazine/cc163701.aspx http://msdn.microsoft.com/en-us/library/bb763046.aspx ________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of Pascal Normandin [pascal.normandin at convergentware.com] Sent: Monday, February 08, 2010 6:25 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Create pseudo sandbox for hosted IronRuby script Hello, Here is what I've done to achieve this but I'd really like to know if this is the right method. It gets really confusing when it comes to TrustLevel and assembly permissions. >From my basic tests I was unable to access any resources from the computer not even the file system. Pascal Normandin protected static ScriptRuntime CreateIronRubyRuntime(bool runInSandBox) { // Setup the ruby engine in a Sandbox var rubySetup = Ruby.CreateRubySetup(); rubySetup.Options["InterpretedMode"] = true; var runtimeSetup = new ScriptRuntimeSetup(); runtimeSetup.LanguageSetups.Add(rubySetup); runtimeSetup.DebugMode = false; ScriptRuntime runtime; if (runInSandBox) { // Create AppDomain Info AppDomainSetup info = new AppDomainSetup(); info.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory + "\\bin"; info.ApplicationName = "IRPlugin"; // Set permissions PermissionSet ps1 = new PermissionSet(PermissionState.None); SecurityPermissionFlag flag = SecurityPermissionFlag.SkipVerification | SecurityPermissionFlag.Execution | SecurityPermissionFlag.ControlAppDomain; ps1.AddPermission(new SecurityPermission(flag)); // Create the AppDomain AppDomain newDomain = AppDomain.CreateDomain("IRPluginDomain", null, info, ps1); runtime = ScriptRuntime.CreateRemote(newDomain, runtimeSetup); } else { runtime = Ruby.CreateRuntime(runtimeSetup); } return runtime; } From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Thibaut Barr?re Sent: February-08-10 3:46 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Create pseudo sandbox for hosted IronRuby script > I have an multi-user VoIP application that allows users to execute > IronRuby scripts for their call dial plans. I'm looking to restrict what > the IronRuby scripts are allowed to do to protect the server in case a > nasty user should decide to try and cause some damage. This kind of "blank-slate" approach would be useful to me too. Is that something that can be achieved using isolated scopes ? -- Thibaut -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Mon Feb 8 16:37:09 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 8 Feb 2010 21:37:09 +0000 Subject: [Ironruby-core] Code Review: Control Flow Optimizations Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3CE5B1D8@TK5EX14MBXC131.redmond.corp.microsoft.com> 1) Implements a new block return optimization. It targets frame unwinding in the cases of returning from (nested) blocks like these: def foo x.times do y.times do return end end end We were throwing an exception in such cases to unwind the block frames. This is unnecessary because we already handle other kinds of control-flow (retry) in call sites with a block (x.times and y.times in the example above). So adding one more check (for frame unwinding return) there enables us to not throw an exception and doesn't slow down the fast path (no cross-frame control flow). 2) Removes an unnecessary allocation in dynamic call sites that dispatch to a Ruby method and take a block. 3) Adds targeted unit tests to increase code coverage of control flow constructs. Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: CFOptimization4.diff Type: application/octet-stream Size: 92447 bytes Desc: CFOptimization4.diff URL: From Tomas.Matousek at microsoft.com Tue Feb 9 23:30:42 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 10 Feb 2010 04:30:42 +0000 Subject: [Ironruby-core] Code Review: MutableStringConcatPerf2 Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3CE64E25@TK5EX14MBXC131.redmond.corp.microsoft.com> tfpt review "/shelveset:MutableStringConcatPerf2;REDMOND\tomat" Comment : Improves perf of String#+ Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: MutableStringConcatPerf2.diff Type: application/octet-stream Size: 19229 bytes Desc: MutableStringConcatPerf2.diff URL: From randallsutton at gmail.com Wed Feb 10 17:38:02 2010 From: randallsutton at gmail.com (Randall Sutton) Date: Wed, 10 Feb 2010 15:38:02 -0700 Subject: [Ironruby-core] Bug in delete_at?? Message-ID: I think there might be a bug in the way delete_at works. a = [1,2] a.delete_at(1) => 2 a.delete_at(1) RangeError: Specified argument was out of the range of valid values. Parameter name: index from :0:in `delete_at' from (irb):38 from :0:in `eval' from workspace.rb:80:in `evaluate' from context.rb:217:in `evaluate' from irb.rb:147:in `eval_input' from irb.rb:257:in `signal_status' from irb.rb:146:in `eval_input' from ruby-lex.rb:230:in `each_top_level_statement' from :0:in `loop' from c:/IronRuby/lib/ruby/1.8/irb.rb:146:in `eval_input' from c:/IronRuby/lib/ruby/1.8/irb.rb:70:in `start' from :0:in `catch' from c:/IronRuby/lib/ruby/1.8/irb.rb:69:in `start' from c:/IronRuby/bin/iirb:13 from :0:in `catch' a.delete_at(2) =>nil The a.delete_at(1) should return nil, but it is throwing an exception. Is that correct? Thanks, Randall From lists at ruby-forum.com Wed Feb 10 18:25:18 2010 From: lists at ruby-forum.com (Bassel Samman) Date: Thu, 11 Feb 2010 00:25:18 +0100 Subject: [Ironruby-core] Asynchronous Delegates Message-ID: <3f7e08760113592154d75209bf74a6fd@ruby-forum.com> Hello guys, I'd like to use asynchronous delegates, but it doesn't seem to work. The IronRuby website mentioned that I can do: ______________________________________________________________________ >>> require 'System' => true >>> require 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' => true >>> my_action = System::Action.new { puts "Howdy!" } => System.Action >>> my_action.invoke "Howdy!" => nil ______________________________________________________________________ That works fine, but if I try this instead: ______________________________________________________________________ result = my_action.BeginInvoke(nil,nil) my_action.EndInvoke(result) ______________________________________________________________________ I get: System::NullReferenceException: Object reference not set to an instance of an object. Am I missing something, or is there another way to do asynchronous delegates in IR. Thanks in advance, Bassel -- Posted via http://www.ruby-forum.com/. From randallsutton at gmail.com Wed Feb 10 19:07:19 2010 From: randallsutton at gmail.com (Randall Sutton) Date: Wed, 10 Feb 2010 17:07:19 -0700 Subject: [Ironruby-core] silverlight.rb In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC920B5402@TK5EX14MBXC141.redmond.corp.microsoft.com> References: <1B42307CD4AADD438CDDA2FE1121CC920B5402@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: I ended up just taking the idea and making my own version. class Wpf def self.create(t,args={},&b) # create an instance of the class obj = t.new # assign all the args args.each_pair do |k,v| obj.send("#{k.to_s}=",v) end # define the add method if it doesn't have one if !(obj.respond_to? :add) && (obj.respond_to? :children) obj.instance_eval('def add(t,args={},&b); obj = Wpf.create(t,args,&b); self.children.add(obj); obj; end;') end # call the create method if there is one if obj.respond_to? :create obj.create end # execute the block against the instance obj.instance_eval(&b) obj end end Not as complex as the other, so I might be missing something. So far this has worked great and I added ability to have a create method so if you are constructing a class that inherits from a control you could do some initialization before the block is executed. Thanks, Randall On Jan 20, 2010, at 1:21 AM, Jimmy Schementi wrote: > Silverlight.rb has actually been embedded in the Microsoft.Scripting.Silverlight.dll (as init.rb) and is loaded automatically, but I didn't include Wpf.build, so the version you have in the photoviewer app is the latest, so use at your own risk. It could possibly be added for the final release, or put in an external helper file. Let me know if it works for you currently. > > ~Jimmy > > >> -----Original Message----- >> From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- >> bounces at rubyforge.org] On Behalf Of Randall Sutton >> Sent: Wednesday, January 13, 2010 10:42 AM >> To: ironruby-core at rubyforge.org >> Subject: [Ironruby-core] silverlight.rb >> >> I would like to use the Wpf.build method contained in the silverlight.rb >> file. Currently I can only find this file in the photoviewer app from 2008 >> for what looks like Silverlight 2. Is there an updated version of this file? >> I noticed it isn't contained in the 1.0RC1 download. >> >> Thanks, >> Randall >> _______________________________________________ >> 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 Jimmy.Schementi at microsoft.com Wed Feb 10 20:04:36 2010 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Thu, 11 Feb 2010 01:04:36 +0000 Subject: [Ironruby-core] [ANN] IronRuby 1.0 RC2 Message-ID: <1B42307CD4AADD438CDDA2FE1121CC920460D48A@TK5EX14MBXC136.redmond.corp.microsoft.com> The IronRuby team is pleased to announce version 1.0 RC2! http://ironruby.net/download Direct download link: http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=36931#DownloadId=105584 This release is also accompanied by a preview release compatible with .NET 4.0 RC: http://ironruby.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=40175 As IronRuby approaches the final 1.0, these RCs will contain crucial bug fixes and enhancements that IronRuby requires to be a fast and compatible 1.0. Now that IronRuby is in the release-candidate stage, your feedback is even more important. Please use these new binaries as much as you can and report any issues you find here: http://ironruby.codeplex.com/WorkItem/Create.aspx. Note: The actual version of the assemblies is "0.9.4.0"; they will be updated to "1.0.0.0" when the last anticipated RC of IronRuby 1.0 is released. == Contributors casualjim, eoinomeara, ghouston, jimmysch, jredville, jwthornpson2, KAZUu, kralor, niclasnilsson, nikosd, rifraf, sborde, thbar, TomasMatousek, turp, vaderpi, vertiginous, xport Thank you all, and everyone else who contributed to previous releases! == Highlighted changes in RC2 - Fix how ir.exe -e treats arguments - "-S" command-line argument: load file from path (eg. ir -S irb) - Implements BEGIN and END blocks. - support open("|shell_command") for autospec - reduces the number of methods jitted during startup time of irb from 481 to 80, which translates to 34% time reduction. - enable debugging IronRuby when running in Silverlight - Fixes issues reported by mcs. - Adaptive loop compilation - super with implicit arguments in eval - Sets RUBY_PLATFORM according to Environment.OSVersion.Platform For more detailed list of changes and bugfixes please see the CHANGELOG: http://rubyforge.org/frs/shownotes.php?release_id=42661 Enjoy! ~ Jimmy ... and the IronRuby team From mark at markrendle.net Thu Feb 11 06:41:09 2010 From: mark at markrendle.net (Mark Rendle) Date: Thu, 11 Feb 2010 11:41:09 +0000 Subject: [Ironruby-core] MRI 1.8.7 compatibility Message-ID: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> It seems a shame that the 1.0 release of IronRuby isn't going to be able to run Rails 3, since they seem to be landing at around the same time. I guess the differences between MRI 1.8.6 and 1.8.7 are pretty major, though, so not much can be done about it at this stage? Any idea how long after the 1.0 RTM we might start seeing 1.8.7 (or 1.9.x?) compatibility? Cheers, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at markrendle.net Thu Feb 11 08:08:14 2010 From: mark at markrendle.net (Mark Rendle) Date: Thu, 11 Feb 2010 13:08:14 +0000 Subject: [Ironruby-core] Asynchronous Delegates In-Reply-To: <3f7e08760113592154d75209bf74a6fd@ruby-forum.com> References: <3f7e08760113592154d75209bf74a6fd@ruby-forum.com> Message-ID: <3d65f4711002110508p5b580899w3aa882a840e00497@mail.gmail.com> Hi Bassel, Ruby provides its own support for asynchronous operations in its Thread class: Thread.new do puts "howdy!" end If you specifically need to run a .NET delegate asynchronously, you can call its invoke method within this structure: Thread.new do my_action.invoke end More info on Ruby's Thread class: http://corelib.rubyonrails.org/classes/Thread.html Does that meet your needs? Cheers, Mark On Wed, Feb 10, 2010 at 11:25 PM, Bassel Samman wrote: > Hello guys, > I'd like to use asynchronous delegates, but it doesn't seem to work. > The IronRuby website mentioned that I can do: > > ______________________________________________________________________ > >>> require 'System' > => true > >>> require 'System.Core, Version=3.5.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089' > => true > >>> my_action = System::Action.new { puts "Howdy!" } > => System.Action > >>> my_action.invoke > "Howdy!" > => nil > ______________________________________________________________________ > That works fine, but if I try this instead: > > ______________________________________________________________________ > result = my_action.BeginInvoke(nil,nil) > my_action.EndInvoke(result) > ______________________________________________________________________ > > I get: > > System::NullReferenceException: Object reference not set to an instance > of an object. > > > Am I missing something, or is there another way to do asynchronous > delegates in IR. > > Thanks in advance, > > Bassel > -- > 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 michaelerasmus at gmail.com Thu Feb 11 08:44:46 2010 From: michaelerasmus at gmail.com (Michael Erasmus) Date: Thu, 11 Feb 2010 15:44:46 +0200 Subject: [Ironruby-core] Calling a C# method with a byref parameter Message-ID: <2b9e55761002110544l40a2fdf9r1ebe907c23570ba2@mail.gmail.com> Hi Everyone, I'm trying to write a IronRuby script that interops with a a .NET assembly written in C#. It has a class that derives from a base class in the .NET assembly. One of the base class protected methods looks like this: protected void OnNotifyPropertyChanged(string name, ref T localmember, T value) { ...... } I can't for the life of me figure out how to call this method from IR in my derived class. The documentation mentions that you can call *out *parameters without using them as arguments, but I can't seem to find anything about *ref *params. If I just try calling the method like this: OnNotifyPropertyChanged(property_name, value, value) I get this error: *Microsoft.Scripting.Core:0:in `Bind': Expression of type 'IronRuby.Builtins.Muta* *bleString&' cannot be used for parameter of type 'IronRuby.Builtins.MutableStrin* *g' of method 'Void #base#OnNotifyPropertyChanged[MutableString](System.String, I* *ronRuby.Builtins.MutableString ByRef, IronRuby.Builtins.MutableString)' (Argumen* *tError)* * from Microsoft.Scripting.Core:0:in `BindCore'* * from ./dynamic_event_item.rb:22:in `method_missing'* * from :0* Am I missing something? Thanks Michael Erasmus -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at whiterabbitconsulting.eu Thu Feb 11 08:51:42 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Thu, 11 Feb 2010 14:51:42 +0100 Subject: [Ironruby-core] Asynchronous Delegates In-Reply-To: <3d65f4711002110508p5b580899w3aa882a840e00497@mail.gmail.com> References: <3f7e08760113592154d75209bf74a6fd@ruby-forum.com> <3d65f4711002110508p5b580899w3aa882a840e00497@mail.gmail.com> Message-ID: or take a look here: I think the threadpool code is the one you want but it's commented out right now http://github.com/casualjim/ironnails/blob/master/IronNails/vendor/iron_nails/lib/nails_engine.rb#L61 --- 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 Thu, Feb 11, 2010 at 2:08 PM, Mark Rendle wrote: > Hi Bassel, > > Ruby provides its own support for asynchronous operations in its Thread > class: > > Thread.new do > puts "howdy!" > end > > If you specifically need to run a .NET delegate asynchronously, you can > call its invoke method within this structure: > > Thread.new do > my_action.invoke > end > > More info on Ruby's Thread class: > http://corelib.rubyonrails.org/classes/Thread.html > > Does that meet your needs? > > Cheers, > Mark > > On Wed, Feb 10, 2010 at 11:25 PM, Bassel Samman wrote: > >> Hello guys, >> I'd like to use asynchronous delegates, but it doesn't seem to work. >> The IronRuby website mentioned that I can do: >> >> ______________________________________________________________________ >> >>> require 'System' >> => true >> >>> require 'System.Core, Version=3.5.0.0, Culture=neutral, >> PublicKeyToken=b77a5c561934e089' >> => true >> >>> my_action = System::Action.new { puts "Howdy!" } >> => System.Action >> >>> my_action.invoke >> "Howdy!" >> => nil >> ______________________________________________________________________ >> That works fine, but if I try this instead: >> >> ______________________________________________________________________ >> result = my_action.BeginInvoke(nil,nil) >> my_action.EndInvoke(result) >> ______________________________________________________________________ >> >> I get: >> >> System::NullReferenceException: Object reference not set to an instance >> of an object. >> >> >> Am I missing something, or is there another way to do asynchronous >> delegates in IR. >> >> Thanks in advance, >> >> Bassel >> -- >> 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 shay.friedman at gmail.com Thu Feb 11 09:12:31 2010 From: shay.friedman at gmail.com (Shay Friedman) Date: Thu, 11 Feb 2010 16:12:31 +0200 Subject: [Ironruby-core] Calling a C# method with a byref parameter In-Reply-To: <2b9e55761002110544l40a2fdf9r1ebe907c23570ba2@mail.gmail.com> References: <2b9e55761002110544l40a2fdf9r1ebe907c23570ba2@mail.gmail.com> Message-ID: It returns another return value with the new ref value. For example, if you have the next c# class: public class Class1 { public string DoSomething(ref string test) { test = test + "tamtamtam"; return "return value"; } } This is the IronRuby code you can write to use it: >>> require 'c:\dev\TestApps\TestClass\TestClass\bin\Debug\TestClass.dll' => true >>> c = Class1.new => TestClass.Class1 >>> str = "hello" => "hello" >>> result = c.do_something(str) => ['return value', 'hellotamtamtam'] Pay attention that the result variable is an array that contains the method return value as the first item and the ref value as the second parameter. Shay. -------------------------------------------------------- Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | Sela Technology Center Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay On Thu, Feb 11, 2010 at 3:44 PM, Michael Erasmus wrote: > Hi Everyone, > > I'm trying to write a IronRuby script that interops with a a .NET assembly > written in C#. > > It has a class that derives from a base class in the .NET assembly. One of > the base class protected methods looks like this: > > protected void OnNotifyPropertyChanged(string name, ref T localmember, T > value) > { > ...... > } > > I can't for the life of me figure out how to call this method from IR in my > derived class. > The documentation mentions that you can call *out *parameters without > using them as arguments, but I can't seem to find anything about *ref * > params. > > If I just try calling the method like this: > > OnNotifyPropertyChanged(property_name, value, value) > > I get this error: > > *Microsoft.Scripting.Core:0:in `Bind': Expression of type > 'IronRuby.Builtins.Muta* > *bleString&' cannot be used for parameter of type > 'IronRuby.Builtins.MutableStrin* > *g' of method 'Void > #base#OnNotifyPropertyChanged[MutableString](System.String, I* > *ronRuby.Builtins.MutableString ByRef, IronRuby.Builtins.MutableString)' > (Argumen* > *tError)* > * from Microsoft.Scripting.Core:0:in `BindCore'* > * from ./dynamic_event_item.rb:22:in `method_missing'* > * from :0* > > > Am I missing something? > > Thanks > > Michael Erasmus > > > _______________________________________________ > 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 michaelerasmus at gmail.com Thu Feb 11 09:44:58 2010 From: michaelerasmus at gmail.com (Michael Erasmus) Date: Thu, 11 Feb 2010 16:44:58 +0200 Subject: [Ironruby-core] Calling a C# method with a byref parameter In-Reply-To: References: <2b9e55761002110544l40a2fdf9r1ebe907c23570ba2@mail.gmail.com> Message-ID: <2b9e55761002110644o3ff5be7ftf1cba78d8880d218@mail.gmail.com> Thanks Shay. OK your code works. But my trouble seems to come in with the Generic method. When I do: public class Class1 { public string DoSomething(ref string test) { test = test + "tamtamtam"; return "return value"; } public string DoSomethingElse(ref T test) { return test.ToString(); } } and then call it from IR: >>> c = TestClass::Class1.new => TestClass.Class1 >>> c.do_something("Bla") => ['return value', 'Blatamtamtam'] >>> c.do_something_else("Bla") Microsoft.Scripting.Core:0:in `Bind': Expression of type 'IronRuby.Builtins.Muta bleString&' cannot be used for parameter of type 'IronRuby.Builtins.MutableStrin g' of method 'System.String DoSomethingElse[MutableString](IronRuby.Builtins.Mut ableString ByRef)' (ArgumentError) from Microsoft.Scripting.Core:0:in `BindCore' from :0 On Thu, Feb 11, 2010 at 4:12 PM, Shay Friedman wrote: > It returns another return value with the new ref value. > > For example, if you have the next c# class: > public class Class1 > { > public string DoSomething(ref string test) > { > test = test + "tamtamtam"; > > return "return value"; > } > } > > This is the IronRuby code you can write to use it: > >>> require 'c:\dev\TestApps\TestClass\TestClass\bin\Debug\TestClass.dll' > => true > >>> c = Class1.new > => TestClass.Class1 > >>> str = "hello" > => "hello" > >>> result = c.do_something(str) > => ['return value', 'hellotamtamtam'] > > Pay attention that the result variable is an array that contains the method > return value as the first item and the ref value as the second parameter. > > Shay. > -------------------------------------------------------- > Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | > Sela Technology Center > Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay > > > On Thu, Feb 11, 2010 at 3:44 PM, Michael Erasmus > wrote: > >> Hi Everyone, >> >> I'm trying to write a IronRuby script that interops with a a .NET assembly >> written in C#. >> >> It has a class that derives from a base class in the .NET assembly. One of >> the base class protected methods looks like this: >> >> protected void OnNotifyPropertyChanged(string name, ref T localmember, >> T value) >> { >> ...... >> } >> >> I can't for the life of me figure out how to call this method from IR in >> my derived class. >> The documentation mentions that you can call *out *parameters without >> using them as arguments, but I can't seem to find anything about *ref * >> params. >> >> If I just try calling the method like this: >> >> OnNotifyPropertyChanged(property_name, value, value) >> >> I get this error: >> >> *Microsoft.Scripting.Core:0:in `Bind': Expression of type >> 'IronRuby.Builtins.Muta* >> *bleString&' cannot be used for parameter of type >> 'IronRuby.Builtins.MutableStrin* >> *g' of method 'Void >> #base#OnNotifyPropertyChanged[MutableString](System.String, I* >> *ronRuby.Builtins.MutableString ByRef, IronRuby.Builtins.MutableString)' >> (Argumen* >> *tError)* >> * from Microsoft.Scripting.Core:0:in `BindCore'* >> * from ./dynamic_event_item.rb:22:in `method_missing'* >> * from :0* >> >> >> Am I missing something? >> >> Thanks >> >> Michael Erasmus >> >> >> _______________________________________________ >> 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 shay.friedman at gmail.com Thu Feb 11 09:52:53 2010 From: shay.friedman at gmail.com (Shay Friedman) Date: Thu, 11 Feb 2010 16:52:53 +0200 Subject: [Ironruby-core] Calling a C# method with a byref parameter In-Reply-To: <2b9e55761002110644o3ff5be7ftf1cba78d8880d218@mail.gmail.com> References: <2b9e55761002110544l40a2fdf9r1ebe907c23570ba2@mail.gmail.com> <2b9e55761002110644o3ff5be7ftf1cba78d8880d218@mail.gmail.com> Message-ID: You should call generic methods a bit differently. The next code works: ret_val = c.method(:do_something_else).of(String).call(str) Shay. -------------------------------------------------------- Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | Sela Technology Center Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay On Thu, Feb 11, 2010 at 4:44 PM, Michael Erasmus wrote: > Thanks Shay. > > OK your code works. But my trouble seems to come in with the Generic > method. > > When I do: > > public class Class1 > { > public string DoSomething(ref string test) > { > test = test + "tamtamtam"; > > return "return value"; > } > > public string DoSomethingElse(ref T test) > { > return test.ToString(); > } > } > > and then call it from IR: > > > >>> c = TestClass::Class1.new > => TestClass.Class1 > >>> c.do_something("Bla") > => ['return value', 'Blatamtamtam'] > >>> c.do_something_else("Bla") > Microsoft.Scripting.Core:0:in `Bind': Expression of type > 'IronRuby.Builtins.Muta > bleString&' cannot be used for parameter of type > 'IronRuby.Builtins.MutableStrin > g' of method 'System.String > DoSomethingElse[MutableString](IronRuby.Builtins.Mut > ableString ByRef)' (ArgumentError) > from Microsoft.Scripting.Core:0:in `BindCore' > from :0 > > > > > On Thu, Feb 11, 2010 at 4:12 PM, Shay Friedman wrote: > >> It returns another return value with the new ref value. >> >> For example, if you have the next c# class: >> public class Class1 >> { >> public string DoSomething(ref string test) >> { >> test = test + "tamtamtam"; >> >> return "return value"; >> } >> } >> >> This is the IronRuby code you can write to use it: >> >>> require 'c:\dev\TestApps\TestClass\TestClass\bin\Debug\TestClass.dll' >> => true >> >>> c = Class1.new >> => TestClass.Class1 >> >>> str = "hello" >> => "hello" >> >>> result = c.do_something(str) >> => ['return value', 'hellotamtamtam'] >> >> Pay attention that the result variable is an array that contains the >> method return value as the first item and the ref value as the second >> parameter. >> >> Shay. >> -------------------------------------------------------- >> Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | >> Sela Technology Center >> Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay >> >> >> On Thu, Feb 11, 2010 at 3:44 PM, Michael Erasmus < >> michaelerasmus at gmail.com> wrote: >> >>> Hi Everyone, >>> >>> I'm trying to write a IronRuby script that interops with a a .NET >>> assembly written in C#. >>> >>> It has a class that derives from a base class in the .NET assembly. One >>> of the base class protected methods looks like this: >>> >>> protected void OnNotifyPropertyChanged(string name, ref T localmember, >>> T value) >>> { >>> ...... >>> } >>> >>> I can't for the life of me figure out how to call this method from IR in >>> my derived class. >>> The documentation mentions that you can call *out *parameters without >>> using them as arguments, but I can't seem to find anything about *ref * >>> params. >>> >>> If I just try calling the method like this: >>> >>> OnNotifyPropertyChanged(property_name, value, value) >>> >>> I get this error: >>> >>> *Microsoft.Scripting.Core:0:in `Bind': Expression of type >>> 'IronRuby.Builtins.Muta* >>> *bleString&' cannot be used for parameter of type >>> 'IronRuby.Builtins.MutableStrin* >>> *g' of method 'Void >>> #base#OnNotifyPropertyChanged[MutableString](System.String, I* >>> *ronRuby.Builtins.MutableString ByRef, IronRuby.Builtins.MutableString)' >>> (Argumen* >>> *tError)* >>> * from Microsoft.Scripting.Core:0:in `BindCore'* >>> * from ./dynamic_event_item.rb:22:in `method_missing'* >>> * from :0* >>> >>> >>> Am I missing something? >>> >>> Thanks >>> >>> Michael Erasmus >>> >>> >>> _______________________________________________ >>> 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 jdeville at microsoft.com Thu Feb 11 10:55:21 2010 From: jdeville at microsoft.com (Jim Deville) Date: Thu, 11 Feb 2010 15:55:21 +0000 Subject: [Ironruby-core] Calling a C# method with a byref parameter In-Reply-To: References: <2b9e55761002110544l40a2fdf9r1ebe907c23570ba2@mail.gmail.com> <2b9e55761002110644o3ff5be7ftf1cba78d8880d218@mail.gmail.com> Message-ID: That call actually should (usually) be able to infer the type. Please file a bug on codeplex that Generic Type inference isn't working with ByRef types. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Thursday, February 11, 2010 6:53 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Calling a C# method with a byref parameter You should call generic methods a bit differently. The next code works: ret_val = c.method(:do_something_else).of(String).call(str) Shay. -------------------------------------------------------- Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | Sela Technology Center Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay On Thu, Feb 11, 2010 at 4:44 PM, Michael Erasmus > wrote: Thanks Shay. OK your code works. But my trouble seems to come in with the Generic method. When I do: public class Class1 { public string DoSomething(ref string test) { test = test + "tamtamtam"; return "return value"; } public string DoSomethingElse(ref T test) { return test.ToString(); } } and then call it from IR: >>> c = TestClass::Class1.new => TestClass.Class1 >>> c.do_something("Bla") => ['return value', 'Blatamtamtam'] >>> c.do_something_else("Bla") Microsoft.Scripting.Core:0:in `Bind': Expression of type 'IronRuby.Builtins.Muta bleString&' cannot be used for parameter of type 'IronRuby.Builtins.MutableStrin g' of method 'System.String DoSomethingElse[MutableString](IronRuby.Builtins.Mut ableString ByRef)' (ArgumentError) from Microsoft.Scripting.Core:0:in `BindCore' from :0 On Thu, Feb 11, 2010 at 4:12 PM, Shay Friedman > wrote: It returns another return value with the new ref value. For example, if you have the next c# class: public class Class1 { public string DoSomething(ref string test) { test = test + "tamtamtam"; return "return value"; } } This is the IronRuby code you can write to use it: >>> require 'c:\dev\TestApps\TestClass\TestClass\bin\Debug\TestClass.dll' => true >>> c = Class1.new => TestClass.Class1 >>> str = "hello" => "hello" >>> result = c.do_something(str) => ['return value', 'hellotamtamtam'] Pay attention that the result variable is an array that contains the method return value as the first item and the ref value as the second parameter. Shay. -------------------------------------------------------- Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | Sela Technology Center Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay On Thu, Feb 11, 2010 at 3:44 PM, Michael Erasmus > wrote: Hi Everyone, I'm trying to write a IronRuby script that interops with a a .NET assembly written in C#. It has a class that derives from a base class in the .NET assembly. One of the base class protected methods looks like this: protected void OnNotifyPropertyChanged(string name, ref T localmember, T value) { ...... } I can't for the life of me figure out how to call this method from IR in my derived class. The documentation mentions that you can call out parameters without using them as arguments, but I can't seem to find anything about ref params. If I just try calling the method like this: OnNotifyPropertyChanged(property_name, value, value) I get this error: Microsoft.Scripting.Core:0:in `Bind': Expression of type 'IronRuby.Builtins.Muta bleString&' cannot be used for parameter of type 'IronRuby.Builtins.MutableStrin g' of method 'Void #base#OnNotifyPropertyChanged[MutableString](System.String, I ronRuby.Builtins.MutableString ByRef, IronRuby.Builtins.MutableString)' (Argumen tError) from Microsoft.Scripting.Core:0:in `BindCore' from ./dynamic_event_item.rb:22:in `method_missing' from :0 Am I missing something? Thanks Michael Erasmus _______________________________________________ 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 ryan.riley at panesofglass.org Thu Feb 11 12:56:04 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Thu, 11 Feb 2010 11:56:04 -0600 Subject: [Ironruby-core] Calling a C# method with a byref parameter In-Reply-To: References: <2b9e55761002110544l40a2fdf9r1ebe907c23570ba2@mail.gmail.com> <2b9e55761002110644o3ff5be7ftf1cba78d8880d218@mail.gmail.com> Message-ID: On what types will IR be able to infer the types? Is that documented on the site and I just didn't see it? Ryan Riley On Thu, Feb 11, 2010 at 9:55 AM, Jim Deville wrote: > That call actually should (usually) be able to infer the type. Please file > a bug on codeplex that Generic Type inference isn?t working with ByRef > types. > > > > JD > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Shay Friedman > *Sent:* Thursday, February 11, 2010 6:53 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Calling a C# method with a byref parameter > > > > You should call generic methods a bit differently. > > > > The next code works: > > ret_val = c.method(:do_something_else).of(String).call(str) > > > > Shay. > > -------------------------------------------------------- > Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | > Sela Technology Center > Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay > > On Thu, Feb 11, 2010 at 4:44 PM, Michael Erasmus > wrote: > > Thanks Shay. > > > > OK your code works. But my trouble seems to come in with the Generic > method. > > > > When I do: > > > > public class Class1 > > { > > public string DoSomething(ref string test) > > { > > test = test + "tamtamtam"; > > > > return "return value"; > > } > > > > public string DoSomethingElse(ref T test) > > { > > return test.ToString(); > > } > > } > > > > and then call it from IR: > > > > > > >>> c = TestClass::Class1.new > > => TestClass.Class1 > > >>> c.do_something("Bla") > > => ['return value', 'Blatamtamtam'] > > >>> c.do_something_else("Bla") > > Microsoft.Scripting.Core:0:in `Bind': Expression of type > 'IronRuby.Builtins.Muta > > bleString&' cannot be used for parameter of type > 'IronRuby.Builtins.MutableStrin > > g' of method 'System.String > DoSomethingElse[MutableString](IronRuby.Builtins.Mut > > ableString ByRef)' (ArgumentError) > > from Microsoft.Scripting.Core:0:in `BindCore' > > from :0 > > > > > > > > > > On Thu, Feb 11, 2010 at 4:12 PM, Shay Friedman > wrote: > > It returns another return value with the new ref value. > > > > For example, if you have the next c# class: > > public class Class1 > > { > > public string DoSomething(ref string test) > > { > > test = test + "tamtamtam"; > > > > return "return value"; > > } > > } > > > > This is the IronRuby code you can write to use it: > > >>> require 'c:\dev\TestApps\TestClass\TestClass\bin\Debug\TestClass.dll' > > => true > > >>> c = Class1.new > > => TestClass.Class1 > > >>> str = "hello" > > => "hello" > > >>> result = c.do_something(str) > > => ['return value', 'hellotamtamtam'] > > > > Pay attention that the result variable is an array that contains the method > return value as the first item and the ref value as the second parameter. > > > > Shay. > > -------------------------------------------------------- > Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | > Sela Technology Center > Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay > > On Thu, Feb 11, 2010 at 3:44 PM, Michael Erasmus > wrote: > > Hi Everyone, > > > > I'm trying to write a IronRuby script that interops with a a .NET assembly > written in C#. > > > > It has a class that derives from a base class in the .NET assembly. One of > the base class protected methods looks like this: > > > > protected void OnNotifyPropertyChanged(string name, ref T localmember, T > value) > > { > > ...... > > } > > > > I can't for the life of me figure out how to call this method from IR in my > derived class. > > The documentation mentions that you can call *out *parameters without > using them as arguments, but I can't seem to find anything about *ref * > params. > > > > If I just try calling the method like this: > > > > OnNotifyPropertyChanged(property_name, value, value) > > > > I get this error: > > > > *Microsoft.Scripting.Core:0:in `Bind': Expression of type > 'IronRuby.Builtins.Muta* > > *bleString&' cannot be used for parameter of type > 'IronRuby.Builtins.MutableStrin* > > *g' of method 'Void > #base#OnNotifyPropertyChanged[MutableString](System.String, I* > > *ronRuby.Builtins.MutableString ByRef, IronRuby.Builtins.MutableString)' > (Argumen* > > *tError)* > > * from Microsoft.Scripting.Core:0:in `BindCore'* > > * from ./dynamic_event_item.rb:22:in `method_missing'* > > * from :0* > > > > > > Am I missing something? > > > > Thanks > > > > Michael Erasmus > > > > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at whiterabbitconsulting.eu Thu Feb 11 13:37:54 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Thu, 11 Feb 2010 19:37:54 +0100 Subject: [Ironruby-core] running some benchmarks Message-ID: Hi I'm currently helping David m. Peterson by setting up 2 windows boxes with ironruby and running a few benchmarks and tests with it. For example I'm going to try running a few of the complexer rails apps and see how it holds up, i'm thinking about spree and redmine atm. We'll also run the ruby shootout suite, if you have more suggestions they're welcome. The machines are hosted on EC2. However using gem sources -a proves to be a little difficult if you don't have the %HOME% environment variable set. on the both machines I could set %HOME%=%USERPROFILE% in the environment variables to remedy this, but I feel like this is something that should be handled by the installer or by the ironruby gem library. I couldn't use the installer in windows 2003 R2 SP2 telling me I needed a higher service pack for my windows, but there is no higher one when I wanted to get that one. I also ran into issues installing a bunch of gems at once. Below the rails gem is the one causing trouble. The problems for the rails gem go away after I installed the gemcutter gem (?), but then it fails on the rspec-rails gem with the same error. If I then remove rails from the list of gems to install everything installs fine. D:\Console2>ir -S gem install caricature rails rspec-rails shoulda test-unit ZenTest ironruby-sqlite3 ironruby-sqlserver Successfully installed uuidtools-2.1.1 Successfully installed caricature-0.7.6 ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SocketError: An established connection was aborted by the software in your host machine (http://gemcutter.org/gems/rake-0.8.7.gem) D:\Console2>ir -S gem install rails rspec-rails shoulda test-unit ZenTest ironruby-sqlite3 ironruby-sqlserver ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SocketError: An established connection was aborted by the software in your host machine (http://gemcutter.org/gems/rack-1.0.1.gem) D:\Console2>ir -S gem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.5 - RUBY VERSION: 1.8.6 (2009-03-31 patchlevel 368) [i386-mswin32] - INSTALLATION DIRECTORY: D:/ironruby/lib/ironruby/gems/1.8 - RUBY EXECUTABLE: D:/ironruby/bin/ir.exe - EXECUTABLE DIRECTORY: D:/ironruby/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-60 - GEM PATHS: - D:/ironruby/lib/ironruby/gems/1.8 - C:/Users/casualjim/.gem/ironruby/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - :sources => ["http://gemcutter.org"] - REMOTE SOURCES: - http://gemcutter.org Additionally on windows 2003 ironruby can't find gem.bat and I did set the necessary environment variables. PATH, HOME. install D:\Console2>ir -S gem install caricature rails rspec-rails shoulda test-unit ZenTest ironruby-sqlite3 ironruby-sqlserver unknown: Could not find file 'D:\Console2\gem'. (Errno::ENOENT) D:\Console2>ir -v IronRuby 0.9.4.0 on .NET 2.0.50727.3603 Copyright (c) Microsoft Corporation. All rights reserved. >>> exit Apart from the issues above, I'm unable to push gems to gemcutter with ironruby it fails with an OpenSSL error. The same error I get on my mac when I want to install gems with ironruby. I'll keep you updated as I make more progress and/or come across more issues. --- 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 orion.edwards at gmail.com Thu Feb 11 14:52:06 2010 From: orion.edwards at gmail.com (Orion Edwards) Date: Fri, 12 Feb 2010 08:52:06 +1300 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> Message-ID: <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> +1 ! Any idea how long after the 1.0 RTM we might start seeing 1.8.7 (or 1.9.x?) > compatibility? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Thu Feb 11 16:20:27 2010 From: jdeville at microsoft.com (Jim Deville) Date: Thu, 11 Feb 2010 21:20:27 +0000 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> Message-ID: Along these lines: Are you interested in the 1.8.7 features, or just things like Rails compat (which 1.9.x compat would give) JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Thursday, February 11, 2010 11:52 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] MRI 1.8.7 compatibility +1 ! Any idea how long after the 1.0 RTM we might start seeing 1.8.7 (or 1.9.x?) compatibility? -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben2004uk at googlemail.com Thu Feb 11 16:52:48 2010 From: ben2004uk at googlemail.com (Ben Hall) Date: Thu, 11 Feb 2010 21:52:48 +0000 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> Message-ID: For me it is just Rails 3.0 compat :) On Thu, Feb 11, 2010 at 9:20 PM, Jim Deville wrote: > Along these lines: > > > > Are you interested in the 1.8.7 features, or just things like Rails compat > (which 1.9.x compat would give) > > > > JD > > > > From: ironruby-core-bounces at rubyforge.org > [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards > Sent: Thursday, February 11, 2010 11:52 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] MRI 1.8.7 compatibility > > > > +1 ! > > Any idea how long after the 1.0 RTM we might start seeing 1.8.7 (or 1.9.x?) > compatibility? > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > From Shri.Borde at microsoft.com Thu Feb 11 17:42:43 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Thu, 11 Feb 2010 22:42:43 +0000 Subject: [Ironruby-core] Code Review: Misc rails fixes Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C968696@TK5EX14MBXC140.redmond.corp.microsoft.com> tfpt review "/shelveset:rails;REDMOND\sborde" Comment : Adds OpenSSL::SSL::SSLError which fixes all the remaining active_resource failures Adds an overload of NoMethodError.new that takes 3 arguments Implements Zlib.crc32 -------------- next part -------------- A non-text attachment was scrubbed... Name: rails.diff Type: application/octet-stream Size: 48239 bytes Desc: rails.diff URL: From Shri.Borde at microsoft.com Thu Feb 11 17:43:55 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Thu, 11 Feb 2010 22:43:55 +0000 Subject: [Ironruby-core] running some benchmarks In-Reply-To: References: Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C96865C@TK5EX14MBXC140.redmond.corp.microsoft.com> What problem does "gem sources -a" have with %HOME%? Does MRI have the same problem? If %HOME% is not set, IronRuby and MRI should both use the same algorithm to figure out the return value of File.expand_path("~") based on other environment variables like %USERPROFILE%. Do you get the SocketError with MRI? You could try running "gem install" and "gem uninstall" in a loop with MRI to see if its an issue with the machine configuration itself. I do have a fix for the OpenSSL issue. It does get more active_resource tests working. However, I am not sure if it is sufficient to unblock your scenarios. ________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of Ivan Porto Carrero [ivan at whiterabbitconsulting.eu] Sent: Thursday, February 11, 2010 10:37 AM To: ironruby-core Subject: [Ironruby-core] running some benchmarks Hi I'm currently helping David m. Peterson by setting up 2 windows boxes with ironruby and running a few benchmarks and tests with it. For example I'm going to try running a few of the complexer rails apps and see how it holds up, i'm thinking about spree and redmine atm. We'll also run the ruby shootout suite, if you have more suggestions they're welcome. The machines are hosted on EC2. However using gem sources -a proves to be a little difficult if you don't have the %HOME% environment variable set. on the both machines I could set %HOME%=%USERPROFILE% in the environment variables to remedy this, but I feel like this is something that should be handled by the installer or by the ironruby gem library. I couldn't use the installer in windows 2003 R2 SP2 telling me I needed a higher service pack for my windows, but there is no higher one when I wanted to get that one. I also ran into issues installing a bunch of gems at once. Below the rails gem is the one causing trouble. The problems for the rails gem go away after I installed the gemcutter gem (?), but then it fails on the rspec-rails gem with the same error. If I then remove rails from the list of gems to install everything installs fine. D:\Console2>ir -S gem install caricature rails rspec-rails shoulda test-unit ZenTest ironruby-sqlite3 ironruby-sqlserver Successfully installed uuidtools-2.1.1 Successfully installed caricature-0.7.6 ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SocketError: An established connection was aborted by the software in your host machine (http://gemcutter.org/gems/rake-0.8.7.gem) D:\Console2>ir -S gem install rails rspec-rails shoulda test-unit ZenTest ironruby-sqlite3 ironruby-sqlserver ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SocketError: An established connection was aborted by the software in your host machine (http://gemcutter.org/gems/rack-1.0.1.gem) D:\Console2>ir -S gem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.5 - RUBY VERSION: 1.8.6 (2009-03-31 patchlevel 368) [i386-mswin32] - INSTALLATION DIRECTORY: D:/ironruby/lib/ironruby/gems/1.8 - RUBY EXECUTABLE: D:/ironruby/bin/ir.exe - EXECUTABLE DIRECTORY: D:/ironruby/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-60 - GEM PATHS: - D:/ironruby/lib/ironruby/gems/1.8 - C:/Users/casualjim/.gem/ironruby/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - :sources => ["http://gemcutter.org"] - REMOTE SOURCES: - http://gemcutter.org Additionally on windows 2003 ironruby can't find gem.bat and I did set the necessary environment variables. PATH, HOME. install D:\Console2>ir -S gem install caricature rails rspec-rails shoulda test-unit ZenTest ironruby-sqlite3 ironruby-sqlserver unknown: Could not find file 'D:\Console2\gem'. (Errno::ENOENT) D:\Console2>ir -v IronRuby 0.9.4.0 on .NET 2.0.50727.3603 Copyright (c) Microsoft Corporation. All rights reserved. >>> exit Apart from the issues above, I'm unable to push gems to gemcutter with ironruby it fails with an OpenSSL error. The same error I get on my mac when I want to install gems with ironruby. I'll keep you updated as I make more progress and/or come across more issues. --- 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 Feb 11 18:10:12 2010 From: lists at ruby-forum.com (Bassel Samman) Date: Fri, 12 Feb 2010 00:10:12 +0100 Subject: [Ironruby-core] Asynchronous Delegates In-Reply-To: References: <3f7e08760113592154d75209bf74a6fd@ruby-forum.com> <3d65f4711002110508p5b580899w3aa882a840e00497@mail.gmail.com> Message-ID: <413f92ae44d4013277724823aa78b474@ruby-forum.com> Thanks guys. I ended up writing a wrapper that takes an action and runs it in an async delegate and that worked fine. You can obviously get much fancier, but an example would be along the lines of this: C# class: public class WrapInDelegate{ public delegate void DelegateWrapper(); public DelegateWrapper wrapper; public WrapInDelegate(Action a){ wrapper = delegate(){a.Invoke();}; } public IAsyncResult BeginInvoke(){ return wrapper.BeginInvoke(null, null); } public void EndInvoke(IAsyncResult result){ wrapper.EndInvoke(result); } } >From Ruby: d = WrapInDelegate.new(System::Action.new { puts "I run for no man..." }) r = d.BeginInvoke d.EndInvoke r -- Posted via http://www.ruby-forum.com/. From suppakilla at gmail.com Thu Feb 11 18:05:47 2010 From: suppakilla at gmail.com (Daniele Alessandri) Date: Fri, 12 Feb 2010 00:05:47 +0100 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> Message-ID: <3bf20551002111505x445d17f3g65469c07ff35c6a7@mail.gmail.com> On Thu, Feb 11, 2010 at 22:20, Jim Deville wrote: > Are you interested in the 1.8.7 features, or just things like Rails compat > (which 1.9.x compat would give) In all honesty (and regardless of Rails 3.0 compat) I think that working on 1.8.7 features would be a waste of time and that the target for a post-1.0 major release of IronRuby should be set to 1.9. But anyway, this is coming from one of the few ruby devs that doesn't care a bit about Rails ;-) -- Daniele Alessandri http://www.clorophilla.net/ http://twitter.com/JoL1hAHN From orion.edwards at gmail.com Thu Feb 11 20:17:26 2010 From: orion.edwards at gmail.com (Orion Edwards) Date: Fri, 12 Feb 2010 14:17:26 +1300 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> Message-ID: <7c1b59c01002111717s48a4c056s38b4955d1b3426f0@mail.gmail.com> Personally I'd like the 1.8.7 library changes (The Enumerable module has a bunch more useful stuff in 1.8.7) but beyond that I can't actually remember what the changes were, so I don't really miss them :-) If IronRuby has 1.9.x compat, then the library changes would get pulled in for that, so the 1.8.7 changes are probably not worth worrying about. On Fri, Feb 12, 2010 at 10:20 AM, Jim Deville wrote: > Along these lines: > > > > Are you interested in the 1.8.7 features, or just things like Rails compat > (which 1.9.x compat would give) > > > > JD > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards > *Sent:* Thursday, February 11, 2010 11:52 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] MRI 1.8.7 compatibility > > > > +1 ! > > Any idea how long after the 1.0 RTM we might start seeing 1.8.7 (or 1.9.x?) > compatibility? > > > _______________________________________________ > 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 ejstembler at mac.com Thu Feb 11 23:09:04 2010 From: ejstembler at mac.com (Edward J. Stembler) Date: Thu, 11 Feb 2010 23:09:04 -0500 Subject: [Ironruby-core] IronRuby + Rails on IIS via Rack In-Reply-To: References: <3d65f4711002050220u407b8bdblaca2550d02afc0e3@mail.gmail.com> Message-ID: <4DC3F954-5B86-436A-871D-15AA0CFB987B@mac.com> Answering my own post here? My initial problem was that I was using the Windows installer instead of the source code download. I didn?t realize it wasn?t included in the installer. I saw Jimmy?s todo reference of supplying a gem in the future. In any case, after getting the VS2010 solution to compile in VC2010 RC, I did run into two subsequent issues. Incidentally, I added Fusion!EnableLog to the registry in order to see logging info. Which revealed that my first error had to do with a Microsoft.Scripting configuration error in web.config. The log showed where it was attempting to locate the assembly and that lead me to suspect an x64 issue. I deleted the version/culture/PublicKey data from the reference to get it to continue on to the next error in Interperter.cs which I stopped at: System.NotSupportedException was unhandled by user code Message=Win32API is not supported in 64-bit process Source=Snippets.debug.scripting So, I?m guessing this means x64 is not currently supported? Can anyone confirm or deny this? If x64 is not supported yet, is there an ETA? Thanks On Feb 5, 2010, at 1:27 PM, Edward J. Stembler wrote: > Anyone have a link for instructions on getting IronRuby + Rails up and running on IIS via Rack? > > I already have everything installed, but I'm not sure how to configure IIS to use Rack. Already created a seperate AppPool. A few more questions... What directory should be used as the virtual dirctory (root of rails app? Public?). What is the bare minimum needed in web.config? Where can I find the config.ru mentioned? Do any mime types need to be added to IIS? > > Thanks From jdeville at microsoft.com Fri Feb 12 00:00:40 2010 From: jdeville at microsoft.com (Jim Deville) Date: Fri, 12 Feb 2010 05:00:40 +0000 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: <7c1b59c01002111717s48a4c056s38b4955d1b3426f0@mail.gmail.com> References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> <7c1b59c01002111717s48a4c056s38b4955d1b3426f0@mail.gmail.com> Message-ID: I believe 1.9 includes most of the changes that are in 1.8.7 and 1.8.8. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Thursday, February 11, 2010 5:17 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] MRI 1.8.7 compatibility Personally I'd like the 1.8.7 library changes (The Enumerable module has a bunch more useful stuff in 1.8.7) but beyond that I can't actually remember what the changes were, so I don't really miss them :-) If IronRuby has 1.9.x compat, then the library changes would get pulled in for that, so the 1.8.7 changes are probably not worth worrying about. On Fri, Feb 12, 2010 at 10:20 AM, Jim Deville > wrote: Along these lines: Are you interested in the 1.8.7 features, or just things like Rails compat (which 1.9.x compat would give) JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Thursday, February 11, 2010 11:52 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] MRI 1.8.7 compatibility +1 ! Any idea how long after the 1.0 RTM we might start seeing 1.8.7 (or 1.9.x?) compatibility? _______________________________________________ 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 whiterabbitconsulting.eu Fri Feb 12 00:53:18 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Fri, 12 Feb 2010 06:53:18 +0100 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> <7c1b59c01002111717s48a4c056s38b4955d1b3426f0@mail.gmail.com> Message-ID: +1 for 1.9 1.8.7 and 1.8.8 are backport releases with stuff they put in Ruby 1.9 AFAIK --- 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, Feb 12, 2010 at 6:00 AM, Jim Deville wrote: > I believe 1.9 includes most of the changes that are in 1.8.7 and 1.8.8. > > > > JD > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards > *Sent:* Thursday, February 11, 2010 5:17 PM > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] MRI 1.8.7 compatibility > > > > Personally I'd like the 1.8.7 library changes (The Enumerable module has a > bunch more useful stuff in 1.8.7) but beyond that I can't actually remember > what the changes were, so I don't really miss them :-) > > > > If IronRuby has 1.9.x compat, then the library changes would get pulled in > for that, so the 1.8.7 changes are probably not worth worrying about. > > > > On Fri, Feb 12, 2010 at 10:20 AM, Jim Deville > wrote: > > Along these lines: > > > > Are you interested in the 1.8.7 features, or just things like Rails compat > (which 1.9.x compat would give) > > > > JD > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards > *Sent:* Thursday, February 11, 2010 11:52 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] MRI 1.8.7 compatibility > > > > +1 ! > > Any idea how long after the 1.0 RTM we might start seeing 1.8.7 (or 1.9.x?) > compatibility? > > > _______________________________________________ > 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 Fri Feb 12 00:54:18 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Fri, 12 Feb 2010 05:54:18 +0000 Subject: [Ironruby-core] Code Review: SingletonOptimizations Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3CE86B53@TK5EX14MBXC124.redmond.corp.microsoft.com> tfpt review "/shelveset:SingletonOptimizations;REDMOND\tomat" Optimizes allocation of singletons. Module singletons could be allocated lazily. We used to eagerly allocate a singleton for each allocated RubyModule. This is only necessary for classes. Their singletons are chained in the inheritance hierarchy parallel to the hierarchy of the classes. A module doesn't have a super-class and thus we don't need to create a singleton for it unless it has some members. Consequently 2 modules of the same meta-module type with no singletons can share the same call-site rules. This sharing significantly improves RoR request time and reduces working set since the request processing code is using such modules. Also fixes a few related minor bugs. Previously: Initialized in 7.64449s 10000 requests: 337 requests per second Peak working set: 216MB Adaptively compiled: Initialized in 6.966271s 10000 requests: 1132 requests per second Peak working set: 91MB Compiled: Initialized in 26.106867s 10000 requests: 1243 requests per second Peak working set: 89MB MRI: Initialized in 2.82389s 10000 requests: 1623 requests per second Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: SingletonOptimizations.diff Type: application/octet-stream Size: 82586 bytes Desc: SingletonOptimizations.diff URL: From ivan at whiterabbitconsulting.eu Fri Feb 12 02:35:36 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Fri, 12 Feb 2010 08:35:36 +0100 Subject: [Ironruby-core] mono builds Message-ID: For those of you interested in mono-on-*nix-built-binaries for ironruby RC2. http://dl.dropbox.com/u/21717/ironruby-rc2.tar.bz2 http://dl.dropbox.com/u/21717/ironruby-rc2.tar.gz You need to either build the mono 2.6 branch from svn or mono from trunk to be able to build ironruby on *nix but you should be able to run it from mono 2.4.3.2 and up IIRC. --- 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 whiterabbitconsulting.eu Fri Feb 12 03:14:40 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Fri, 12 Feb 2010 09:14:40 +0100 Subject: [Ironruby-core] running some benchmarks In-Reply-To: <8E45365BECA665489F3CB8878A6C1B7D0C96865C@TK5EX14MBXC140.redmond.corp.microsoft.com> References: <8E45365BECA665489F3CB8878A6C1B7D0C96865C@TK5EX14MBXC140.redmond.corp.microsoft.com> Message-ID: I'll try it again for MRI. I don't get socket errors for MRI when I try to use it to push gems etc. On mac I get socket errors when trying to install gems. When I use that same version on ubuntu karmic it will tell me invalid path errors (this has been reported by somebody on codeplex). When I try to push gems on windows/mac/linux I get the Socket error. More about this in the bottom of this mail I get daily digests of the workitems on codeplex but haven't added any of those yet.. expect a flurry of bug submissions when I'm through :) installing gems on my mac +ivan at ivan-mbp:~ ? igem install -V --backtrace --debug caricature ERROR: While executing gem ... (NameError) uninitialized constant OpenSSL::SSL::SSLSocket :0:in `const_missing' /usr/local/cloudslide/ironruby/lib/ruby/1.8/net/http.rb:567:in `connect' /usr/local/cloudslide/ironruby/lib/ruby/1.8/net/http.rb:553:in `do_start' /usr/local/cloudslide/ironruby/lib/ruby/1.8/net/http.rb:548:in `start' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:246:in `connection_for' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:320:in `request' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:279:in `open_uri_or_path' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:164:in `fetch_path' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:219:in `load_specs' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:192:in `list' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:188:in `list' :0:in `each' mscorlib:0:in `CallSite.Target' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:123:in `find_matching' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:69:in `fetch' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:99:in `find_gems_with_sources' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:192:in `find_spec_by_name_and_version' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:213:in `install' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:118:in `execute' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in `execute' :0:in `each' mscorlib:0:in `CallSite.Target' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/command.rb:257:in `invoke' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:132:in `process_args' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:102:in `run' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:58:in `run' /usr/local/cloudslide/ironruby/bin/igem:25 +ivan at ivan-mbp:~ ? igem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.5 - RUBY VERSION: 1.8.6 (2009-03-31 patchlevel 368) [i386-linux] - INSTALLATION DIRECTORY: /usr/local/cloudslide/ironruby/lib/ironruby/gems/1.8 - RUBY EXECUTABLE: /usr/local/cloudslide/ironruby/bin/ir.exe - EXECUTABLE DIRECTORY: /usr/local/cloudslide/ironruby/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-60 - GEM PATHS: - /usr/local/cloudslide/ironruby/lib/ironruby/gems/1.8 - /Users/ivan/.gem/ironruby/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - :sources => ["https://user:password at gems.cloudslide.net", " http://gemcutter.org", "http://gems.rubyforge.org/", " http://gems.github.com/", "http://gems.opscode.com/"] - "gemcutter_key" => "blahblah" - REMOTE SOURCES: - https://user:password at gems.cloudslide.net - http://gemcutter.org - http://gems.rubyforge.org/ - http://gems.github.com/ - http://gems.opscode.com/ When I remove the line that uses https:// from the sources I don't get the socket error anymore because it doesn't need it anymore. That would also explain why I get different errors on the ubuntu box, the one I use for building and testing ironruby doesn't need the https:// source. After removing that source this is the result: ? igem install -V caricature GET 302 Found: http://gemcutter.org/latest_specs.4.8.gz GET 304 Not Modified: http://production.s3.rubygems.org/latest_specs.4.8.gz GET 302 Found: http://gems.rubyforge.org/latest_specs.4.8.gz GET 304 Not Modified: http://production.s3.rubygems.org/latest_specs.4.8.gz GET 200 OK: http://gems.github.com/latest_specs.4.8.gz GET 304 Not Modified: http://gems.opscode.com/latest_specs.4.8.gz Installing gem uuidtools-2.1.1 ERROR: While executing gem ... (ArgumentError) Invalid path mscorlib:0:in `GetDirectoryName' :0:in `mkdir' /usr/local/cloudslide/ironruby/lib/ruby/1.8/fileutils.rb:217:in `mkdir_p' /usr/local/cloudslide/ironruby/lib/ruby/1.8/fileutils.rb:215:in `mkdir_p' :0:in `reverse_each' mscorlib:0:in `CallSite.Target' /usr/local/cloudslide/ironruby/lib/ruby/1.8/fileutils.rb:201:in `mkdir_p' :0:in `each' mscorlib:0:in `CallSite.Target' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:125:in `initialize' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:239:in `install' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:222:in `install' :0:in `each' mscorlib:0:in `CallSite.Target' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:118:in `execute' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in `execute' :0:in `each' mscorlib:0:in `CallSite.Target' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/command.rb:257:in `invoke' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:132:in `process_args' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:102:in `run' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:58:in `run' /usr/local/cloudslide/ironruby/bin/igem:25 content of ir script (this should take care of mapping windows-isms to unix-isms with regards to casing as well as / and \ issues) ? cat /usr/local/cloudslide/ironruby/bin/ir #!/usr/bin/env sh fpath=`which $0` fdir=`dirname $fpath` export MONO_IOMAP=all export MONO_MANAGED_WATCHER=1 mono $fdir/ir.exe $* --- 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, Feb 11, 2010 at 11:43 PM, Shri Borde wrote: > What problem does "gem sources -a" have with %HOME%? Does MRI have the > same problem? If %HOME% is not set, IronRuby and MRI should both use the > same algorithm to figure out the return value of File.expand_path("~") based > on other environment variables like %USERPROFILE%. > > Do you get the SocketError with MRI? You could try running "gem install" > and "gem uninstall" in a loop with MRI to see if its an issue with the > machine configuration itself. > > I do have a fix for the OpenSSL issue. It does get more active_resource > tests working. However, I am not sure if it is sufficient to unblock your > scenarios. > > ------------------------------ > *From:* ironruby-core-bounces at rubyforge.org [ > ironruby-core-bounces at rubyforge.org] on behalf of Ivan Porto Carrero [ > ivan at whiterabbitconsulting.eu] > *Sent:* Thursday, February 11, 2010 10:37 AM > *To:* ironruby-core > *Subject:* [Ironruby-core] running some benchmarks > > Hi > > I'm currently helping David m. Peterson by setting up 2 windows boxes > with ironruby and running a few benchmarks and tests with it. > For example I'm going to try running a few of the complexer rails apps and > see how it holds up, i'm thinking about spree and redmine atm. > We'll also run the ruby shootout suite, if you have more suggestions > they're welcome. > > The machines are hosted on EC2. > > However using gem sources -a proves to be a little difficult if you don't > have the %HOME% environment variable set. > on the both machines I could set %HOME%=%USERPROFILE% in the environment > variables to remedy this, but I feel like this is something that should be > handled by the installer or by the ironruby gem library. > > I couldn't use the installer in windows 2003 R2 SP2 telling me I needed a > higher service pack for my windows, but there is no higher one when I wanted > to get that one. > > I also ran into issues installing a bunch of gems at once. Below the > rails gem is the one causing trouble. The problems for the rails gem go away > after I installed the gemcutter gem (?), but then it fails on the > rspec-rails gem with the same error. If I then remove rails from the list of > gems to install everything installs fine. > > D:\Console2>ir -S gem install caricature rails rspec-rails shoulda > test-unit ZenTest ironruby-sqlite3 ironruby-sqlserver > Successfully installed uuidtools-2.1.1 > Successfully installed caricature-0.7.6 > ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) > SocketError: An established connection was aborted by the software in > your host machine (http://gemcutter.org/gems/rake-0.8.7.gem) > > D:\Console2>ir -S gem install rails rspec-rails shoulda test-unit ZenTest > ironruby-sqlite3 ironruby-sqlserver > ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) > SocketError: An established connection was aborted by the software in > your host machine (http://gemcutter.org/gems/rack-1.0.1.gem) > > D:\Console2>ir -S gem env > RubyGems Environment: > - RUBYGEMS VERSION: 1.3.5 > - RUBY VERSION: 1.8.6 (2009-03-31 patchlevel 368) [i386-mswin32] > - INSTALLATION DIRECTORY: D:/ironruby/lib/ironruby/gems/1.8 > - RUBY EXECUTABLE: D:/ironruby/bin/ir.exe > - EXECUTABLE DIRECTORY: D:/ironruby/bin > - RUBYGEMS PLATFORMS: > - ruby > - x86-mswin32-60 > - GEM PATHS: > - D:/ironruby/lib/ironruby/gems/1.8 > - C:/Users/casualjim/.gem/ironruby/1.8 > - GEM CONFIGURATION: > - :update_sources => true > - :verbose => true > - :benchmark => false > - :backtrace => false > - :bulk_threshold => 1000 > - :sources => ["http://gemcutter.org"] > - REMOTE SOURCES: > - http://gemcutter.org > > > Additionally on windows 2003 ironruby can't find gem.bat and I did set > the necessary environment variables. PATH, HOME. install > > D:\Console2>ir -S gem install caricature rails rspec-rails shoulda > test-unit ZenTest ironruby-sqlite3 ironruby-sqlserver > unknown: Could not find file 'D:\Console2\gem'. (Errno::ENOENT) > > > D:\Console2>ir -v > IronRuby 0.9.4.0 on .NET 2.0.50727.3603 > Copyright (c) Microsoft Corporation. All rights reserved. > > >>> exit > > > Apart from the issues above, I'm unable to push gems to gemcutter with > ironruby it fails with an OpenSSL error. The same error I get on my mac when > I want to install gems with ironruby. > > I'll keep you updated as I make more progress and/or come across more > issues. > --- > 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 ironruby at monnet-usa.com Fri Feb 12 07:15:57 2010 From: ironruby at monnet-usa.com (Philippe Monnet) Date: Fri, 12 Feb 2010 05:15:57 -0700 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> <7c1b59c01002111717s48a4c056s38b4955d1b3426f0@mail.gmail.com> Message-ID: <4B75467D.6060402@monnet-usa.com> An HTML attachment was scrubbed... URL: From michaelerasmus at gmail.com Fri Feb 12 08:17:40 2010 From: michaelerasmus at gmail.com (Michael Erasmus) Date: Fri, 12 Feb 2010 15:17:40 +0200 Subject: [Ironruby-core] Calling a C# method with a byref parameter In-Reply-To: References: <2b9e55761002110544l40a2fdf9r1ebe907c23570ba2@mail.gmail.com> <2b9e55761002110644o3ff5be7ftf1cba78d8880d218@mail.gmail.com> Message-ID: <2b9e55761002120517w7737239ap9ccde841597327db@mail.gmail.com> Ok, thanks Jim. I have filed a bug here: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3934 I also noticed that event when using the form method(:name).Of(String).Call(param) If you're calling a protected method from a derived class like this you'll get a ArgumentError. On Thu, Feb 11, 2010 at 7:56 PM, Ryan Riley wrote: > On what types will IR be able to infer the types? Is that documented on the > site and I just didn't see it? > > Ryan Riley > > > > On Thu, Feb 11, 2010 at 9:55 AM, Jim Deville wrote: > >> That call actually should (usually) be able to infer the type. Please file >> a bug on codeplex that Generic Type inference isn?t working with ByRef >> types. >> >> >> >> JD >> >> >> >> *From:* ironruby-core-bounces at rubyforge.org [mailto: >> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Shay Friedman >> *Sent:* Thursday, February 11, 2010 6:53 AM >> *To:* ironruby-core at rubyforge.org >> *Subject:* Re: [Ironruby-core] Calling a C# method with a byref parameter >> >> >> >> You should call generic methods a bit differently. >> >> >> >> The next code works: >> >> ret_val = c.method(:do_something_else).of(String).call(str) >> >> >> >> Shay. >> >> -------------------------------------------------------- >> Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | >> Sela Technology Center >> Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay >> >> On Thu, Feb 11, 2010 at 4:44 PM, Michael Erasmus < >> michaelerasmus at gmail.com> wrote: >> >> Thanks Shay. >> >> >> >> OK your code works. But my trouble seems to come in with the Generic >> method. >> >> >> >> When I do: >> >> >> >> public class Class1 >> >> { >> >> public string DoSomething(ref string test) >> >> { >> >> test = test + "tamtamtam"; >> >> >> >> return "return value"; >> >> } >> >> >> >> public string DoSomethingElse(ref T test) >> >> { >> >> return test.ToString(); >> >> } >> >> } >> >> >> >> and then call it from IR: >> >> >> >> >> >> >>> c = TestClass::Class1.new >> >> => TestClass.Class1 >> >> >>> c.do_something("Bla") >> >> => ['return value', 'Blatamtamtam'] >> >> >>> c.do_something_else("Bla") >> >> Microsoft.Scripting.Core:0:in `Bind': Expression of type >> 'IronRuby.Builtins.Muta >> >> bleString&' cannot be used for parameter of type >> 'IronRuby.Builtins.MutableStrin >> >> g' of method 'System.String >> DoSomethingElse[MutableString](IronRuby.Builtins.Mut >> >> ableString ByRef)' (ArgumentError) >> >> from Microsoft.Scripting.Core:0:in `BindCore' >> >> from :0 >> >> >> >> >> >> >> >> >> >> On Thu, Feb 11, 2010 at 4:12 PM, Shay Friedman >> wrote: >> >> It returns another return value with the new ref value. >> >> >> >> For example, if you have the next c# class: >> >> public class Class1 >> >> { >> >> public string DoSomething(ref string test) >> >> { >> >> test = test + "tamtamtam"; >> >> >> >> return "return value"; >> >> } >> >> } >> >> >> >> This is the IronRuby code you can write to use it: >> >> >>> require 'c:\dev\TestApps\TestClass\TestClass\bin\Debug\TestClass.dll' >> >> => true >> >> >>> c = Class1.new >> >> => TestClass.Class1 >> >> >>> str = "hello" >> >> => "hello" >> >> >>> result = c.do_something(str) >> >> => ['return value', 'hellotamtamtam'] >> >> >> >> Pay attention that the result variable is an array that contains the >> method return value as the first item and the ref value as the second >> parameter. >> >> >> >> Shay. >> >> -------------------------------------------------------- >> Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | >> Sela Technology Center >> Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay >> >> On Thu, Feb 11, 2010 at 3:44 PM, Michael Erasmus < >> michaelerasmus at gmail.com> wrote: >> >> Hi Everyone, >> >> >> >> I'm trying to write a IronRuby script that interops with a a .NET assembly >> written in C#. >> >> >> >> It has a class that derives from a base class in the .NET assembly. One of >> the base class protected methods looks like this: >> >> >> >> protected void OnNotifyPropertyChanged(string name, ref T localmember, >> T value) >> >> { >> >> ...... >> >> } >> >> >> >> I can't for the life of me figure out how to call this method from IR in >> my derived class. >> >> The documentation mentions that you can call *out *parameters without >> using them as arguments, but I can't seem to find anything about *ref * >> params. >> >> >> >> If I just try calling the method like this: >> >> >> >> OnNotifyPropertyChanged(property_name, value, value) >> >> >> >> I get this error: >> >> >> >> *Microsoft.Scripting.Core:0:in `Bind': Expression of type >> 'IronRuby.Builtins.Muta* >> >> *bleString&' cannot be used for parameter of type >> 'IronRuby.Builtins.MutableStrin* >> >> *g' of method 'Void >> #base#OnNotifyPropertyChanged[MutableString](System.String, I* >> >> *ronRuby.Builtins.MutableString ByRef, IronRuby.Builtins.MutableString)' >> (Argumen* >> >> *tError)* >> >> * from Microsoft.Scripting.Core:0:in `BindCore'* >> >> * from ./dynamic_event_item.rb:22:in `method_missing'* >> >> * from :0* >> >> >> >> >> >> Am I missing something? >> >> >> >> Thanks >> >> >> >> Michael Erasmus >> >> >> >> >> >> _______________________________________________ >> 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 >> >> > > _______________________________________________ > 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 Fri Feb 12 12:06:02 2010 From: jdeville at microsoft.com (Jim Deville) Date: Fri, 12 Feb 2010 17:06:02 +0000 Subject: [Ironruby-core] Calling a C# method with a byref parameter In-Reply-To: References: <2b9e55761002110544l40a2fdf9r1ebe907c23570ba2@mail.gmail.com> <2b9e55761002110644o3ff5be7ftf1cba78d8880d218@mail.gmail.com> Message-ID: Generic type inference should work like it does in C#. I?ll get some more tests in there and get Jimmy to update the docs. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, February 11, 2010 9:56 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Calling a C# method with a byref parameter On what types will IR be able to infer the types? Is that documented on the site and I just didn't see it? Ryan Riley On Thu, Feb 11, 2010 at 9:55 AM, Jim Deville > wrote: That call actually should (usually) be able to infer the type. Please file a bug on codeplex that Generic Type inference isn?t working with ByRef types. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Thursday, February 11, 2010 6:53 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Calling a C# method with a byref parameter You should call generic methods a bit differently. The next code works: ret_val = c.method(:do_something_else).of(String).call(str) Shay. -------------------------------------------------------- Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | Sela Technology Center Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay On Thu, Feb 11, 2010 at 4:44 PM, Michael Erasmus > wrote: Thanks Shay. OK your code works. But my trouble seems to come in with the Generic method. When I do: public class Class1 { public string DoSomething(ref string test) { test = test + "tamtamtam"; return "return value"; } public string DoSomethingElse(ref T test) { return test.ToString(); } } and then call it from IR: >>> c = TestClass::Class1.new => TestClass.Class1 >>> c.do_something("Bla") => ['return value', 'Blatamtamtam'] >>> c.do_something_else("Bla") Microsoft.Scripting.Core:0:in `Bind': Expression of type 'IronRuby.Builtins.Muta bleString&' cannot be used for parameter of type 'IronRuby.Builtins.MutableStrin g' of method 'System.String DoSomethingElse[MutableString](IronRuby.Builtins.Mut ableString ByRef)' (ArgumentError) from Microsoft.Scripting.Core:0:in `BindCore' from :0 On Thu, Feb 11, 2010 at 4:12 PM, Shay Friedman > wrote: It returns another return value with the new ref value. For example, if you have the next c# class: public class Class1 { public string DoSomething(ref string test) { test = test + "tamtamtam"; return "return value"; } } This is the IronRuby code you can write to use it: >>> require 'c:\dev\TestApps\TestClass\TestClass\bin\Debug\TestClass.dll' => true >>> c = Class1.new => TestClass.Class1 >>> str = "hello" => "hello" >>> result = c.do_something(str) => ['return value', 'hellotamtamtam'] Pay attention that the result variable is an array that contains the method return value as the first item and the ref value as the second parameter. Shay. -------------------------------------------------------- Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | Sela Technology Center Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay On Thu, Feb 11, 2010 at 3:44 PM, Michael Erasmus > wrote: Hi Everyone, I'm trying to write a IronRuby script that interops with a a .NET assembly written in C#. It has a class that derives from a base class in the .NET assembly. One of the base class protected methods looks like this: protected void OnNotifyPropertyChanged(string name, ref T localmember, T value) { ...... } I can't for the life of me figure out how to call this method from IR in my derived class. The documentation mentions that you can call out parameters without using them as arguments, but I can't seem to find anything about ref params. If I just try calling the method like this: OnNotifyPropertyChanged(property_name, value, value) I get this error: Microsoft.Scripting.Core:0:in `Bind': Expression of type 'IronRuby.Builtins.Muta bleString&' cannot be used for parameter of type 'IronRuby.Builtins.MutableStrin g' of method 'Void #base#OnNotifyPropertyChanged[MutableString](System.String, I ronRuby.Builtins.MutableString ByRef, IronRuby.Builtins.MutableString)' (Argumen tError) from Microsoft.Scripting.Core:0:in `BindCore' from ./dynamic_event_item.rb:22:in `method_missing' from :0 Am I missing something? Thanks Michael Erasmus _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Fri Feb 12 15:20:49 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Fri, 12 Feb 2010 20:20:49 +0000 Subject: [Ironruby-core] Calling a C# method with a byref parameter In-Reply-To: References: <2b9e55761002110544l40a2fdf9r1ebe907c23570ba2@mail.gmail.com> <2b9e55761002110644o3ff5be7ftf1cba78d8880d218@mail.gmail.com> , Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C969166@TK5EX14MBXC140.redmond.corp.microsoft.com> About documentation, the bottom of http://ironpython.net/documentation/dotnet/ has this placeholder :( Appendix - Rules for Type parameter inference while invoking generic methods TODO Jim, Dino had added tests for IronPython, and you should be able to leverage those for IronRuby http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3395 also tracks the issues with generic inference. ________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of Jim Deville [jdeville at microsoft.com] Sent: Friday, February 12, 2010 9:06 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Calling a C# method with a byref parameter Generic type inference should work like it does in C#. I?ll get some more tests in there and get Jimmy to update the docs. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, February 11, 2010 9:56 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Calling a C# method with a byref parameter On what types will IR be able to infer the types? Is that documented on the site and I just didn't see it? Ryan Riley On Thu, Feb 11, 2010 at 9:55 AM, Jim Deville > wrote: That call actually should (usually) be able to infer the type. Please file a bug on codeplex that Generic Type inference isn?t working with ByRef types. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Shay Friedman Sent: Thursday, February 11, 2010 6:53 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Calling a C# method with a byref parameter You should call generic methods a bit differently. The next code works: ret_val = c.method(:do_something_else).of(String).call(str) Shay. -------------------------------------------------------- Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | Sela Technology Center Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay On Thu, Feb 11, 2010 at 4:44 PM, Michael Erasmus > wrote: Thanks Shay. OK your code works. But my trouble seems to come in with the Generic method. When I do: public class Class1 { public string DoSomething(ref string test) { test = test + "tamtamtam"; return "return value"; } public string DoSomethingElse(ref T test) { return test.ToString(); } } and then call it from IR: >>> c = TestClass::Class1.new => TestClass.Class1 >>> c.do_something("Bla") => ['return value', 'Blatamtamtam'] >>> c.do_something_else("Bla") Microsoft.Scripting.Core:0:in `Bind': Expression of type 'IronRuby.Builtins.Muta bleString&' cannot be used for parameter of type 'IronRuby.Builtins.MutableStrin g' of method 'System.String DoSomethingElse[MutableString](IronRuby.Builtins.Mut ableString ByRef)' (ArgumentError) from Microsoft.Scripting.Core:0:in `BindCore' from :0 On Thu, Feb 11, 2010 at 4:12 PM, Shay Friedman > wrote: It returns another return value with the new ref value. For example, if you have the next c# class: public class Class1 { public string DoSomething(ref string test) { test = test + "tamtamtam"; return "return value"; } } This is the IronRuby code you can write to use it: >>> require 'c:\dev\TestApps\TestClass\TestClass\bin\Debug\TestClass.dll' => true >>> c = Class1.new => TestClass.Class1 >>> str = "hello" => "hello" >>> result = c.do_something(str) => ['return value', 'hellotamtamtam'] Pay attention that the result variable is an array that contains the method return value as the first item and the ref value as the second parameter. Shay. -------------------------------------------------------- Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | Sela Technology Center Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay On Thu, Feb 11, 2010 at 3:44 PM, Michael Erasmus > wrote: Hi Everyone, I'm trying to write a IronRuby script that interops with a a .NET assembly written in C#. It has a class that derives from a base class in the .NET assembly. One of the base class protected methods looks like this: protected void OnNotifyPropertyChanged(string name, ref T localmember, T value) { ...... } I can't for the life of me figure out how to call this method from IR in my derived class. The documentation mentions that you can call out parameters without using them as arguments, but I can't seem to find anything about ref params. If I just try calling the method like this: OnNotifyPropertyChanged(property_name, value, value) I get this error: Microsoft.Scripting.Core:0:in `Bind': Expression of type 'IronRuby.Builtins.Muta bleString&' cannot be used for parameter of type 'IronRuby.Builtins.MutableStrin g' of method 'Void #base#OnNotifyPropertyChanged[MutableString](System.String, I ronRuby.Builtins.MutableString ByRef, IronRuby.Builtins.MutableString)' (Argumen tError) from Microsoft.Scripting.Core:0:in `BindCore' from ./dynamic_event_item.rb:22:in `method_missing' from :0 Am I missing something? Thanks Michael Erasmus _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Shri.Borde at microsoft.com Fri Feb 12 15:21:19 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Fri, 12 Feb 2010 20:21:19 +0000 Subject: [Ironruby-core] running some benchmarks In-Reply-To: References: <8E45365BECA665489F3CB8878A6C1B7D0C96865C@TK5EX14MBXC140.redmond.corp.microsoft.com>, Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C96919B@TK5EX14MBXC140.redmond.corp.microsoft.com> Yup, opening bugs will be great. The https issue may not be fixed for 1.0. Like I had mentioned in another email, it may be possible to port SSL functionality from IronPython, but we may not get to it for 1.0. The mkdir issue should be easy to fix. If you can figure out the input to mkdir (monkeypatch mkdir to print its input and call the original method), that will help ensure that we fix the exact scenario you are running into. ________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of Ivan Porto Carrero [ivan at whiterabbitconsulting.eu] Sent: Friday, February 12, 2010 12:14 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] running some benchmarks I'll try it again for MRI. I don't get socket errors for MRI when I try to use it to push gems etc. On mac I get socket errors when trying to install gems. When I use that same version on ubuntu karmic it will tell me invalid path errors (this has been reported by somebody on codeplex). When I try to push gems on windows/mac/linux I get the Socket error. More about this in the bottom of this mail I get daily digests of the workitems on codeplex but haven't added any of those yet.. expect a flurry of bug submissions when I'm through :) installing gems on my mac +ivan at ivan-mbp:~ ? igem install -V --backtrace --debug caricature ERROR: While executing gem ... (NameError) uninitialized constant OpenSSL::SSL::SSLSocket :0:in `const_missing' /usr/local/cloudslide/ironruby/lib/ruby/1.8/net/http.rb:567:in `connect' /usr/local/cloudslide/ironruby/lib/ruby/1.8/net/http.rb:553:in `do_start' /usr/local/cloudslide/ironruby/lib/ruby/1.8/net/http.rb:548:in `start' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:246:in `connection_for' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:320:in `request' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:279:in `open_uri_or_path' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:164:in `fetch_path' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:219:in `load_specs' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:192:in `list' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:188:in `list' :0:in `each' mscorlib:0:in `CallSite.Target' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:123:in `find_matching' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:69:in `fetch' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:99:in `find_gems_with_sources' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:192:in `find_spec_by_name_and_version' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:213:in `install' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:118:in `execute' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in `execute' :0:in `each' mscorlib:0:in `CallSite.Target' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/command.rb:257:in `invoke' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:132:in `process_args' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:102:in `run' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:58:in `run' /usr/local/cloudslide/ironruby/bin/igem:25 +ivan at ivan-mbp:~ ? igem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.5 - RUBY VERSION: 1.8.6 (2009-03-31 patchlevel 368) [i386-linux] - INSTALLATION DIRECTORY: /usr/local/cloudslide/ironruby/lib/ironruby/gems/1.8 - RUBY EXECUTABLE: /usr/local/cloudslide/ironruby/bin/ir.exe - EXECUTABLE DIRECTORY: /usr/local/cloudslide/ironruby/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-60 - GEM PATHS: - /usr/local/cloudslide/ironruby/lib/ironruby/gems/1.8 - /Users/ivan/.gem/ironruby/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - :sources => ["https://user:password at gems.cloudslide.net", "http://gemcutter.org", "http://gems.rubyforge.org/", "http://gems.github.com/", "http://gems.opscode.com/"] - "gemcutter_key" => "blahblah" - REMOTE SOURCES: - https://user:password at gems.cloudslide.net - http://gemcutter.org - http://gems.rubyforge.org/ - http://gems.github.com/ - http://gems.opscode.com/ When I remove the line that uses https:// from the sources I don't get the socket error anymore because it doesn't need it anymore. That would also explain why I get different errors on the ubuntu box, the one I use for building and testing ironruby doesn't need the https:// source. After removing that source this is the result: ? igem install -V caricature GET 302 Found: http://gemcutter.org/latest_specs.4.8.gz GET 304 Not Modified: http://production.s3.rubygems.org/latest_specs.4.8.gz GET 302 Found: http://gems.rubyforge.org/latest_specs.4.8.gz GET 304 Not Modified: http://production.s3.rubygems.org/latest_specs.4.8.gz GET 200 OK: http://gems.github.com/latest_specs.4.8.gz GET 304 Not Modified: http://gems.opscode.com/latest_specs.4.8.gz Installing gem uuidtools-2.1.1 ERROR: While executing gem ... (ArgumentError) Invalid path mscorlib:0:in `GetDirectoryName' :0:in `mkdir' /usr/local/cloudslide/ironruby/lib/ruby/1.8/fileutils.rb:217:in `mkdir_p' /usr/local/cloudslide/ironruby/lib/ruby/1.8/fileutils.rb:215:in `mkdir_p' :0:in `reverse_each' mscorlib:0:in `CallSite.Target' /usr/local/cloudslide/ironruby/lib/ruby/1.8/fileutils.rb:201:in `mkdir_p' :0:in `each' mscorlib:0:in `CallSite.Target' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:125:in `initialize' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:239:in `install' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:222:in `install' :0:in `each' mscorlib:0:in `CallSite.Target' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:118:in `execute' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in `execute' :0:in `each' mscorlib:0:in `CallSite.Target' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/command.rb:257:in `invoke' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:132:in `process_args' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:102:in `run' /usr/local/cloudslide/ironruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:58:in `run' /usr/local/cloudslide/ironruby/bin/igem:25 content of ir script (this should take care of mapping windows-isms to unix-isms with regards to casing as well as / and \ issues) ? cat /usr/local/cloudslide/ironruby/bin/ir #!/usr/bin/env sh fpath=`which $0` fdir=`dirname $fpath` export MONO_IOMAP=all export MONO_MANAGED_WATCHER=1 mono $fdir/ir.exe $* --- 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, Feb 11, 2010 at 11:43 PM, Shri Borde > wrote: What problem does "gem sources -a" have with %HOME%? Does MRI have the same problem? If %HOME% is not set, IronRuby and MRI should both use the same algorithm to figure out the return value of File.expand_path("~") based on other environment variables like %USERPROFILE%. Do you get the SocketError with MRI? You could try running "gem install" and "gem uninstall" in a loop with MRI to see if its an issue with the machine configuration itself. I do have a fix for the OpenSSL issue. It does get more active_resource tests working. However, I am not sure if it is sufficient to unblock your scenarios. ________________________________ From: ironruby-core-bounces at rubyforge.org [ironruby-core-bounces at rubyforge.org] on behalf of Ivan Porto Carrero [ivan at whiterabbitconsulting.eu] Sent: Thursday, February 11, 2010 10:37 AM To: ironruby-core Subject: [Ironruby-core] running some benchmarks Hi I'm currently helping David m. Peterson by setting up 2 windows boxes with ironruby and running a few benchmarks and tests with it. For example I'm going to try running a few of the complexer rails apps and see how it holds up, i'm thinking about spree and redmine atm. We'll also run the ruby shootout suite, if you have more suggestions they're welcome. The machines are hosted on EC2. However using gem sources -a proves to be a little difficult if you don't have the %HOME% environment variable set. on the both machines I could set %HOME%=%USERPROFILE% in the environment variables to remedy this, but I feel like this is something that should be handled by the installer or by the ironruby gem library. I couldn't use the installer in windows 2003 R2 SP2 telling me I needed a higher service pack for my windows, but there is no higher one when I wanted to get that one. I also ran into issues installing a bunch of gems at once. Below the rails gem is the one causing trouble. The problems for the rails gem go away after I installed the gemcutter gem (?), but then it fails on the rspec-rails gem with the same error. If I then remove rails from the list of gems to install everything installs fine. D:\Console2>ir -S gem install caricature rails rspec-rails shoulda test-unit ZenTest ironruby-sqlite3 ironruby-sqlserver Successfully installed uuidtools-2.1.1 Successfully installed caricature-0.7.6 ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SocketError: An established connection was aborted by the software in your host machine (http://gemcutter.org/gems/rake-0.8.7.gem) D:\Console2>ir -S gem install rails rspec-rails shoulda test-unit ZenTest ironruby-sqlite3 ironruby-sqlserver ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SocketError: An established connection was aborted by the software in your host machine (http://gemcutter.org/gems/rack-1.0.1.gem) D:\Console2>ir -S gem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.5 - RUBY VERSION: 1.8.6 (2009-03-31 patchlevel 368) [i386-mswin32] - INSTALLATION DIRECTORY: D:/ironruby/lib/ironruby/gems/1.8 - RUBY EXECUTABLE: D:/ironruby/bin/ir.exe - EXECUTABLE DIRECTORY: D:/ironruby/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-60 - GEM PATHS: - D:/ironruby/lib/ironruby/gems/1.8 - C:/Users/casualjim/.gem/ironruby/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - :sources => ["http://gemcutter.org"] - REMOTE SOURCES: - http://gemcutter.org Additionally on windows 2003 ironruby can't find gem.bat and I did set the necessary environment variables. PATH, HOME. install D:\Console2>ir -S gem install caricature rails rspec-rails shoulda test-unit ZenTest ironruby-sqlite3 ironruby-sqlserver unknown: Could not find file 'D:\Console2\gem'. (Errno::ENOENT) D:\Console2>ir -v IronRuby 0.9.4.0 on .NET 2.0.50727.3603 Copyright (c) Microsoft Corporation. All rights reserved. >>> exit Apart from the issues above, I'm unable to push gems to gemcutter with ironruby it fails with an OpenSSL error. The same error I get on my mac when I want to install gems with ironruby. I'll keep you updated as I make more progress and/or come across more issues. --- 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 Fri Feb 12 18:01:40 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Fri, 12 Feb 2010 23:01:40 +0000 Subject: [Ironruby-core] Code Review: ActiveRecord fix Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C96937F@TK5EX14MBXC140.redmond.corp.microsoft.com> tfpt review "/shelveset:ar;REDMOND\sborde" Comment : remove_const was not returning the old value in some cases -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ar.diff Type: application/octet-stream Size: 20968 bytes Desc: ar.diff URL: From Shri.Borde at microsoft.com Fri Feb 12 18:03:45 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Fri, 12 Feb 2010 23:03:45 +0000 Subject: [Ironruby-core] ActiveRecord tests status Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C96942A@TK5EX14MBXC140.redmond.corp.microsoft.com> This fix brings the ActiveRecord test pass rate to 98% with SQLServer. Only 54 out of 2300 tests are now disabled! From: Shri Borde Sent: Friday, February 12, 2010 3:02 PM To: IronRuby External Code Reviewers Cc: 'ironruby-core at rubyforge.org' Subject: Code Review: ActiveRecord fix tfpt review "/shelveset:ar;REDMOND\sborde" Comment : remove_const was not returning the old value in some cases -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Fri Feb 12 20:20:14 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 13 Feb 2010 01:20:14 +0000 Subject: [Ironruby-core] Code Review: ActiveRecord fix In-Reply-To: <8E45365BECA665489F3CB8878A6C1B7D0C96937F@TK5EX14MBXC140.redmond.corp.microsoft.com> References: <8E45365BECA665489F3CB8878A6C1B7D0C96937F@TK5EX14MBXC140.redmond.corp.microsoft.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3DB1E718@TK5EX14MBXC122.redmond.corp.microsoft.com> Looks good. Tomas From: Shri Borde Sent: Friday, February 12, 2010 3:02 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: ActiveRecord fix tfpt review "/shelveset:ar;REDMOND\sborde" Comment : remove_const was not returning the old value in some cases -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark at markrendle.net Sat Feb 13 04:21:13 2010 From: mark at markrendle.net (Mark Rendle) Date: Sat, 13 Feb 2010 09:21:13 +0000 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> Message-ID: <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> Mainly Rails 3.0 compatibility. I'd far rather 1.9.x than 1.8.7, but not at the expense of Rails compatibility taking longer. Mark On Thu, Feb 11, 2010 at 9:20 PM, Jim Deville wrote: > Along these lines: > > > > Are you interested in the 1.8.7 features, or just things like Rails compat > (which 1.9.x compat would give) > > > > JD > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards > *Sent:* Thursday, February 11, 2010 11:52 AM > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] MRI 1.8.7 compatibility > > > > +1 ! > > Any idea how long after the 1.0 RTM we might start seeing 1.8.7 (or 1.9.x?) > compatibility? > > > _______________________________________________ > 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 ryan.riley at panesofglass.org Sun Feb 14 09:12:38 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Sun, 14 Feb 2010 08:12:38 -0600 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> Message-ID: +1 for 1.9 Once you consider that by the time IronRuby claims 1.8.7 compat Ruby will likely have a 1.8.9, I think going for 1.9 just makes the most sense. Everything else is moving or has moved to 1.9, so I'd rather see that happen. Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Sat, Feb 13, 2010 at 3:21 AM, Mark Rendle wrote: > Mainly Rails 3.0 compatibility. I'd far rather 1.9.x than 1.8.7, but not at > the expense of Rails compatibility taking longer. > > Mark > > On Thu, Feb 11, 2010 at 9:20 PM, Jim Deville wrote: > >> Along these lines: >> >> >> >> Are you interested in the 1.8.7 features, or just things like Rails compat >> (which 1.9.x compat would give) >> >> >> >> JD >> >> >> >> *From:* ironruby-core-bounces at rubyforge.org [mailto: >> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards >> *Sent:* Thursday, February 11, 2010 11:52 AM >> >> *To:* ironruby-core at rubyforge.org >> *Subject:* Re: [Ironruby-core] MRI 1.8.7 compatibility >> >> >> >> +1 ! >> >> Any idea how long after the 1.0 RTM we might start seeing 1.8.7 (or >> 1.9.x?) compatibility? >> >> >> _______________________________________________ >> 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 orion.edwards at gmail.com Sun Feb 14 16:18:54 2010 From: orion.edwards at gmail.com (Orion Edwards) Date: Mon, 15 Feb 2010 10:18:54 +1300 Subject: [Ironruby-core] Threading model Message-ID: <7c1b59c01002141318jd4c95c3q14c8628807668804@mail.gmail.com> Here is what I *think* happens: - Thread.new and the other ruby threading methods from the ruby standard library will create and run on new CLR threads, but there is 'global interpreter lock' type thing to emulate MRI - I can sidestep the GIL by explicitly using underlying CLR threading methods This is based entirely on speculation and "I thought I saw something about it once upon a time" Is there a page that explains what the threading model of IronRuby is? I would be happy to write one up on the wiki, but I have no idea what is actually going on. Thanks, Orion. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Sun Feb 14 17:17:20 2010 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Sun, 14 Feb 2010 22:17:20 +0000 Subject: [Ironruby-core] Threading model In-Reply-To: <7c1b59c01002141318jd4c95c3q14c8628807668804@mail.gmail.com> References: <7c1b59c01002141318jd4c95c3q14c8628807668804@mail.gmail.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC92046102F4@TK5EX14MBXC136.redmond.corp.microsoft.com> IronRuby maps Ruby's green threads directly to CLR threads, and there is no GIL. The best documentation is just to look through IronRuby.Builtins.ThreadOps =P. Here's the first comment: /// Ruby threads are represented by CLR thread objects (System.Threading.Thread). /// Ruby 1.8.N has green threads where the language does the thread scheduling. /// We map the green threads directly to CLR threads. ~js From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Sunday, February 14, 2010 1:19 PM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Threading model Here is what I *think* happens: - Thread.new and the other ruby threading methods from the ruby standard library will create and run on new CLR threads, but there is 'global interpreter lock' type thing to emulate MRI - I can sidestep the GIL by explicitly using underlying CLR threading methods This is based entirely on speculation and "I thought I saw something about it once upon a time" Is there a page that explains what the threading model of IronRuby is? I would be happy to write one up on the wiki, but I have no idea what is actually going on. Thanks, Orion. -------------- next part -------------- An HTML attachment was scrubbed... URL: From orion.edwards at gmail.com Sun Feb 14 21:59:48 2010 From: orion.edwards at gmail.com (Orion Edwards) Date: Mon, 15 Feb 2010 15:59:48 +1300 Subject: [Ironruby-core] Threading model In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC92046102F4@TK5EX14MBXC136.redmond.corp.microsoft.com> References: <7c1b59c01002141318jd4c95c3q14c8628807668804@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC92046102F4@TK5EX14MBXC136.redmond.corp.microsoft.com> Message-ID: <7c1b59c01002141859q3b9c5dbfucc79f62119a5edab@mail.gmail.com> On Mon, Feb 15, 2010 at 11:17 AM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > IronRuby maps Ruby?s green threads directly to CLR threads, and there is no > GIL. > Holy race conditions, batman! I'll be a lot more careful calling Thread.new now :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From shay.friedman at gmail.com Mon Feb 15 04:46:15 2010 From: shay.friedman at gmail.com (Shay Friedman) Date: Mon, 15 Feb 2010 11:46:15 +0200 Subject: [Ironruby-core] [ANN] IronRuby Unleashed Message-ID: Hi all! I'm very excited to announce that the book IronRuby Unleashed has been released! The book was written by me and was reviewed by Justin Etheredge ( codethinked.com). It is already available on the InformIT web siteand will be available in a few days on Amazon as well. I hope you will find the book helpful and it'd be awesome if it helps in bringing IronRuby to the masses! I'd love to hear your comments, so do not hesitate to contact me at shay at ironshay dot com. Thanks, Shay. -------------------------------------------------------- Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | Sela Technology Center Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay -------------- next part -------------- An HTML attachment was scrubbed... URL: From ben2004uk at googlemail.com Mon Feb 15 05:33:34 2010 From: ben2004uk at googlemail.com (Ben Hall) Date: Mon, 15 Feb 2010 10:33:34 +0000 Subject: [Ironruby-core] [ANN] IronRuby Unleashed In-Reply-To: References: Message-ID: Nice work!! I'll try and grab a copy when it's out on Amazon UK! Still saying 28 Mar 2010. Ben On Mon, Feb 15, 2010 at 9:46 AM, Shay Friedman wrote: > Hi all! > I'm very excited to announce that the book IronRuby Unleashed has been > released! > The book was written by me and was reviewed by Justin Etheredge > (codethinked.com). > It is already available on the InformIT web site and will be available in a > few days on Amazon as well. > I hope you will find the book helpful and it'd be awesome if it helps in > bringing IronRuby to the masses! > I'd love to hear your comments, so do not hesitate to contact me at shay at > ironshay dot com. > Thanks, > Shay. > -------------------------------------------------------- > Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | > Sela Technology Center > Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > From Shri.Borde at microsoft.com Mon Feb 15 13:33:51 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Mon, 15 Feb 2010 18:33:51 +0000 Subject: [Ironruby-core] New 2.3.2 Version (NO DBI) In-Reply-To: <1E5AB765-F4A5-43AA-8898-749EBB3B3801@metaskills.net> References: <1E5AB765-F4A5-43AA-8898-749EBB3B3801@metaskills.net> Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C96D5CB@TK5EX14MBXC140.redmond.corp.microsoft.com> FYI. ironruby-sqlserver (described at http://ironruby.net/Documentation/Real_Ruby_Applications/Rails) will have to lock down on 2.3.1 of the activerecord-sqlserver-adapter gem for now. ________________________________________ From: rails-sqlserver-adapter at googlegroups.com [rails-sqlserver-adapter at googlegroups.com] on behalf of Ken Collins [ken at metaskills.net] Sent: Monday, February 15, 2010 9:15 AM To: rails-sqlserver-adapter at googlegroups.com Subject: New 2.3.2 Version (NO DBI) The newer and faster adapter is out! My tests now run 25% faster! It now only uses RubyODBC and removes the DBI/DBD-ODBC dependencies. Thanks goes out to Erik Bryn for putting us in the right direction! If you care to go over the commits, you can see where I picked up from his work and started abstracting the low-level transport modes to a few key methods that can introspect on the connections mode. So even tho ODBC is the only way to go now, the plan is to open this up to any implementation that others care to use and submit work for. One that comes to mind is supporting and :ado_net mode for the IronRuby guys. Remember, if you are using the adapter in ADO mode and the old DBI hacks, stay at version 2.3.1. - Cheers, Ken -- You received this message because you are subscribed to the Google Groups "Rails SQLServer Adapter" group. To post to this group, send email to rails-sqlserver-adapter at googlegroups.com. To unsubscribe from this group, send email to rails-sqlserver-adapter+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/rails-sqlserver-adapter?hl=en. From Jimmy.Schementi at microsoft.com Mon Feb 15 15:02:46 2010 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Mon, 15 Feb 2010 20:02:46 +0000 Subject: [Ironruby-core] MRI 1.8.7 compatibility References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9204610913@TK5EX14MBXC136.redmond.corp.microsoft.com> Here's the current compatibility plan, let me know if this concerns anyone: > IronRuby 1.0.x releases: ONLY ruby-1.8.6 compatible > =================================================== > IronRuby has created a 1.0-servicing branch (not on GitHub yet, but > shortly); all ruby-1.8.6 compatible releases will come out of that > branch, starting with the just-released 1.0-rc2, followed by 1.0, and > any future 1.0.x releases. We will also removing any > 1.9 features from the 1.0-servicing branch (-19 and -20 flags), so > IronRuby 1.0 will only be 1.8.6 compatible. > > > IronRuby 1.x releases: ONLY ruby-1.9 compatible > =============================================== > Active development will still happens in the master branch, which will > be only focused on ruby-1.9 support. This means the master branch will > lose ruby-1.8.6 compatibility as breaking changes between ruby-1.8.6 > and ruby-1.9 are implemented. However, we'll probably look at > implementing 1.8.7 features that are also in 1.9, so we might get > ruby-1.8.7 compatibility as a byproduct of that, but it's not > something we'll be testing. Most ruby implementations are also moving away from supporting 1.8 and 1.9 in the same codebase as well. Even more extreme, MacRuby is completely skipping 1.8 compatibility, but that technically makes sense as they are a fork of the 1.9 codebase. ~Jimmy From Jimmy.Schementi at microsoft.com Sun Feb 14 16:17:23 2010 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Sun, 14 Feb 2010 21:17:23 +0000 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC920460FEC7@TK5EX14MBXC136.redmond.corp.microsoft.com> Here's the current compatibility plan, let me know if this concerns anyone: > IronRuby 1.0.x releases: ONLY ruby-1.8.6 compatible > =================================================== > IronRuby has created a 1.0-servicing branch (not on GitHub yet, > but shortly); all ruby-1.8.6 compatible releases will come out > of that branch, starting with the just-released 1.0-rc2, followed > by 1.0, and any future 1.0.x releases. We will also removing any > 1.9 features from the 1.0-servicing branch (-19 and -20 flags), > so IronRuby 1.0 will only be 1.8.6 compatible. > > > IronRuby 1.x releases: ONLY ruby-1.9 compatible > =============================================== > Active development will still happens in the master branch, which > will be only focused on ruby-1.9 support. This means the master > branch will lose ruby-1.8.6 compatibility as breaking changes > between ruby-1.8.6 and ruby-1.9 are implemented. However, we'll > probably look at implementing 1.8.7 features that are also in 1.9, > so we might get ruby-1.8.7 compatibility as a byproduct of that, > but it's not something we'll be testing. Most ruby implementations are also moving away from supporting 1.8 and 1.9 in the same codebase as well. Even more extreme, MacRuby is completely skipping 1.8 compatibility, but that technically makes sense as they are a fork of the 1.9 codebase. ~Jimmy From will at hotgazpacho.org Mon Feb 15 15:50:58 2010 From: will at hotgazpacho.org (Will Green) Date: Mon, 15 Feb 2010 15:50:58 -0500 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC920460FEC7@TK5EX14MBXC136.redmond.corp.microsoft.com> References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC920460FEC7@TK5EX14MBXC136.redmond.corp.microsoft.com> Message-ID: <398d3e0e1002151250y367f9766w70dc04d7ca90a7e6@mail.gmail.com> How much effort is it to get 1.8.7 compatible? How much to get 1.9 compatible? What is driving the push to release 1.0? My fear is that releasing 1.0 so close to release of Rails 3 without the ability to run it will do little for IronRuby's image in the wider Ruby community (who, from my admittedly limited experience, care about weather it can run Rails or not). -- Will Green http://hotgazpacho.org/ On Sun, Feb 14, 2010 at 4:17 PM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > Here's the current compatibility plan, let me know if this concerns anyone: > > > > IronRuby 1.0.x releases: ONLY ruby-1.8.6 compatible > > =================================================== > > IronRuby has created a 1.0-servicing branch (not on GitHub yet, > > but shortly); all ruby-1.8.6 compatible releases will come out > > of that branch, starting with the just-released 1.0-rc2, followed > > by 1.0, and any future 1.0.x releases. We will also removing any > > 1.9 features from the 1.0-servicing branch (-19 and -20 flags), > > so IronRuby 1.0 will only be 1.8.6 compatible. > > > > > > IronRuby 1.x releases: ONLY ruby-1.9 compatible > > =============================================== > > Active development will still happens in the master branch, which > > will be only focused on ruby-1.9 support. This means the master > > branch will lose ruby-1.8.6 compatibility as breaking changes > > between ruby-1.8.6 and ruby-1.9 are implemented. However, we'll > > probably look at implementing 1.8.7 features that are also in 1.9, > > so we might get ruby-1.8.7 compatibility as a byproduct of that, > > but it's not something we'll be testing. > > > Most ruby implementations are also moving away from supporting 1.8 > and 1.9 in the same codebase as well. Even more extreme, MacRuby is > completely skipping 1.8 compatibility, but that technically makes sense > as they are a fork of the 1.9 codebase. > > ~Jimmy > _______________________________________________ > 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 orion.edwards at gmail.com Mon Feb 15 16:50:31 2010 From: orion.edwards at gmail.com (Orion Edwards) Date: Tue, 16 Feb 2010 10:50:31 +1300 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: <398d3e0e1002151250y367f9766w70dc04d7ca90a7e6@mail.gmail.com> References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC920460FEC7@TK5EX14MBXC136.redmond.corp.microsoft.com> <398d3e0e1002151250y367f9766w70dc04d7ca90a7e6@mail.gmail.com> Message-ID: <7c1b59c01002151350q3f7a9540j268faa2ef483ae6d@mail.gmail.com> > IronRuby 1.0.x releases: ONLY ruby-1.8.6 compatible > IronRuby 1.x releases: ONLY ruby-1.9 compatible > My fear is that releasing 1.0 so close to release of Rails 3 without the > ability to run it will do little for IronRuby's image in the wider Ruby > community (who, from my admittedly limited experience, care about weather it > can run Rails or not). > +1. While it seems logical to go down the path jimmy mentioned, It looks like what will happen is that rails3 won't run on IronRuby at all until the 1.x releases build up 1.9 compat to a decent enough point and stabilize. Is 1.9 compat a big deal? It seems like it would be a ton of work to implement 1.9 compatibility in a stable way - thereby leaving IronRuby unable to run rails 3 for a long long time... -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdeville at microsoft.com Mon Feb 15 17:03:37 2010 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 15 Feb 2010 22:03:37 +0000 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: <7c1b59c01002151350q3f7a9540j268faa2ef483ae6d@mail.gmail.com> References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC920460FEC7@TK5EX14MBXC136.redmond.corp.microsoft.com> <398d3e0e1002151250y367f9766w70dc04d7ca90a7e6@mail.gmail.com> <7c1b59c01002151350q3f7a9540j268faa2ef483ae6d@mail.gmail.com> Message-ID: DISCLAIMER: We haven't discussed this yet, I'm just tossing it out to get thoughts. One option may be to put Rails 3 compat as the focus for 1.1, so that we do 1.0 in a few months on our current timeline, then put the focus into implementing the needed things for Rails 3. After that we can continue onto 1.9 support. Thoughts? JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Monday, February 15, 2010 1:51 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] MRI 1.8.7 compatibility > IronRuby 1.0.x releases: ONLY ruby-1.8.6 compatible > IronRuby 1.x releases: ONLY ruby-1.9 compatible My fear is that releasing 1.0 so close to release of Rails 3 without the ability to run it will do little for IronRuby's image in the wider Ruby community (who, from my admittedly limited experience, care about weather it can run Rails or not). +1. While it seems logical to go down the path jimmy mentioned, It looks like what will happen is that rails3 won't run on IronRuby at all until the 1.x releases build up 1.9 compat to a decent enough point and stabilize. Is 1.9 compat a big deal? It seems like it would be a ton of work to implement 1.9 compatibility in a stable way - thereby leaving IronRuby unable to run rails 3 for a long long time... -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jimmy.Schementi at microsoft.com Mon Feb 15 17:22:12 2010 From: Jimmy.Schementi at microsoft.com (Jimmy Schementi) Date: Mon, 15 Feb 2010 22:22:12 +0000 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: <7c1b59c01002151350q3f7a9540j268faa2ef483ae6d@mail.gmail.com> References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC920460FEC7@TK5EX14MBXC136.redmond.corp.microsoft.com> <398d3e0e1002151250y367f9766w70dc04d7ca90a7e6@mail.gmail.com> <7c1b59c01002151350q3f7a9540j268faa2ef483ae6d@mail.gmail.com> Message-ID: <1B42307CD4AADD438CDDA2FE1121CC9204610B49@TK5EX14MBXC136.redmond.corp.microsoft.com> Good point, but slight overreaction =) Running Rails 3 and being 1.8.7 compatible can be completely different goals, as Rails 3 doesn't use all of the 1.8.7 features. =) We can implement the features needed for Rails 3 for the releases after 1.0, so we may turn out to be compatible-enough with 1.8.7 for Rails 3. But, since we're not going to run tests against both 1.8.7 and 1.9, we won't be compatible enough to actually say "ruby-1.8.7 compatible". Plus, we'd like to start ripping out ruby-1.8 features from the 1.x releases, so that might be an impossible statement. Since 1.9 is the future of Ruby, we're jumping directly to supporting it, as that will position IronRuby for great compatibility in the future, rather than trying to optimize for the current state of the ruby-world. If Rails 3 on IronRuby 1.1 or 1.2 is very important to people, than it'll find a way of happening. But 1.8.x support is a dead-end, and not worth the IronRuby core team's or contributor's time. Plus, Matz ordered me to stop caring about 1.8 support, so I can't say no to that =P Are there other reasons why it's important for IronRuby to be ruby-1.8.7 compatible? If not, I'd prefer to just prioritize any changes needed for "Rails 3 support", rather than 1.8.7 support. ~Jimmy From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Monday, February 15, 2010 1:51 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] MRI 1.8.7 compatibility > IronRuby 1.0.x releases: ONLY ruby-1.8.6 compatible > IronRuby 1.x releases: ONLY ruby-1.9 compatible My fear is that releasing 1.0 so close to release of Rails 3 without the ability to run it will do little for IronRuby's image in the wider Ruby community (who, from my admittedly limited experience, care about weather it can run Rails or not). +1. While it seems logical to go down the path jimmy mentioned, It looks like what will happen is that rails3 won't run on IronRuby at all until the 1.x releases build up 1.9 compat to a decent enough point and stabilize. Is 1.9 compat a big deal? It seems like it would be a ton of work to implement 1.9 compatibility in a stable way - thereby leaving IronRuby unable to run rails 3 for a long long time... -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan.riley at panesofglass.org Mon Feb 15 17:29:43 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Mon, 15 Feb 2010 16:29:43 -0600 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC920460FEC7@TK5EX14MBXC136.redmond.corp.microsoft.com> <398d3e0e1002151250y367f9766w70dc04d7ca90a7e6@mail.gmail.com> <7c1b59c01002151350q3f7a9540j268faa2ef483ae6d@mail.gmail.com> Message-ID: 1) What's the story on the other implementations for Rails 3? In other words, will JRuby, Rubinius, et. al. run Rails 3 out of the gate? If so, are they doing it on a 1.9 compat version or 1.8.7? If they are pursuing the former, no one will be able to fault IronRuby for not supporting Rails. If the latter, well, that's your decision. :) 2) I'm not hard up for running Rails 3 on IronRuby. People are running Rails apps on *nix boxes now. A few more months isn't going to hurt them. Also, while deploying Rails more easily on Windows is a selling point for IronRuby, I think most will likely be on Rails 2.3.5 or previous for some time to come until they get up to speed with Rails 3. We have time. 3) I really don't see Rails, in general, as a primary reason for using IronRuby. There are a number of other libraries (some running on 1.9) that would be more likely candidates for driving IronRuby adoption. Stopping the presses just to get Rails 3 running when that doesn't drive 1.9 forward seems a bit short-sighted. In other words, I like the current plan. :) Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Mon, Feb 15, 2010 at 4:03 PM, Jim Deville wrote: > DISCLAIMER: We haven?t discussed this yet, I?m just tossing it out to get > thoughts. > > > > One option may be to put Rails 3 compat as the focus for 1.1, so that we > do 1.0 in a few months on our current timeline, then put the focus into > implementing the needed things for Rails 3. After that we can continue onto > 1.9 support. > > > > Thoughts? > > > > JD > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards > *Sent:* Monday, February 15, 2010 1:51 PM > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] MRI 1.8.7 compatibility > > > > > IronRuby 1.0.x releases: ONLY ruby-1.8.6 compatible > > > IronRuby 1.x releases: ONLY ruby-1.9 compatible > > > > My fear is that releasing 1.0 so close to release of Rails 3 without the > ability to run it will do little for IronRuby's image in the wider Ruby > community (who, from my admittedly limited experience, care about weather it > can run Rails or not). > > > > +1. > > > > While it seems logical to go down the path jimmy mentioned, It looks like > what will happen is that rails3 won't run on IronRuby at all until the 1.x > releases build up 1.9 compat to a decent enough point and stabilize. > > > > Is 1.9 compat a big deal? It seems like it would be a ton of work > to implement 1.9 compatibility in a stable way - thereby leaving IronRuby > unable to run rails 3 for a long long time... > > _______________________________________________ > 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 Mon Feb 15 17:35:32 2010 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 15 Feb 2010 22:35:32 +0000 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC920460FEC7@TK5EX14MBXC136.redmond.corp.microsoft.com> <398d3e0e1002151250y367f9766w70dc04d7ca90a7e6@mail.gmail.com> <7c1b59c01002151350q3f7a9540j268faa2ef483ae6d@mail.gmail.com> Message-ID: JRuby, Rubinius and MacRuby will support Rails 3, but all three of them are either working on a version to support 1.9 (Jruby), or only targeting 1.9 (the other 2). We?ve said a few times in the halls that if we had noticed the timing a year ago, 1.9 would probably have been a better 1.0 target, but at this point, changing directions makes no sense. We can focus on Rails 3 among other priorities after 1.0. To ship is to choose ? JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Monday, February 15, 2010 2:30 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] MRI 1.8.7 compatibility 1) What's the story on the other implementations for Rails 3? In other words, will JRuby, Rubinius, et. al. run Rails 3 out of the gate? If so, are they doing it on a 1.9 compat version or 1.8.7? If they are pursuing the former, no one will be able to fault IronRuby for not supporting Rails. If the latter, well, that's your decision. :) 2) I'm not hard up for running Rails 3 on IronRuby. People are running Rails apps on *nix boxes now. A few more months isn't going to hurt them. Also, while deploying Rails more easily on Windows is a selling point for IronRuby, I think most will likely be on Rails 2.3.5 or previous for some time to come until they get up to speed with Rails 3. We have time. 3) I really don't see Rails, in general, as a primary reason for using IronRuby. There are a number of other libraries (some running on 1.9) that would be more likely candidates for driving IronRuby adoption. Stopping the presses just to get Rails 3 running when that doesn't drive 1.9 forward seems a bit short-sighted. In other words, I like the current plan. :) Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Mon, Feb 15, 2010 at 4:03 PM, Jim Deville > wrote: DISCLAIMER: We haven?t discussed this yet, I?m just tossing it out to get thoughts. One option may be to put Rails 3 compat as the focus for 1.1, so that we do 1.0 in a few months on our current timeline, then put the focus into implementing the needed things for Rails 3. After that we can continue onto 1.9 support. Thoughts? JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Monday, February 15, 2010 1:51 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] MRI 1.8.7 compatibility > IronRuby 1.0.x releases: ONLY ruby-1.8.6 compatible > IronRuby 1.x releases: ONLY ruby-1.9 compatible My fear is that releasing 1.0 so close to release of Rails 3 without the ability to run it will do little for IronRuby's image in the wider Ruby community (who, from my admittedly limited experience, care about weather it can run Rails or not). +1. While it seems logical to go down the path jimmy mentioned, It looks like what will happen is that rails3 won't run on IronRuby at all until the 1.x releases build up 1.9 compat to a decent enough point and stabilize. Is 1.9 compat a big deal? It seems like it would be a ton of work to implement 1.9 compatibility in a stable way - thereby leaving IronRuby unable to run rails 3 for a long long time... _______________________________________________ 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 Feb 15 18:26:30 2010 From: will at hotgazpacho.org (Will Green) Date: Mon, 15 Feb 2010 18:26:30 -0500 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC9204610B49@TK5EX14MBXC136.redmond.corp.microsoft.com> References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC920460FEC7@TK5EX14MBXC136.redmond.corp.microsoft.com> <398d3e0e1002151250y367f9766w70dc04d7ca90a7e6@mail.gmail.com> <7c1b59c01002151350q3f7a9540j268faa2ef483ae6d@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9204610B49@TK5EX14MBXC136.redmond.corp.microsoft.com> Message-ID: <398d3e0e1002151526y3a739cb9rba2da56201732627@mail.gmail.com> Overreact? I *never* do that ;-) If you guys are close to shipping 1.0, then I don't have a problem with a newer patch level release, like 1.0.1 or 1.0.2, providing just enough 1.8.7 compat to support Rails 3. On the other hand, if you think that 1.9 support is attainable this year, I'd rather see the team focus on that. -- Will Green http://hotgazpacho.org/ On Mon, Feb 15, 2010 at 5:22 PM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > Good point, but slight overreaction =) > > > > Running Rails 3 and being 1.8.7 compatible can be completely different > goals, as Rails 3 doesn?t use *all* of the 1.8.7 features. =) We can > implement the features needed for Rails 3 for the releases after 1.0, so we > may turn out to be compatible-enough with 1.8.7 for Rails 3. But, since > we?re not going to run tests against both 1.8.7 and 1.9, we won?t be > compatible enough to actually say ?ruby-1.8.7 compatible?. Plus, we?d like > to start ripping out ruby-1.8 features from the 1.x releases, so that might > be an impossible statement. > > > > Since 1.9 is the future of Ruby, we?re jumping directly to supporting it, > as that will position IronRuby for great compatibility in the future, rather > than trying to optimize for the current state of the ruby-world. If Rails 3 > on IronRuby 1.1 or 1.2 is very important to people, than it?ll find a way of > happening. But 1.8.x support is a dead-end, and not worth the IronRuby core > team?s or contributor?s time. Plus, Matz ordered me to stop caring about 1.8 > support, so I can?t say no to that =P > > > > Are there other reasons why it?s important for IronRuby to be ruby-1.8.7 > compatible? If not, I?d prefer to just prioritize any changes needed for > ?Rails 3 support?, rather than 1.8.7 support. > > > > ~Jimmy > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards > > *Sent:* Monday, February 15, 2010 1:51 PM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] MRI 1.8.7 compatibility > > > > > IronRuby 1.0.x releases: ONLY ruby-1.8.6 compatible > > > IronRuby 1.x releases: ONLY ruby-1.9 compatible > > > > My fear is that releasing 1.0 so close to release of Rails 3 without the > ability to run it will do little for IronRuby's image in the wider Ruby > community (who, from my admittedly limited experience, care about weather it > can run Rails or not). > > > > +1. > > > > While it seems logical to go down the path jimmy mentioned, It looks like > what will happen is that rails3 won't run on IronRuby at all until the 1.x > releases build up 1.9 compat to a decent enough point and stabilize. > > > > Is 1.9 compat a big deal? It seems like it would be a ton of work > to implement 1.9 compatibility in a stable way - thereby leaving IronRuby > unable to run rails 3 for a long long time... > > _______________________________________________ > 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 Mon Feb 15 18:30:29 2010 From: jdeville at microsoft.com (Jim Deville) Date: Mon, 15 Feb 2010 23:30:29 +0000 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: <398d3e0e1002151526y3a739cb9rba2da56201732627@mail.gmail.com> References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC920460FEC7@TK5EX14MBXC136.redmond.corp.microsoft.com> <398d3e0e1002151250y367f9766w70dc04d7ca90a7e6@mail.gmail.com> <7c1b59c01002151350q3f7a9540j268faa2ef483ae6d@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9204610B49@TK5EX14MBXC136.redmond.corp.microsoft.com> <398d3e0e1002151526y3a739cb9rba2da56201732627@mail.gmail.com> Message-ID: I honestly don?t think that shipping a 1.0 will delay any future release by much. I also don?t think that a Rails 3 release would hurt the progress towards 1.9. Unless something major changes, I believe all of the 1.8.7 features we are currently lacking for Rails 3 are also 1.9 features. JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Will Green Sent: Monday, February 15, 2010 3:27 PM To: ironruby-core Subject: Re: [Ironruby-core] MRI 1.8.7 compatibility Overreact? I *never* do that ;-) If you guys are close to shipping 1.0, then I don't have a problem with a newer patch level release, like 1.0.1 or 1.0.2, providing just enough 1.8.7 compat to support Rails 3. On the other hand, if you think that 1.9 support is attainable this year, I'd rather see the team focus on that. -- Will Green http://hotgazpacho.org/ On Mon, Feb 15, 2010 at 5:22 PM, Jimmy Schementi > wrote: Good point, but slight overreaction =) Running Rails 3 and being 1.8.7 compatible can be completely different goals, as Rails 3 doesn?t use all of the 1.8.7 features. =) We can implement the features needed for Rails 3 for the releases after 1.0, so we may turn out to be compatible-enough with 1.8.7 for Rails 3. But, since we?re not going to run tests against both 1.8.7 and 1.9, we won?t be compatible enough to actually say ?ruby-1.8.7 compatible?. Plus, we?d like to start ripping out ruby-1.8 features from the 1.x releases, so that might be an impossible statement. Since 1.9 is the future of Ruby, we?re jumping directly to supporting it, as that will position IronRuby for great compatibility in the future, rather than trying to optimize for the current state of the ruby-world. If Rails 3 on IronRuby 1.1 or 1.2 is very important to people, than it?ll find a way of happening. But 1.8.x support is a dead-end, and not worth the IronRuby core team?s or contributor?s time. Plus, Matz ordered me to stop caring about 1.8 support, so I can?t say no to that =P Are there other reasons why it?s important for IronRuby to be ruby-1.8.7 compatible? If not, I?d prefer to just prioritize any changes needed for ?Rails 3 support?, rather than 1.8.7 support. ~Jimmy From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Monday, February 15, 2010 1:51 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] MRI 1.8.7 compatibility > IronRuby 1.0.x releases: ONLY ruby-1.8.6 compatible > IronRuby 1.x releases: ONLY ruby-1.9 compatible My fear is that releasing 1.0 so close to release of Rails 3 without the ability to run it will do little for IronRuby's image in the wider Ruby community (who, from my admittedly limited experience, care about weather it can run Rails or not). +1. While it seems logical to go down the path jimmy mentioned, It looks like what will happen is that rails3 won't run on IronRuby at all until the 1.x releases build up 1.9 compat to a decent enough point and stabilize. Is 1.9 compat a big deal? It seems like it would be a ton of work to implement 1.9 compatibility in a stable way - thereby leaving IronRuby unable to run rails 3 for a long long time... _______________________________________________ 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 Mon Feb 15 22:28:54 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 16 Feb 2010 03:28:54 +0000 Subject: [Ironruby-core] Code Review: InteropBinding Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3DB548F7@TK5EX14MBXC122.redmond.corp.microsoft.com> tfpt review "/shelveset:InteropBinding;REDMOND\tomat" Comment : DLR, Python: - Adds IInvokeOnGetBinder to Microsoft.System.Core. - Adds Rowan4.sln that includes DLR, IronRuby and IronPython projects. Ruby: - Implements meta-protocol for accessing DLR scopes with fall back to standard method_missing. o Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=2478 - Fixes http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3083 - Fixes name mangling on COM objects. - Fixes send(:foo=, args) to call indexed property on foreign meta-objects if the number of arguments is > 1. - Implements factories for interop binders that cache them on RubyContext. - Implements non-lexical super call action (a flag on RubyCallAction). Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: InteropBinding.diff Type: application/octet-stream Size: 177213 bytes Desc: InteropBinding.diff URL: From ivan at whiterabbitconsulting.eu Tue Feb 16 09:05:38 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Tue, 16 Feb 2010 15:05:38 +0100 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC920460FEC7@TK5EX14MBXC136.redmond.corp.microsoft.com> <398d3e0e1002151250y367f9766w70dc04d7ca90a7e6@mail.gmail.com> <7c1b59c01002151350q3f7a9540j268faa2ef483ae6d@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9204610B49@TK5EX14MBXC136.redmond.corp.microsoft.com> <398d3e0e1002151526y3a739cb9rba2da56201732627@mail.gmail.com> Message-ID: k I'm all for waiting with rails 3.0 or at least not making it the highest priority. The thing is that most people looking at ironruby are actually .NET people IMO. Now these guys have just gone through what is needed to learn 2.3.5. Seen as most enterprise type devs lean towards the mort persona I'd say they aren't terribly worried yet about using Rails 3.0 they want to continue 2.3.5 until most of the plugins have caught up. Looking at how fast the community does this stuff I'd say we have well over 6 months to get 1.9 compat going. my 2c :) --- 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, Feb 16, 2010 at 12:30 AM, Jim Deville wrote: > I honestly don?t think that shipping a 1.0 will delay any future release by > much. I also don?t think that a Rails 3 release would hurt the progress > towards 1.9. Unless something major changes, I believe all of the 1.8.7 > features we are currently lacking for Rails 3 are also 1.9 features. > > > > JD > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Will Green > *Sent:* Monday, February 15, 2010 3:27 PM > *To:* ironruby-core > > *Subject:* Re: [Ironruby-core] MRI 1.8.7 compatibility > > > > Overreact? I *never* do that ;-) > > > > If you guys are close to shipping 1.0, then I don't have a problem with a > newer patch level release, like 1.0.1 or 1.0.2, providing just enough 1.8.7 > compat to support Rails 3. On the other hand, if you think that 1.9 support > is attainable this year, I'd rather see the team focus on that. > > > -- > Will Green > http://hotgazpacho.org/ > > On Mon, Feb 15, 2010 at 5:22 PM, Jimmy Schementi < > Jimmy.Schementi at microsoft.com> wrote: > > Good point, but slight overreaction =) > > > > Running Rails 3 and being 1.8.7 compatible can be completely different > goals, as Rails 3 doesn?t use *all* of the 1.8.7 features. =) We can > implement the features needed for Rails 3 for the releases after 1.0, so we > may turn out to be compatible-enough with 1.8.7 for Rails 3. But, since > we?re not going to run tests against both 1.8.7 and 1.9, we won?t be > compatible enough to actually say ?ruby-1.8.7 compatible?. Plus, we?d like > to start ripping out ruby-1.8 features from the 1.x releases, so that might > be an impossible statement. > > > > Since 1.9 is the future of Ruby, we?re jumping directly to supporting it, > as that will position IronRuby for great compatibility in the future, rather > than trying to optimize for the current state of the ruby-world. If Rails 3 > on IronRuby 1.1 or 1.2 is very important to people, than it?ll find a way of > happening. But 1.8.x support is a dead-end, and not worth the IronRuby core > team?s or contributor?s time. Plus, Matz ordered me to stop caring about 1.8 > support, so I can?t say no to that =P > > > > Are there other reasons why it?s important for IronRuby to be ruby-1.8.7 > compatible? If not, I?d prefer to just prioritize any changes needed for > ?Rails 3 support?, rather than 1.8.7 support. > > > > ~Jimmy > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards > > > *Sent:* Monday, February 15, 2010 1:51 PM > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] MRI 1.8.7 compatibility > > > > > IronRuby 1.0.x releases: ONLY ruby-1.8.6 compatible > > > IronRuby 1.x releases: ONLY ruby-1.9 compatible > > > > My fear is that releasing 1.0 so close to release of Rails 3 without the > ability to run it will do little for IronRuby's image in the wider Ruby > community (who, from my admittedly limited experience, care about weather it > can run Rails or not). > > > > +1. > > > > While it seems logical to go down the path jimmy mentioned, It looks like > what will happen is that rails3 won't run on IronRuby at all until the 1.x > releases build up 1.9 compat to a decent enough point and stabilize. > > > > Is 1.9 compat a big deal? It seems like it would be a ton of work > to implement 1.9 compatibility in a stable way - thereby leaving IronRuby > unable to run rails 3 for a long long time... > > > _______________________________________________ > 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 mark at markrendle.net Tue Feb 16 10:06:23 2010 From: mark at markrendle.net (Mark Rendle) Date: Tue, 16 Feb 2010 15:06:23 +0000 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: <1B42307CD4AADD438CDDA2FE1121CC9204610B49@TK5EX14MBXC136.redmond.corp.microsoft.com> References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC920460FEC7@TK5EX14MBXC136.redmond.corp.microsoft.com> <398d3e0e1002151250y367f9766w70dc04d7ca90a7e6@mail.gmail.com> <7c1b59c01002151350q3f7a9540j268faa2ef483ae6d@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9204610B49@TK5EX14MBXC136.redmond.corp.microsoft.com> Message-ID: <3d65f4711002160706s54b0ae2p6889d55d0bda2414@mail.gmail.com> MRI 1.9.1 is my Linux Ruby of choice, so I'm definitely in favour of 1.9 being the focus for IronRuby, and as soon as I can clone a 1.x branch I'll be all over it, with Rails 3 testing as a focus. (Eventual aim: to prove IronRuby & Rails 3 as a cool Windows Azure solution). Mark On Mon, Feb 15, 2010 at 10:22 PM, Jimmy Schementi < Jimmy.Schementi at microsoft.com> wrote: > Good point, but slight overreaction =) > > > > Running Rails 3 and being 1.8.7 compatible can be completely different > goals, as Rails 3 doesn?t use *all* of the 1.8.7 features. =) We can > implement the features needed for Rails 3 for the releases after 1.0, so we > may turn out to be compatible-enough with 1.8.7 for Rails 3. But, since > we?re not going to run tests against both 1.8.7 and 1.9, we won?t be > compatible enough to actually say ?ruby-1.8.7 compatible?. Plus, we?d like > to start ripping out ruby-1.8 features from the 1.x releases, so that might > be an impossible statement. > > > > Since 1.9 is the future of Ruby, we?re jumping directly to supporting it, > as that will position IronRuby for great compatibility in the future, rather > than trying to optimize for the current state of the ruby-world. If Rails 3 > on IronRuby 1.1 or 1.2 is very important to people, than it?ll find a way of > happening. But 1.8.x support is a dead-end, and not worth the IronRuby core > team?s or contributor?s time. Plus, Matz ordered me to stop caring about 1.8 > support, so I can?t say no to that =P > > > > Are there other reasons why it?s important for IronRuby to be ruby-1.8.7 > compatible? If not, I?d prefer to just prioritize any changes needed for > ?Rails 3 support?, rather than 1.8.7 support. > > > > ~Jimmy > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Orion Edwards > > *Sent:* Monday, February 15, 2010 1:51 PM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] MRI 1.8.7 compatibility > > > > > IronRuby 1.0.x releases: ONLY ruby-1.8.6 compatible > > > IronRuby 1.x releases: ONLY ruby-1.9 compatible > > > > My fear is that releasing 1.0 so close to release of Rails 3 without the > ability to run it will do little for IronRuby's image in the wider Ruby > community (who, from my admittedly limited experience, care about weather it > can run Rails or not). > > > > +1. > > > > While it seems logical to go down the path jimmy mentioned, It looks like > what will happen is that rails3 won't run on IronRuby at all until the 1.x > releases build up 1.9 compat to a decent enough point and stabilize. > > > > Is 1.9 compat a big deal? It seems like it would be a ton of work > to implement 1.9 compatibility in a stable way - thereby leaving IronRuby > unable to run rails 3 for a long long time... > > _______________________________________________ > 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 Feb 16 13:21:59 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Tue, 16 Feb 2010 18:21:59 +0000 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: <3d65f4711002160706s54b0ae2p6889d55d0bda2414@mail.gmail.com> References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <7c1b59c01002111152q609f7cb7l9aeaa4b342658728@mail.gmail.com> <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC920460FEC7@TK5EX14MBXC136.redmond.corp.microsoft.com> <398d3e0e1002151250y367f9766w70dc04d7ca90a7e6@mail.gmail.com> <7c1b59c01002151350q3f7a9540j268faa2ef483ae6d@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9204610B49@TK5EX14MBXC136.redmond.corp.microsoft.com> <3d65f4711002160706s54b0ae2p6889d55d0bda2414@mail.gmail.com> Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C96F9C1@TK5EX14MBXC140.redmond.corp.microsoft.com> Thanks for all the feedback on what you guys are interested in. I would like to request folks to start playing with IronRuby and Rails 2.3.5 today. Mark, trying IronRuby + Rails on Azure sounds like a great project. It would be great if you could look at using Rails 2.3.5 for now. Having such a demo for IronRuby V1 RTM will be a great showcasing of the exiting functionality. I understand that Rails 3 is of interest to folks, and that support will come. But there will always be something new around the corner and we are chasing a moving target in that regards. Getting you folks to play with what works today will be greatly appreciated. Do report the blocking issues you run into. Most of those will apply to getting Rails 3 working as well anyway. Shri From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mark Rendle Sent: Tuesday, February 16, 2010 7:06 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] MRI 1.8.7 compatibility MRI 1.9.1 is my Linux Ruby of choice, so I'm definitely in favour of 1.9 being the focus for IronRuby, and as soon as I can clone a 1.x branch I'll be all over it, with Rails 3 testing as a focus. (Eventual aim: to prove IronRuby & Rails 3 as a cool Windows Azure solution). Mark On Mon, Feb 15, 2010 at 10:22 PM, Jimmy Schementi > wrote: Good point, but slight overreaction =) Running Rails 3 and being 1.8.7 compatible can be completely different goals, as Rails 3 doesn't use all of the 1.8.7 features. =) We can implement the features needed for Rails 3 for the releases after 1.0, so we may turn out to be compatible-enough with 1.8.7 for Rails 3. But, since we're not going to run tests against both 1.8.7 and 1.9, we won't be compatible enough to actually say "ruby-1.8.7 compatible". Plus, we'd like to start ripping out ruby-1.8 features from the 1.x releases, so that might be an impossible statement. Since 1.9 is the future of Ruby, we're jumping directly to supporting it, as that will position IronRuby for great compatibility in the future, rather than trying to optimize for the current state of the ruby-world. If Rails 3 on IronRuby 1.1 or 1.2 is very important to people, than it'll find a way of happening. But 1.8.x support is a dead-end, and not worth the IronRuby core team's or contributor's time. Plus, Matz ordered me to stop caring about 1.8 support, so I can't say no to that =P Are there other reasons why it's important for IronRuby to be ruby-1.8.7 compatible? If not, I'd prefer to just prioritize any changes needed for "Rails 3 support", rather than 1.8.7 support. ~Jimmy From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Orion Edwards Sent: Monday, February 15, 2010 1:51 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] MRI 1.8.7 compatibility > IronRuby 1.0.x releases: ONLY ruby-1.8.6 compatible > IronRuby 1.x releases: ONLY ruby-1.9 compatible My fear is that releasing 1.0 so close to release of Rails 3 without the ability to run it will do little for IronRuby's image in the wider Ruby community (who, from my admittedly limited experience, care about weather it can run Rails or not). +1. While it seems logical to go down the path jimmy mentioned, It looks like what will happen is that rails3 won't run on IronRuby at all until the 1.x releases build up 1.9 compat to a decent enough point and stabilize. Is 1.9 compat a big deal? It seems like it would be a ton of work to implement 1.9 compatibility in a stable way - thereby leaving IronRuby unable to run rails 3 for a long long time... _______________________________________________ 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 orion.edwards at gmail.com Tue Feb 16 14:30:59 2010 From: orion.edwards at gmail.com (Orion Edwards) Date: Wed, 17 Feb 2010 08:30:59 +1300 Subject: [Ironruby-core] MRI 1.8.7 compatibility In-Reply-To: References: <3d65f4711002110341n5b8718b2p7178c23c86cdb5a7@mail.gmail.com> <3d65f4711002130121k6d1b72demb9947743a230fee0@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC920460FEC7@TK5EX14MBXC136.redmond.corp.microsoft.com> <398d3e0e1002151250y367f9766w70dc04d7ca90a7e6@mail.gmail.com> <7c1b59c01002151350q3f7a9540j268faa2ef483ae6d@mail.gmail.com> <1B42307CD4AADD438CDDA2FE1121CC9204610B49@TK5EX14MBXC136.redmond.corp.microsoft.com> <398d3e0e1002151526y3a739cb9rba2da56201732627@mail.gmail.com> Message-ID: <7c1b59c01002161130q7fb5bde7u9bbdf8c9ce05a699@mail.gmail.com> On Tue, Feb 16, 2010 at 12:30 PM, Jim Deville wrote: > I honestly don?t think that shipping a 1.0 will delay any future release by > much. I also don?t think that a Rails 3 release would hurt the progress > towards 1.9. Unless something major changes, I believe all of the 1.8.7 > features we are currently lacking for Rails 3 are also 1.9 features. > Then that sounds like a great idea then :-) Personally I won't be running rails3 on IronRuby (due to the fact that I'm not working on any webapps at all), but I would like to see rails3 support being not too far behind the release of rails3 itself. Rails is the main drawcard for ruby, and I believe IronRuby would lose credibility by not being able to run rails 3 (even though nobody may actually run it anyway) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Tue Feb 16 21:40:22 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 17 Feb 2010 02:40:22 +0000 Subject: [Ironruby-core] Code Review: InteropFix Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3DB561B4@TK5EX14MBXC122.redmond.corp.microsoft.com> tfpt review "/shelveset:InteropFix;REDMOND\tomat" Comment : Replaces all remaining calls to Expession.Dynamic by AstUtils.LightDynamic. Removes superfluous restriction in InteropBinder.InvokeMember.FallbackInvoke. This caused a failure when binding to DynamicObject. Fixes Silverlight and FxCop build settings in Rowan4.sln. Adds YAML to Rowan4.sln Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: InteropFix.diff Type: application/octet-stream Size: 13783 bytes Desc: InteropFix.diff URL: From Tomas.Matousek at microsoft.com Tue Feb 16 21:45:54 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Wed, 17 Feb 2010 02:45:54 +0000 Subject: [Ironruby-core] Code Review: V4bugs (take 2) Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3DB561EC@TK5EX14MBXC122.redmond.corp.microsoft.com> tfpt review "/shelveset:V4bugs;REDMOND\tomat" Comment : DLR: Marks generated assemblies by SecurityRulesAttributes. Ruby: Corrects paths in run_syntax and MSpec (ruby_exe.rb). Adds RubyIO subclass to avoid type gen. Fixes tests to run correctly in V4 partial trust Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: V4Bugs.diff Type: application/octet-stream Size: 33363 bytes Desc: V4Bugs.diff URL: From Shri.Borde at microsoft.com Wed Feb 17 18:36:04 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Wed, 17 Feb 2010 23:36:04 +0000 Subject: [Ironruby-core] Code Review: Ruby 1.8.7 and 1.9 compat improvements Message-ID: <8E45365BECA665489F3CB8878A6C1B7D0C971601@TK5EX14MBXC140.redmond.corp.microsoft.com> tfpt review "/shelveset:r187;REDMOND\sborde" Comment : I wanted to get a feel for where were with Rails 3 compat. For V1 RTM, we can have a crisper message like "IronRuby 1.0 supports Rails 2.3.5. Rails 3 tests pass at 98%, and full support will follow after the 1.0 RTM". I started off looking at the -19 mode but gave up on that after I could not get MRI 1.9 to install 1.9 gems (1.9 must include a different version of RubyGems, and I could not use the existing 1.8 gems) 1.8.7 related changes - Adds -187 command line option - Enables ActionPack 3.0.pre tests in irtests - Adds Object#tag - avoids an ArgumentException("Illegal characters in path") that was happenning when a bad file name string was passed in to eval - Adds String#start_with? and String#end_with? - RUBY_VERSION is tied to the command-line argument specified 1.9 related changes - Adds Integer#fdiv - Allows calling convention argument to Win32API.new -------------- next part -------------- A non-text attachment was scrubbed... Name: r187.diff Type: application/octet-stream Size: 53590 bytes Desc: r187.diff URL: From orion.edwards at gmail.com Wed Feb 17 22:17:13 2010 From: orion.edwards at gmail.com (Orion Edwards) Date: Thu, 18 Feb 2010 16:17:13 +1300 Subject: [Ironruby-core] IronRuby 1.0rc2 - crash calling =~ on clr string Message-ID: <7c1b59c01002171917l13043ee8u77a763ef2e63779b@mail.gmail.com> Ouch. Here's a repro PS C:\dev\test> ir IronRuby 0.9.4.0 on .NET 2.0.50727.4927 Copyright (c) Microsoft Corporation. All rights reserved. >>> "hello".to_clr_string =~ "hello" Process is terminated due to StackOverflowException. The windows appcrash dialog pops up: Here's what it says if it's at all useful Problem signature: Problem Event Name: APPCRASH Application Name: ir.exe Application Version: 0.9.4.0 Application Timestamp: 4b706fe1 Fault Module Name: KERNELBASE.dll Fault Module Version: 6.1.7600.16385 Fault Module Timestamp: 4a5bdbdf Exception Code: e053534f Exception Offset: 0000b727 OS Version: 6.1.7600.2.0.0.256.48 Locale ID: 5129 -------------- next part -------------- An HTML attachment was scrubbed... URL: From semmons99 at gmail.com Thu Feb 18 15:42:55 2010 From: semmons99 at gmail.com (Shane Emmons) Date: Thu, 18 Feb 2010 15:42:55 -0500 Subject: [Ironruby-core] COM Interop Problem Message-ID: <13830bd31002181242i3b889f3bk4c4a81db04a4dff0@mail.gmail.com> Anytime I invoke a method on a COM object with one or more arguments, I get the following error: Could not convert argument 0 for call to Open. (ArgumentError) What's preplexing is the argument number is always the last argument, so if there are four arguments, the error will be on argument 3. Here is an example script that gives the error above: def new_com_object(prog_id) System::Activator.CreateInstance(System::Type.GetTypeFromProgID(prog_id)) end xls = new_com_object('Excel.Application') xls.Visible = true xls.Workbooks.Open('c:\\Book1.xls') -- Shane Emmons From semmons99 at gmail.com Fri Feb 19 09:53:56 2010 From: semmons99 at gmail.com (Shane Emmons) Date: Fri, 19 Feb 2010 09:53:56 -0500 Subject: [Ironruby-core] COM Interop Problem In-Reply-To: <13830bd31002181242i3b889f3bk4c4a81db04a4dff0@mail.gmail.com> References: <13830bd31002181242i3b889f3bk4c4a81db04a4dff0@mail.gmail.com> Message-ID: <13830bd31002190653i234e6d89j27a6a2552274830d@mail.gmail.com> On Thu, Feb 18, 2010 at 3:42 PM, Shane Emmons wrote: > Anytime I invoke a method on a COM object with one or more arguments, > I get the following error: > ?Could not convert argument 0 for call to Open. (ArgumentError) > > What's preplexing is the argument number is always the last argument, > so if there are four arguments, the error will be on argument 3. Here > is an example script that gives the error above: > > def new_com_object(prog_id) > ?System::Activator.CreateInstance(System::Type.GetTypeFromProgID(prog_id)) > end > > xls = new_com_object('Excel.Application') > xls.Visible = true > xls.Workbooks.Open('c:\\Book1.xls') > > -- > Shane Emmons > I figured it out, needed to to String#to_clr_string on every argument. -- Shane Emmons From jdeville at microsoft.com Fri Feb 19 11:10:33 2010 From: jdeville at microsoft.com (Jim Deville) Date: Fri, 19 Feb 2010 16:10:33 +0000 Subject: [Ironruby-core] COM Interop Problem Message-ID: <31BD916A7536A242870B0B4E3F9068D702D700@TK5EX14MBXC132.redmond.corp.microsoft.com> Just so you know, the WIN32OLE library wraps the COM initialization and removes the need for to_clr_string. Require 'win32ole' WIN32OLE.new 'Excel.Application' This will also be cross compatible with MRI. Tomas: Can we make Shane's case work without requiring the cast to CLR string? JD -----Original Message----- From: Shane Emmons Sent: Friday, February 19, 2010 7:02 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] COM Interop Problem On Thu, Feb 18, 2010 at 3:42 PM, Shane Emmons wrote: > Anytime I invoke a method on a COM object with one or more arguments, > I get the following error: > Could not convert argument 0 for call to Open. (ArgumentError) > > What's preplexing is the argument number is always the last argument, > so if there are four arguments, the error will be on argument 3. Here > is an example script that gives the error above: > > def new_com_object(prog_id) > System::Activator.CreateInstance(System::Type.GetTypeFromProgID(prog_id)) > end > > xls = new_com_object('Excel.Application') > xls.Visible = true > xls.Workbooks.Open('c:\\Book1.xls') > > -- > Shane Emmons > I figured it out, needed to to String#to_clr_string on every argument. -- Shane Emmons _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core From semmons99 at gmail.com Fri Feb 19 13:13:03 2010 From: semmons99 at gmail.com (Shane Emmons) Date: Fri, 19 Feb 2010 13:13:03 -0500 Subject: [Ironruby-core] COM Interop Problem In-Reply-To: <31BD916A7536A242870B0B4E3F9068D702D700@TK5EX14MBXC132.redmond.corp.microsoft.com> References: <31BD916A7536A242870B0B4E3F9068D702D700@TK5EX14MBXC132.redmond.corp.microsoft.com> Message-ID: <13830bd31002191013x7881170emff1937f35f786793@mail.gmail.com> Thanks, that's really handy. Just an FYI, I figured out the #to_clr_string when going through the documentation on IronRuby.net which is currently reporting the following error anywhere I assume you mean to have code: reference to undefined name 'syntax' On Fri, Feb 19, 2010 at 11:10 AM, Jim Deville wrote: > Just so you know, the WIN32OLE library wraps the COM initialization and removes the need for to_clr_string. > > Require 'win32ole' > WIN32OLE.new 'Excel.Application' > > > This will also be cross compatible with MRI. > > Tomas: Can we make Shane's case work without requiring the cast to CLR string? > > JD > > > > -----Original Message----- > From: Shane Emmons > Sent: Friday, February 19, 2010 7:02 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] COM Interop Problem > > > On Thu, Feb 18, 2010 at 3:42 PM, Shane Emmons wrote: >> Anytime I invoke a method on a COM object with one or more arguments, >> I get the following error: >> ?Could not convert argument 0 for call to Open. (ArgumentError) >> >> What's preplexing is the argument number is always the last argument, >> so if there are four arguments, the error will be on argument 3. Here >> is an example script that gives the error above: >> >> def new_com_object(prog_id) >> ?System::Activator.CreateInstance(System::Type.GetTypeFromProgID(prog_id)) >> end >> >> xls = new_com_object('Excel.Application') >> xls.Visible = true >> xls.Workbooks.Open('c:\\Book1.xls') >> >> -- >> Shane Emmons >> > > I figured it out, needed to to String#to_clr_string on every argument. > > -- > Shane Emmons > _______________________________________________ > 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 > -- Shane Emmons From sholde4 at gmail.com Fri Feb 19 14:24:36 2010 From: sholde4 at gmail.com (Scott Holden) Date: Fri, 19 Feb 2010 13:24:36 -0600 Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver Message-ID: <4b34c4521002191124qb7ff6d3j3d8550b92b78ecc2@mail.gmail.com> I'm trying to follow the example given at http://ironruby.net/Documentation/Real_Ruby_Applications/Rails for getting ActiveRecord up and running. Whenever I try to run a migration, I'm getting this error. Could anyone point me in the right direction? I'm trying to get a simple rails app up and running, then I want to start trying to get Redmine working on IronRuby. Redmine is my company's only internal Rails app at the moment, but I'd like to use it as a way to get people started using IronRuby. It would be a great way to integrate a Rails application with our internal ORM and create a Redmine plugin to tie into our deployment system. Here's my trace from rake db:migrate C:\Documents and Settings\sholden\My Documents\NetBeansProjects\redmine>irake db:migrate --trace (in C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! undefined method `columns' for :ado:Symbol C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:862:in`raw_select' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:827:in`select' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in`select_all' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in`select_all_with_query_cache' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in`select_one' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in`select_value' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in`database_version' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in`info_schema_query' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1448:in`silence' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in`info_schema_query' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in`database_version' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:219:in `database_year' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:191:in`initialize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ironruby-sqlserver-0.1.0/lib/activerecord-sqlserver-adapter/adonet_patch.rb:36:in`sqlserver_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in`new_connection' :0:in `__send__' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in`checkout_new_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in`checkout' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in`checkout' :0:in `loop' C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in`mon_synchronize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in`checkout' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in`connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in`retrieve_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in`retrieve_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in`connection' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in `quoted_left_column_name' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in `acts_as_nested_set' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/app/models/project.rb:54 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380: in `load_file' :0:in `load' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379: in `load_file' dependencies.rb:490:in `new_constants_in' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259: in `require_or_load' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load_with_engine_additions' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' dependencies.rb:398:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:98:in`const_missing' :0:in `__send__' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/app/models/attachment.rb:31 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in`load_file' :0:in `load' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379 :in `load_file' dependencies.rb:490:in `new_constants_in' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in`require_or_load' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load_with_engine_additions' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in`load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:32:in `acts_as_attachable' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/app/models/message.rb:22 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in`load_file' :0:in `load' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in`load_file' dependencies.rb:490:in `new_constants_in' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in`require_or_load' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load_with_engine_additions' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in`load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:157:in`observed_class' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:183:in`observed_classes' inflector.rb:360:in `constantize' :0:in `each' inflector.rb:355:in `constantize' inflections.rb:161:in `constantize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:166:in`initialize' C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/singleton.rb:94 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:38:in`instantiate_observers' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:36:in`instantiate_observers' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:15:in`define_dispatcher_callbacks ' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in`evaluate_method ' :0:in `[]' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in`call ' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in`run' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in`run' :0:in `send' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in`run_callbacks ' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in`run_prepare_callbacks ' :0:in `__send__' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in`prepare_dispatcher' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in`process' :0:in `send' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in`run' Thanks for any advice, -Scott -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivan at whiterabbitconsulting.eu Fri Feb 19 15:24:27 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Fri, 19 Feb 2010 13:24:27 -0700 Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver In-Reply-To: <4b34c4521002191124qb7ff6d3j3d8550b92b78ecc2@mail.gmail.com> References: <4b34c4521002191124qb7ff6d3j3d8550b92b78ecc2@mail.gmail.com> Message-ID: could I see your database.yml file? --- 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, Feb 19, 2010 at 12:24 PM, Scott Holden wrote: > I'm trying to follow the example given at > http://ironruby.net/Documentation/Real_Ruby_Applications/Rails for getting > ActiveRecord up and running. Whenever I try to run a migration, I'm getting > this error. Could anyone point me in the right direction? I'm trying to > get a simple rails app up and running, then I want to start trying to get > Redmine working on IronRuby. Redmine is my company's only internal Rails > app at the moment, but I'd like to use it as a way to get people started > using IronRuby. It would be a great way to integrate a Rails application > with our internal ORM and create a Redmine plugin to tie into our deployment > system. > > Here's my trace from rake db:migrate > > C:\Documents and Settings\sholden\My > Documents\NetBeansProjects\redmine>irake db:migrate --trace > (in C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine) > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > rake aborted! > undefined method `columns' for :ado:Symbol > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:862:in`raw_select' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:827:in`select' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in`select_all' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in`select_all_with_query_cache' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in`select_one' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in`select_value' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in`database_version' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in`info_schema_query' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1448:in`silence' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in`info_schema_query' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in`database_version' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:219:in > `database_year' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:191:in`initialize' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/ironruby-sqlserver-0.1.0/lib/activerecord-sqlserver-adapter/adonet_patch.rb:36:in`sqlserver_connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in`new_connection' > :0:in `__send__' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in`checkout_new_connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in`checkout' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in`checkout' > :0:in `loop' > C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in`mon_synchronize' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in`checkout' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in`connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in`retrieve_connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in`retrieve_connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in`connection' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in > `quoted_left_column_name' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in > `acts_as_nested_set' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/app/models/project.rb:54 > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380: > in `load_file' > :0:in `load' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379: > in `load_file' > dependencies.rb:490:in `new_constants_in' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259: > in `require_or_load' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in > `require_or_load_with_engine_additions' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > dependencies.rb:398:in `load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:98:in`const_missing' > :0:in `__send__' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/app/models/attachment.rb:31 > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in`load_file' > :0:in `load' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379 > :in `load_file' > dependencies.rb:490:in `new_constants_in' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in`require_or_load' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in > `require_or_load_with_engine_additions' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:32:in > `acts_as_attachable' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/app/models/message.rb:22 > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in`load_file' > :0:in `load' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in`load_file' > dependencies.rb:490:in `new_constants_in' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in`require_or_load' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in > `require_or_load_with_engine_additions' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:157:in`observed_class' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:183:in`observed_classes' > inflector.rb:360:in `constantize' > :0:in `each' > inflector.rb:355:in `constantize' > inflections.rb:161:in `constantize' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:166:in`initialize' > C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/singleton.rb:94 > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:38:in`instantiate_observers' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:36:in`instantiate_observers' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:15:in`define_dispatcher_callbacks > ' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in`evaluate_method > ' > :0:in `[]' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in`call > ' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in`run' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in`run' > :0:in `send' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in`run_callbacks > ' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in`run_prepare_callbacks > ' > :0:in `__send__' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in`prepare_dispatcher' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in`process' > :0:in `send' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in`run' > > Thanks for any advice, > > -Scott > > _______________________________________________ > 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 Fri Feb 19 15:25:40 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Fri, 19 Feb 2010 20:25:40 +0000 Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver In-Reply-To: <4b34c4521002191124qb7ff6d3j3d8550b92b78ecc2@mail.gmail.com> References: <4b34c4521002191124qb7ff6d3j3d8550b92b78ecc2@mail.gmail.com> Message-ID: <6459203F8B1AF641995AE49D47FA51A704085F@TK5EX14MBXC134.redmond.corp.microsoft.com> Scott, I see you are using 2.3.4 of the activerecord-sqlserver-adapter gem. Can you lock down on 2.3.1 of the gem instead using something like the following in your Ruby code before you do "require 'ironruby-sqlserver'": gem "activerecord-sqlserver-adapter", "= 2.3.1" They dropped support for DBI within the last week. The links below have info about the change. http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/4cf40c1330aef3a?hl=en http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/647522f857e3c31c?hl=en If locking down on 2.3.1 works for you, we can just add that to ironruby-sqlserver. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Scott Holden Sent: Friday, February 19, 2010 11:25 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver I'm trying to follow the example given at http://ironruby.net/Documentation/Real_Ruby_Applications/Rails for getting ActiveRecord up and running. Whenever I try to run a migration, I'm getting this error. Could anyone point me in the right direction? I'm trying to get a simple rails app up and running, then I want to start trying to get Redmine working on IronRuby. Redmine is my company's only internal Rails app at the moment, but I'd like to use it as a way to get people started using IronRuby. It would be a great way to integrate a Rails application with our internal ORM and create a Redmine plugin to tie into our deployment system. Here's my trace from rake db:migrate C:\Documents and Settings\sholden\My Documents\NetBeansProjects\redmine>irake db:migrate --trace (in C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! undefined method `columns' for :ado:Symbol C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:862:in `raw_select' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:827:in `select' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in `select_all_with_query_cache' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in `select_one' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in `select_value' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in `database_version' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in `info_schema_query' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1448:in `silence' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in `info_schema_query' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in `database_version' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:219:in `database_year' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:191:in `initialize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ironruby-sqlserver-0.1.0/lib/activerecord-sqlserver-adapter/adonet_patch.rb:36:in `sqlserver_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection' :0:in `__send__' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout' :0:in `loop' C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in `mon_synchronize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in `quoted_left_column_name' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in `acts_as_nested_set' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/app/models/project.rb:54 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380: in `load_file' :0:in `load' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379: in `load_file' dependencies.rb:490:in `new_constants_in' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259: in `require_or_load' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load_with_engine_additions' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' dependencies.rb:398:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:98:in `const_missing' :0:in `__send__' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/app/models/attachment.rb:31 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_file' :0:in `load' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379 :in `load_file' dependencies.rb:490:in `new_constants_in' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in `require_or_load' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load_with_engine_additions' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:32:in `acts_as_attachable' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/app/models/message.rb:22 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_file' :0:in `load' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in `load_file' dependencies.rb:490:in `new_constants_in' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in `require_or_load' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load_with_engine_additions' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:157:in `observed_class' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:183:in `observed_classes' inflector.rb:360:in `constantize' :0:in `each' inflector.rb:355:in `constantize' inflections.rb:161:in `constantize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:166:in `initialize' C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/singleton.rb:94 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:38:in `instantiate_observers' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:36:in `instantiate_observers' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:15:in`define_dispatcher_callbacks' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in`evaluate_method' :0:in `[]' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in`call' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run' :0:in `send' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in`run_callbacks' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in`run_prepare_callbacks' :0:in `__send__' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in `prepare_dispatcher' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in `process' :0:in `send' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run' Thanks for any advice, -Scott -------------- next part -------------- An HTML attachment was scrubbed... URL: From sholde4 at gmail.com Fri Feb 19 17:29:00 2010 From: sholde4 at gmail.com (Scott Holden) Date: Fri, 19 Feb 2010 16:29:00 -0600 Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver In-Reply-To: <6459203F8B1AF641995AE49D47FA51A704085F@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <4b34c4521002191124qb7ff6d3j3d8550b92b78ecc2@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A704085F@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: <4b34c4521002191429s7af89288ha4753b13ed9a17c6@mail.gmail.com> Locking down 2.3.1 fixed the old error, now I'm just having a connection problem. BTW, there's no remote gem for 2.3.1, so people will need to pull it from github and build it themselves for now. Here's my database.yml: development: mode: ADONET adapter: sqlserver host: webdevelopment1 database: redmine_development integrated_security: true On Fri, Feb 19, 2010 at 2:25 PM, Shri Borde wrote: > Scott, I see you are using 2.3.4 of the activerecord-sqlserver-adapter > gem. Can you lock down on 2.3.1 of the gem instead using something like the > following in your Ruby code before you do ?require ?ironruby-sqlserver??: > > > > gem ?activerecord-sqlserver-adapter?, ?= 2.3.1? > > > > They dropped support for DBI within the last week. The links below have > info about the change. > > > http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/4cf40c1330aef3a?hl=en > > > http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/647522f857e3c31c?hl=en > > > > If locking down on 2.3.1 works for you, we can just add that to > ironruby-sqlserver. > > > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Scott Holden > *Sent:* Friday, February 19, 2010 11:25 AM > *To:* ironruby-core at rubyforge.org > *Subject:* [Ironruby-core] Getting up and running with ActiveRecord + > Sqlserver > > > > I'm trying to follow the example given at > http://ironruby.net/Documentation/Real_Ruby_Applications/Rails for getting > ActiveRecord up and running. Whenever I try to run a migration, I'm getting > this error. Could anyone point me in the right direction? I'm trying to > get a simple rails app up and running, then I want to start trying to get > Redmine working on IronRuby. Redmine is my company's only internal Rails > app at the moment, but I'd like to use it as a way to get people started > using IronRuby. It would be a great way to integrate a Rails application > with our internal ORM and create a Redmine plugin to tie into our deployment > system. > > Here's my trace from rake db:migrate > > C:\Documents and Settings\sholden\My > Documents\NetBeansProjects\redmine>irake db:migrate --trace > (in C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine) > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > rake aborted! > undefined method `columns' for :ado:Symbol > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:862:in`raw_select' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:827:in`select' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in`select_all' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in`select_all_with_query_cache' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in`select_one' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in`select_value' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in`database_version' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in`info_schema_query' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1448:in`silence' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in`info_schema_query' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in`database_version' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:219:in > `database_year' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:191:in`initialize' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/ironruby-sqlserver-0.1.0/lib/activerecord-sqlserver-adapter/adonet_patch.rb:36:in`sqlserver_connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in`new_connection' > :0:in `__send__' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in`checkout_new_connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in`checkout' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in`checkout' > :0:in `loop' > C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in`mon_synchronize' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in`checkout' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in`connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in`retrieve_connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in`retrieve_connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in`connection' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in > `quoted_left_column_name' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in > `acts_as_nested_set' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/app/models/project.rb:54 > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380: > in `load_file' > :0:in `load' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379: > in `load_file' > dependencies.rb:490:in `new_constants_in' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259: > in `require_or_load' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in > `require_or_load_with_engine_additions' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > dependencies.rb:398:in `load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:98:in`const_missing' > :0:in `__send__' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/app/models/attachment.rb:31 > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in`load_file' > :0:in `load' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379 > :in `load_file' > dependencies.rb:490:in `new_constants_in' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in`require_or_load' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in > `require_or_load_with_engine_additions' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:32:in > `acts_as_attachable' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/app/models/message.rb:22 > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in`load_file' > :0:in `load' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in`load_file' > dependencies.rb:490:in `new_constants_in' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in`require_or_load' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in > `require_or_load_with_engine_additions' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:157:in`observed_class' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:183:in`observed_classes' > inflector.rb:360:in `constantize' > :0:in `each' > inflector.rb:355:in `constantize' > inflections.rb:161:in `constantize' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:166:in`initialize' > C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/singleton.rb:94 > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:38:in`instantiate_observers' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:36:in`instantiate_observers' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:15:in`define_dispatcher_callbacks > ' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in`evaluate_method > ' > :0:in `[]' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in`call > ' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in`run' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in`run' > :0:in `send' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in`run_callbacks > ' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in`run_prepare_callbacks > ' > :0:in `__send__' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in`prepare_dispatcher' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in`process' > :0:in `send' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in`run' > > Thanks for any advice, > > -Scott > > _______________________________________________ > 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 Fri Feb 19 17:36:49 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Fri, 19 Feb 2010 22:36:49 +0000 Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver In-Reply-To: <4b34c4521002191429s7af89288ha4753b13ed9a17c6@mail.gmail.com> References: <4b34c4521002191124qb7ff6d3j3d8550b92b78ecc2@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A704085F@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191429s7af89288ha4753b13ed9a17c6@mail.gmail.com> Message-ID: <6459203F8B1AF641995AE49D47FA51A7040AC3@TK5EX14MBXC134.redmond.corp.microsoft.com> We can lock back to 2.3 which is the version that we check against. Is the connection problem related to IronRuby or specific to your setup? From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Scott Holden Sent: Friday, February 19, 2010 2:29 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver Locking down 2.3.1 fixed the old error, now I'm just having a connection problem. BTW, there's no remote gem for 2.3.1, so people will need to pull it from github and build it themselves for now. Here's my database.yml: development: mode: ADONET adapter: sqlserver host: webdevelopment1 database: redmine_development integrated_security: true On Fri, Feb 19, 2010 at 2:25 PM, Shri Borde > wrote: Scott, I see you are using 2.3.4 of the activerecord-sqlserver-adapter gem. Can you lock down on 2.3.1 of the gem instead using something like the following in your Ruby code before you do "require 'ironruby-sqlserver'": gem "activerecord-sqlserver-adapter", "= 2.3.1" They dropped support for DBI within the last week. The links below have info about the change. http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/4cf40c1330aef3a?hl=en http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/647522f857e3c31c?hl=en If locking down on 2.3.1 works for you, we can just add that to ironruby-sqlserver. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Scott Holden Sent: Friday, February 19, 2010 11:25 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver I'm trying to follow the example given at http://ironruby.net/Documentation/Real_Ruby_Applications/Rails for getting ActiveRecord up and running. Whenever I try to run a migration, I'm getting this error. Could anyone point me in the right direction? I'm trying to get a simple rails app up and running, then I want to start trying to get Redmine working on IronRuby. Redmine is my company's only internal Rails app at the moment, but I'd like to use it as a way to get people started using IronRuby. It would be a great way to integrate a Rails application with our internal ORM and create a Redmine plugin to tie into our deployment system. Here's my trace from rake db:migrate C:\Documents and Settings\sholden\My Documents\NetBeansProjects\redmine>irake db:migrate --trace (in C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! undefined method `columns' for :ado:Symbol C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:862:in `raw_select' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:827:in `select' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in `select_all_with_query_cache' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in `select_one' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in `select_value' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in `database_version' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in `info_schema_query' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1448:in `silence' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in `info_schema_query' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in `database_version' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:219:in `database_year' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:191:in `initialize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ironruby-sqlserver-0.1.0/lib/activerecord-sqlserver-adapter/adonet_patch.rb:36:in `sqlserver_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection' :0:in `__send__' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout' :0:in `loop' C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in `mon_synchronize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in `quoted_left_column_name' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in `acts_as_nested_set' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/app/models/project.rb:54 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380: in `load_file' :0:in `load' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379: in `load_file' dependencies.rb:490:in `new_constants_in' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259: in `require_or_load' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load_with_engine_additions' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' dependencies.rb:398:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:98:in `const_missing' :0:in `__send__' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/app/models/attachment.rb:31 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_file' :0:in `load' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379 :in `load_file' dependencies.rb:490:in `new_constants_in' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in `require_or_load' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load_with_engine_additions' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:32:in `acts_as_attachable' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/app/models/message.rb:22 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_file' :0:in `load' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in `load_file' dependencies.rb:490:in `new_constants_in' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in `require_or_load' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load_with_engine_additions' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:157:in `observed_class' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:183:in `observed_classes' inflector.rb:360:in `constantize' :0:in `each' inflector.rb:355:in `constantize' inflections.rb:161:in `constantize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:166:in `initialize' C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/singleton.rb:94 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:38:in `instantiate_observers' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:36:in `instantiate_observers' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:15:in`define_dispatcher_callbacks' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in`evaluate_method' :0:in `[]' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in`call' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run' :0:in `send' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in`run_callbacks' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in`run_prepare_callbacks' :0:in `__send__' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in `prepare_dispatcher' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in `process' :0:in `send' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run' Thanks for any advice, -Scott _______________________________________________ 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 sholde4 at gmail.com Fri Feb 19 17:53:00 2010 From: sholde4 at gmail.com (Scott Holden) Date: Fri, 19 Feb 2010 16:53:00 -0600 Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver In-Reply-To: <6459203F8B1AF641995AE49D47FA51A7040AC3@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <4b34c4521002191124qb7ff6d3j3d8550b92b78ecc2@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A704085F@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191429s7af89288ha4753b13ed9a17c6@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040AC3@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: <4b34c4521002191453m233bd341h29210a3407c11b2b@mail.gmail.com> Hah! I'm a moron. Got started looking too deep for my problems, missed my own stupid mistake... web^H^H^Hsqldevelopment1. Thanks a ton for being so helpful. I'm trying migrations from Redmine, but blowing up on 044_set_language_length_to_five. Line 3 seems to be the issue: change_column :users, :language, :string, :limit => 5, :default => "" Here's my trace: C:\Documents and Settings\sholden\My Documents\NetBeansProjects\redmine>irake db:migrate --trace (in C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == Setup: migrating ========================================================== -- create_table("attachments", {:force=>true}) -> 0.1406s -- create_table("auth_sources", {:force=>true}) -> 0.0313s -- create_table("custom_fields", {:force=>true}) -> 0.0156s -- create_table("custom_fields_projects", {:id=>false, :force=>true}) -> 0.0156s -- create_table("custom_fields_trackers", {:id=>false, :force=>true}) -> 0.0469s -- create_table("custom_values", {:force=>true}) -> 0.0313s -- create_table("documents", {:force=>true}) -> 0.0313s -- add_index("documents", ["project_id"], {:name=>"documents_project_id"}) -> 0.0000s -- create_table("enumerations", {:force=>true}) -> 0.0625s -- create_table("issue_categories", {:force=>true}) -> 0.0313s -- add_index("issue_categories", ["project_id"], {:name=>"issue_categories_project_id"}) -> 0.0313s -- create_table("issue_histories", {:force=>true}) -> 0.0781s -- add_index("issue_histories", ["issue_id"], {:name=>"issue_histories_issue_id"}) -> 0.0000s -- create_table("issue_statuses", {:force=>true}) -> 0.0781s -- create_table("issues", {:force=>true}) -> 0.0469s -- add_index("issues", ["project_id"], {:name=>"issues_project_id"}) -> 0.0000s -- create_table("members", {:force=>true}) -> 0.0156s -- create_table("news", {:force=>true}) -> 0.0625s -- add_index("news", ["project_id"], {:name=>"news_project_id"}) -> 0.0000s -- create_table("permissions", {:force=>true}) -> 0.0313s -- create_table("permissions_roles", {:id=>false, :force=>true}) -> 0.0156s -- add_index("permissions_roles", ["role_id"], {:name=>"permissions_roles_role_id"}) -> 0.0156s -- create_table("projects", {:force=>true}) -> 0.0313s -- create_table("roles", {:force=>true}) -> 0.0156s -- create_table("tokens", {:force=>true}) -> 0.0313s -- create_table("trackers", {:force=>true}) -> 0.0313s -- create_table("users", {:force=>true}) -> 0.0313s -- create_table("versions", {:force=>true}) -> 0.0313s -- add_index("versions", ["project_id"], {:name=>"versions_project_id"}) -> 0.0000s -- create_table("workflows", {:force=>true}) -> 0.0313s == Setup: migrated (2.4844s) ================================================= == IssueMove: migrating ====================================================== == IssueMove: migrated (0.1094s) ============================================= == IssueAddNote: migrating =================================================== == IssueAddNote: migrated (0.1406s) ========================================== == ExportPdf: migrating ====================================================== == ExportPdf: migrated (0.1250s) ============================================= == IssueStartDate: migrating ================================================= -- add_column(:issues, :start_date, :date) -> 0.0000s -- add_column(:issues, :done_ratio, :integer, {:default=>0, :null=>false}) -> 0.0313s == IssueStartDate: migrated (0.0469s) ======================================== == CalendarAndActivity: migrating ============================================ == CalendarAndActivity: migrated (0.1250s) =================================== == CreateJournals: migrating ================================================= -- create_table(:journals, {:force=>true}) -> 0.0469s -- create_table(:journal_details, {:force=>true}) -> 0.0313s -- add_index("journals", ["journalized_id", "journalized_type"], {:name=>"journals_journalized_id"}) -> 0.0156s -- add_index("journal_details", ["journal_id"], {:name=>"journal_details_journal_id"}) -> 0.0156s -- drop_table(:issue_histories) -> 0.0156s == CreateJournals: migrated (0.3750s) ======================================== == CreateUserPreferences: migrating ========================================== -- create_table(:user_preferences) -> 0.0156s == CreateUserPreferences: migrated (0.0156s) ================================= == AddHideMailPref: migrating ================================================ -- add_column(:user_preferences, :hide_mail, :boolean, {:default=>false}) -> 0.0156s == AddHideMailPref: migrated (0.0156s) ======================================= == CreateComments: migrating ================================================= -- create_table(:comments) -> 0.0156s == CreateComments: migrated (0.0156s) ======================================== == AddNewsCommentsCount: migrating =========================================== -- add_column(:news, :comments_count, :integer, {:default=>0, :null=>false}) -> 0.0156s == AddNewsCommentsCount: migrated (0.0156s) ================================== == AddCommentsPermissions: migrating ========================================= == AddCommentsPermissions: migrated (0.1094s) ================================ == CreateQueries: migrating ================================================== -- create_table(:queries, {:force=>true}) -> 0.0313s == CreateQueries: migrated (0.0313s) ========================================= == AddQueriesPermissions: migrating ========================================== == AddQueriesPermissions: migrated (0.0938s) ================================= == CreateRepositories: migrating ============================================= -- create_table(:repositories, {:force=>true}) -> 0.0313s == CreateRepositories: migrated (0.0313s) ==================================== == AddRepositoriesPermissions: migrating ===================================== == AddRepositoriesPermissions: migrated (0.1563s) ============================ == CreateSettings: migrating ================================================= -- create_table(:settings, {:force=>true}) -> 0.0156s == CreateSettings: migrated (0.0313s) ======================================== == SetDocAndFilesNotifications: migrating ==================================== == SetDocAndFilesNotifications: migrated (0.2031s) =========================== == AddIssueStatusPosition: migrating ========================================= -- add_column(:issue_statuses, :position, :integer, {:default=>1}) -> 0.0156s == AddIssueStatusPosition: migrated (0.0781s) ================================ == AddRolePosition: migrating ================================================ -- add_column(:roles, :position, :integer, {:default=>1}) -> 0.0156s == AddRolePosition: migrated (0.1719s) ======================================= == AddTrackerPosition: migrating ============================================= -- add_column(:trackers, :position, :integer, {:default=>1}) -> 0.0156s == AddTrackerPosition: migrated (0.0625s) ==================================== == SerializePossiblesValues: migrating ======================================= == SerializePossiblesValues: migrated (0.0469s) ============================== == AddTrackerIsInRoadmap: migrating ========================================== -- add_column(:trackers, :is_in_roadmap, :boolean, {:default=>true, :null=>false}) -> 0.0000s == AddTrackerIsInRoadmap: migrated (0.0000s) ================================= == AddRoadmapPermission: migrating =========================================== == AddRoadmapPermission: migrated (0.1250s) ================================== == AddSearchPermission: migrating ============================================ == AddSearchPermission: migrated (0.0938s) =================================== == AddRepositoryLoginAndPassword: migrating ================================== -- add_column(:repositories, :login, :string, {:limit=>60, :default=>""}) -> 0.0000s -- add_column(:repositories, :password, :string, {:limit=>60, :default=>""}) -> 0.0313s == AddRepositoryLoginAndPassword: migrated (0.0313s) ========================= == CreateWikis: migrating ==================================================== -- create_table(:wikis) -> 0.0000s -- add_index(:wikis, :project_id, {:name=>:wikis_project_id}) -> 0.0000s == CreateWikis: migrated (0.0313s) =========================================== == CreateWikiPages: migrating ================================================ -- create_table(:wiki_pages) -> 0.0156s -- add_index(:wiki_pages, [:wiki_id, :title], {:name=>:wiki_pages_wiki_id_title}) -> 0.0156s == CreateWikiPages: migrated (0.0313s) ======================================= == CreateWikiContents: migrating ============================================= -- create_table(:wiki_contents) -> 0.0156s -- add_index(:wiki_contents, :page_id, {:name=>:wiki_contents_page_id}) -> 0.0000s -- create_table(:wiki_content_versions) -> 0.0313s -- add_index(:wiki_content_versions, :wiki_content_id, {:name=>:wiki_content_versions_wcid}) -> 0.0000s == CreateWikiContents: migrated (0.0469s) ==================================== == AddProjectsFeedsPermissions: migrating ==================================== == AddProjectsFeedsPermissions: migrated (0.0938s) =========================== == AddRepositoryRootUrl: migrating =========================================== -- add_column(:repositories, :root_url, :string, {:limit=>255, :default=>""}) -> 0.0000s == AddRepositoryRootUrl: migrated (0.0156s) ================================== == CreateTimeEntries: migrating ============================================== -- create_table(:time_entries) -> 0.0156s -- add_index(:time_entries, [:project_id], {:name=>:time_entries_project_id}) -> 0.0000s -- add_index(:time_entries, [:issue_id], {:name=>:time_entries_issue_id}) -> 0.0156s == CreateTimeEntries: migrated (0.0313s) ===================================== == AddTimelogPermissions: migrating ========================================== == AddTimelogPermissions: migrated (0.0938s) ================================= == CreateChangesets: migrating =============================================== -- create_table(:changesets) -> 0.0000s -- add_index(:changesets, [:repository_id, :revision], {:unique=>true, :name=>:changesets_repos_rev}) -> 0.0156s == CreateChangesets: migrated (0.0313s) ====================================== == CreateChanges: migrating ================================================== -- create_table(:changes) -> 0.0313s -- add_index(:changes, [:changeset_id], {:name=>:changesets_changeset_id}) -> 0.0000s == CreateChanges: migrated (0.0313s) ========================================= == AddChangesetCommitDate: migrating ========================================= -- add_column(:changesets, :commit_date, :date) -> 0.0156s == AddChangesetCommitDate: migrated (0.0313s) ================================ == AddProjectIdentifier: migrating =========================================== -- add_column(:projects, :identifier, :string, {:limit=>20}) -> 0.0000s == AddProjectIdentifier: migrated (0.0000s) ================================== == AddCustomFieldIsFilter: migrating ========================================= -- add_column(:custom_fields, :is_filter, :boolean, {:null=>false, :default=>false}) -> 0.0000s == AddCustomFieldIsFilter: migrated (0.0000s) ================================ == CreateWatchers: migrating ================================================= -- create_table(:watchers) -> 0.0156s == CreateWatchers: migrated (0.0156s) ======================================== == CreateChangesetsIssues: migrating ========================================= -- create_table(:changesets_issues, {:id=>false}) -> 0.0156s -- add_index(:changesets_issues, [:changeset_id, :issue_id], {:unique=>true, :name=>:changesets_issues_ids}) -> 0.0000s == CreateChangesetsIssues: migrated (0.0156s) ================================ == RenameCommentToComments: migrating ======================================== == RenameCommentToComments: migrated (0.4063s) =============================== == CreateIssueRelations: migrating =========================================== -- create_table(:issue_relations) -> 0.0156s == CreateIssueRelations: migrated (0.0156s) ================================== == AddRelationsPermissions: migrating ======================================== == AddRelationsPermissions: migrated (0.1250s) =============================== == SetLanguageLengthToFive: migrating ======================================== -- change_column(:users, :language, :string, {:limit=>5, :default=>""}) rake aborted! An error has occurred, this and all later migrations canceled: Invalid attempt to call Read when reader is closed. System.Data:0:in `ReadInternal' System.Data:0:in `Read' statement.rb:48:in `fetch' statement.rb:207:in `fetch' statement.rb:236:in `each' IronRuby.Libraries:0:in `Each' :0:in `inject' sqlserver_adapter.rb:878:in `handle_as_array' sqlserver_adapter.rb:862:in `raw_select' sqlserver_adapter.rb:814:in `select' database_statements.rb:6:in `select_all' query_cache.rb:58:in `select_all_with_query_cache' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn ection_adapters/sqlserver_adapter.rb:911:in `remove_default_constraint' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn ection_adapters/sqlserver_adapter.rb:655:in `change_column' :0:in `__send__' migration.rb:348:in `method_missing' migration.rb:328:in `say_with_time' benchmark.rb:291:in `measure' migration.rb:325:in `say_with_time' migration.rb:345:in `method_missing' ./db/migrate/044_set_language_length_to_five.rb:3:in `up' :0:in `send' migration.rb:282:in `migrate' benchmark.rb:291:in `measure' migration.rb:273:in `migrate' :0:in `send' C:1:in `migrate' migration.rb:485:in `migrate' :0:in `call' migration.rb:560:in `ddl_transaction' database_statements.rb:113:in `transaction' transactions.rb:180:in `transaction' migration.rb:558:in `ddl_transaction' migration.rb:472:in `migrate' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:472:in`m igrate' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:400:in`u p' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:383:in`m igrate' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:116 :0:in `[]' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in`invoke_with_call_chain' C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in`mon_synchronize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in`invoke_with_call_chain' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in`invoke_task' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in`top_level' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in`top_level' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in`standard_exception_handling ' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in`top_level' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in`standard_exception_handling ' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 :0:in `load' C:/Program Files/IronRuby 0.9.4.0/bin/irake:19 On Fri, Feb 19, 2010 at 4:36 PM, Shri Borde wrote: > We can lock back to 2.3 which is the version that we check against. Is > the connection problem related to IronRuby or specific to your setup? > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Scott Holden > *Sent:* Friday, February 19, 2010 2:29 PM > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Getting up and running with ActiveRecord + > Sqlserver > > > > Locking down 2.3.1 fixed the old error, now I'm just having a connection > problem. BTW, there's no remote gem for 2.3.1, so people will need to pull > it from github and build it themselves for now. Here's my database.yml: > > development: > mode: ADONET > adapter: sqlserver > host: webdevelopment1 > database: redmine_development > integrated_security: true > > On Fri, Feb 19, 2010 at 2:25 PM, Shri Borde > wrote: > > Scott, I see you are using 2.3.4 of the activerecord-sqlserver-adapter gem. > Can you lock down on 2.3.1 of the gem instead using something like the > following in your Ruby code before you do ?require ?ironruby-sqlserver??: > > > > gem ?activerecord-sqlserver-adapter?, ?= 2.3.1? > > > > They dropped support for DBI within the last week. The links below have > info about the change. > > > http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/4cf40c1330aef3a?hl=en > > > http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/647522f857e3c31c?hl=en > > > > If locking down on 2.3.1 works for you, we can just add that to > ironruby-sqlserver. > > > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Scott Holden > *Sent:* Friday, February 19, 2010 11:25 AM > *To:* ironruby-core at rubyforge.org > *Subject:* [Ironruby-core] Getting up and running with ActiveRecord + > Sqlserver > > > > I'm trying to follow the example given at > http://ironruby.net/Documentation/Real_Ruby_Applications/Rails for getting > ActiveRecord up and running. Whenever I try to run a migration, I'm getting > this error. Could anyone point me in the right direction? I'm trying to > get a simple rails app up and running, then I want to start trying to get > Redmine working on IronRuby. Redmine is my company's only internal Rails > app at the moment, but I'd like to use it as a way to get people started > using IronRuby. It would be a great way to integrate a Rails application > with our internal ORM and create a Redmine plugin to tie into our deployment > system. > > Here's my trace from rake db:migrate > > C:\Documents and Settings\sholden\My > Documents\NetBeansProjects\redmine>irake db:migrate --trace > (in C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine) > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > rake aborted! > undefined method `columns' for :ado:Symbol > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:862:in`raw_select' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:827:in`select' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in`select_all' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in`select_all_with_query_cache' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in`select_one' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in`select_value' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in`database_version' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in`info_schema_query' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1448:in`silence' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in`info_schema_query' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in`database_version' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:219:in > `database_year' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:191:in`initialize' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/ironruby-sqlserver-0.1.0/lib/activerecord-sqlserver-adapter/adonet_patch.rb:36:in`sqlserver_connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in`new_connection' > :0:in `__send__' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in`checkout_new_connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in`checkout' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in`checkout' > :0:in `loop' > C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in`mon_synchronize' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in`checkout' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in`connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in`retrieve_connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in`retrieve_connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in`connection' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in > `quoted_left_column_name' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in > `acts_as_nested_set' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/app/models/project.rb:54 > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380: > in `load_file' > :0:in `load' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379: > in `load_file' > dependencies.rb:490:in `new_constants_in' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259: > in `require_or_load' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in > `require_or_load_with_engine_additions' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > dependencies.rb:398:in `load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:98:in`const_missing' > :0:in `__send__' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/app/models/attachment.rb:31 > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in`load_file' > :0:in `load' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379 > :in `load_file' > dependencies.rb:490:in `new_constants_in' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in`require_or_load' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in > `require_or_load_with_engine_additions' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:32:in > `acts_as_attachable' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/app/models/message.rb:22 > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in`load_file' > :0:in `load' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in`load_file' > dependencies.rb:490:in `new_constants_in' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in`require_or_load' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in > `require_or_load_with_engine_additions' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:157:in`observed_class' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:183:in`observed_classes' > inflector.rb:360:in `constantize' > :0:in `each' > inflector.rb:355:in `constantize' > inflections.rb:161:in `constantize' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:166:in`initialize' > C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/singleton.rb:94 > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:38:in`instantiate_observers' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:36:in`instantiate_observers' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:15:in`define_dispatcher_callbacks > ' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in`evaluate_method > ' > :0:in `[]' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in`call > ' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in`run' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in`run' > :0:in `send' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in`run_callbacks > ' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in`run_prepare_callbacks > ' > :0:in `__send__' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in`prepare_dispatcher' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in`process' > :0:in `send' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in`run' > > Thanks for any advice, > > -Scott > > > _______________________________________________ > 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 sholde4 at gmail.com Fri Feb 19 17:54:28 2010 From: sholde4 at gmail.com (Scott Holden) Date: Fri, 19 Feb 2010 16:54:28 -0600 Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver In-Reply-To: <4b34c4521002191453m233bd341h29210a3407c11b2b@mail.gmail.com> References: <4b34c4521002191124qb7ff6d3j3d8550b92b78ecc2@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A704085F@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191429s7af89288ha4753b13ed9a17c6@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040AC3@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191453m233bd341h29210a3407c11b2b@mail.gmail.com> Message-ID: <4b34c4521002191454i128d24bcu556eed05121262fa@mail.gmail.com> By the way, I'm working with Redmine 0.9.4 stable On Fri, Feb 19, 2010 at 4:53 PM, Scott Holden wrote: > Hah! I'm a moron. Got started looking too deep for my problems, missed my > own stupid mistake... web^H^H^Hsqldevelopment1. Thanks a ton for being so > helpful. > > I'm trying migrations from Redmine, but blowing up on > 044_set_language_length_to_five. > > Line 3 seems to be the issue: > > change_column :users, :language, :string, :limit => 5, :default => "" > > Here's my trace: > > > C:\Documents and Settings\sholden\My > Documents\NetBeansProjects\redmine>irake db:migrate --trace > (in C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine) > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > ** Execute db:migrate > == Setup: migrating > ========================================================== > -- create_table("attachments", {:force=>true}) > -> 0.1406s > -- create_table("auth_sources", {:force=>true}) > -> 0.0313s > -- create_table("custom_fields", {:force=>true}) > -> 0.0156s > -- create_table("custom_fields_projects", {:id=>false, :force=>true}) > -> 0.0156s > -- create_table("custom_fields_trackers", {:id=>false, :force=>true}) > -> 0.0469s > -- create_table("custom_values", {:force=>true}) > -> 0.0313s > -- create_table("documents", {:force=>true}) > -> 0.0313s > -- add_index("documents", ["project_id"], {:name=>"documents_project_id"}) > -> 0.0000s > -- create_table("enumerations", {:force=>true}) > -> 0.0625s > -- create_table("issue_categories", {:force=>true}) > -> 0.0313s > -- add_index("issue_categories", ["project_id"], > {:name=>"issue_categories_project_id"}) > -> 0.0313s > -- create_table("issue_histories", {:force=>true}) > -> 0.0781s > -- add_index("issue_histories", ["issue_id"], > {:name=>"issue_histories_issue_id"}) > -> 0.0000s > -- create_table("issue_statuses", {:force=>true}) > -> 0.0781s > -- create_table("issues", {:force=>true}) > -> 0.0469s > -- add_index("issues", ["project_id"], {:name=>"issues_project_id"}) > -> 0.0000s > -- create_table("members", {:force=>true}) > -> 0.0156s > -- create_table("news", {:force=>true}) > -> 0.0625s > -- add_index("news", ["project_id"], {:name=>"news_project_id"}) > -> 0.0000s > -- create_table("permissions", {:force=>true}) > -> 0.0313s > -- create_table("permissions_roles", {:id=>false, :force=>true}) > -> 0.0156s > -- add_index("permissions_roles", ["role_id"], > {:name=>"permissions_roles_role_id"}) > -> 0.0156s > -- create_table("projects", {:force=>true}) > -> 0.0313s > -- create_table("roles", {:force=>true}) > -> 0.0156s > -- create_table("tokens", {:force=>true}) > -> 0.0313s > -- create_table("trackers", {:force=>true}) > -> 0.0313s > -- create_table("users", {:force=>true}) > -> 0.0313s > -- create_table("versions", {:force=>true}) > -> 0.0313s > -- add_index("versions", ["project_id"], {:name=>"versions_project_id"}) > -> 0.0000s > -- create_table("workflows", {:force=>true}) > -> 0.0313s > == Setup: migrated (2.4844s) > ================================================= > > == IssueMove: migrating > ====================================================== > == IssueMove: migrated (0.1094s) > ============================================= > > == IssueAddNote: migrating > =================================================== > == IssueAddNote: migrated (0.1406s) > ========================================== > > == ExportPdf: migrating > ====================================================== > == ExportPdf: migrated (0.1250s) > ============================================= > > == IssueStartDate: migrating > ================================================= > -- add_column(:issues, :start_date, :date) > -> 0.0000s > -- add_column(:issues, :done_ratio, :integer, {:default=>0, :null=>false}) > -> 0.0313s > == IssueStartDate: migrated (0.0469s) > ======================================== > > == CalendarAndActivity: migrating > ============================================ > == CalendarAndActivity: migrated (0.1250s) > =================================== > > == CreateJournals: migrating > ================================================= > -- create_table(:journals, {:force=>true}) > -> 0.0469s > -- create_table(:journal_details, {:force=>true}) > -> 0.0313s > -- add_index("journals", ["journalized_id", "journalized_type"], > {:name=>"journals_journalized_id"}) > -> 0.0156s > -- add_index("journal_details", ["journal_id"], > {:name=>"journal_details_journal_id"}) > -> 0.0156s > -- drop_table(:issue_histories) > -> 0.0156s > == CreateJournals: migrated (0.3750s) > ======================================== > > == CreateUserPreferences: migrating > ========================================== > -- create_table(:user_preferences) > -> 0.0156s > == CreateUserPreferences: migrated (0.0156s) > ================================= > > == AddHideMailPref: migrating > ================================================ > -- add_column(:user_preferences, :hide_mail, :boolean, {:default=>false}) > -> 0.0156s > == AddHideMailPref: migrated (0.0156s) > ======================================= > > == CreateComments: migrating > ================================================= > -- create_table(:comments) > -> 0.0156s > == CreateComments: migrated (0.0156s) > ======================================== > > == AddNewsCommentsCount: migrating > =========================================== > -- add_column(:news, :comments_count, :integer, {:default=>0, > :null=>false}) > -> 0.0156s > == AddNewsCommentsCount: migrated (0.0156s) > ================================== > > == AddCommentsPermissions: migrating > ========================================= > == AddCommentsPermissions: migrated (0.1094s) > ================================ > > == CreateQueries: migrating > ================================================== > -- create_table(:queries, {:force=>true}) > -> 0.0313s > == CreateQueries: migrated (0.0313s) > ========================================= > > == AddQueriesPermissions: migrating > ========================================== > == AddQueriesPermissions: migrated (0.0938s) > ================================= > > == CreateRepositories: migrating > ============================================= > -- create_table(:repositories, {:force=>true}) > -> 0.0313s > == CreateRepositories: migrated (0.0313s) > ==================================== > > == AddRepositoriesPermissions: migrating > ===================================== > == AddRepositoriesPermissions: migrated (0.1563s) > ============================ > > == CreateSettings: migrating > ================================================= > -- create_table(:settings, {:force=>true}) > -> 0.0156s > == CreateSettings: migrated (0.0313s) > ======================================== > > == SetDocAndFilesNotifications: migrating > ==================================== > == SetDocAndFilesNotifications: migrated (0.2031s) > =========================== > > == AddIssueStatusPosition: migrating > ========================================= > -- add_column(:issue_statuses, :position, :integer, {:default=>1}) > -> 0.0156s > == AddIssueStatusPosition: migrated (0.0781s) > ================================ > > == AddRolePosition: migrating > ================================================ > -- add_column(:roles, :position, :integer, {:default=>1}) > -> 0.0156s > == AddRolePosition: migrated (0.1719s) > ======================================= > > == AddTrackerPosition: migrating > ============================================= > -- add_column(:trackers, :position, :integer, {:default=>1}) > -> 0.0156s > == AddTrackerPosition: migrated (0.0625s) > ==================================== > > == SerializePossiblesValues: migrating > ======================================= > == SerializePossiblesValues: migrated (0.0469s) > ============================== > > == AddTrackerIsInRoadmap: migrating > ========================================== > -- add_column(:trackers, :is_in_roadmap, :boolean, {:default=>true, > :null=>false}) > -> 0.0000s > == AddTrackerIsInRoadmap: migrated (0.0000s) > ================================= > > == AddRoadmapPermission: migrating > =========================================== > == AddRoadmapPermission: migrated (0.1250s) > ================================== > > == AddSearchPermission: migrating > ============================================ > == AddSearchPermission: migrated (0.0938s) > =================================== > > == AddRepositoryLoginAndPassword: migrating > ================================== > -- add_column(:repositories, :login, :string, {:limit=>60, :default=>""}) > -> 0.0000s > -- add_column(:repositories, :password, :string, {:limit=>60, > :default=>""}) > -> 0.0313s > == AddRepositoryLoginAndPassword: migrated (0.0313s) > ========================= > > == CreateWikis: migrating > ==================================================== > -- create_table(:wikis) > -> 0.0000s > -- add_index(:wikis, :project_id, {:name=>:wikis_project_id}) > -> 0.0000s > == CreateWikis: migrated (0.0313s) > =========================================== > > == CreateWikiPages: migrating > ================================================ > -- create_table(:wiki_pages) > -> 0.0156s > -- add_index(:wiki_pages, [:wiki_id, :title], > {:name=>:wiki_pages_wiki_id_title}) > -> 0.0156s > == CreateWikiPages: migrated (0.0313s) > ======================================= > > == CreateWikiContents: migrating > ============================================= > -- create_table(:wiki_contents) > -> 0.0156s > -- add_index(:wiki_contents, :page_id, {:name=>:wiki_contents_page_id}) > -> 0.0000s > -- create_table(:wiki_content_versions) > -> 0.0313s > -- add_index(:wiki_content_versions, :wiki_content_id, > {:name=>:wiki_content_versions_wcid}) > -> 0.0000s > == CreateWikiContents: migrated (0.0469s) > ==================================== > > == AddProjectsFeedsPermissions: migrating > ==================================== > == AddProjectsFeedsPermissions: migrated (0.0938s) > =========================== > > == AddRepositoryRootUrl: migrating > =========================================== > -- add_column(:repositories, :root_url, :string, {:limit=>255, > :default=>""}) > -> 0.0000s > == AddRepositoryRootUrl: migrated (0.0156s) > ================================== > > == CreateTimeEntries: migrating > ============================================== > -- create_table(:time_entries) > -> 0.0156s > -- add_index(:time_entries, [:project_id], > {:name=>:time_entries_project_id}) > -> 0.0000s > -- add_index(:time_entries, [:issue_id], {:name=>:time_entries_issue_id}) > -> 0.0156s > == CreateTimeEntries: migrated (0.0313s) > ===================================== > > == AddTimelogPermissions: migrating > ========================================== > == AddTimelogPermissions: migrated (0.0938s) > ================================= > > == CreateChangesets: migrating > =============================================== > -- create_table(:changesets) > -> 0.0000s > -- add_index(:changesets, [:repository_id, :revision], {:unique=>true, > :name=>:changesets_repos_rev}) > -> 0.0156s > == CreateChangesets: migrated (0.0313s) > ====================================== > > == CreateChanges: migrating > ================================================== > -- create_table(:changes) > -> 0.0313s > -- add_index(:changes, [:changeset_id], {:name=>:changesets_changeset_id}) > -> 0.0000s > == CreateChanges: migrated (0.0313s) > ========================================= > > == AddChangesetCommitDate: migrating > ========================================= > -- add_column(:changesets, :commit_date, :date) > -> 0.0156s > == AddChangesetCommitDate: migrated (0.0313s) > ================================ > > == AddProjectIdentifier: migrating > =========================================== > -- add_column(:projects, :identifier, :string, {:limit=>20}) > -> 0.0000s > == AddProjectIdentifier: migrated (0.0000s) > ================================== > > == AddCustomFieldIsFilter: migrating > ========================================= > -- add_column(:custom_fields, :is_filter, :boolean, {:null=>false, > :default=>false}) > -> 0.0000s > == AddCustomFieldIsFilter: migrated (0.0000s) > ================================ > > == CreateWatchers: migrating > ================================================= > -- create_table(:watchers) > -> 0.0156s > == CreateWatchers: migrated (0.0156s) > ======================================== > > == CreateChangesetsIssues: migrating > ========================================= > -- create_table(:changesets_issues, {:id=>false}) > -> 0.0156s > -- add_index(:changesets_issues, [:changeset_id, :issue_id], > {:unique=>true, :name=>:changesets_issues_ids}) > -> 0.0000s > == CreateChangesetsIssues: migrated (0.0156s) > ================================ > > == RenameCommentToComments: migrating > ======================================== > == RenameCommentToComments: migrated (0.4063s) > =============================== > > == CreateIssueRelations: migrating > =========================================== > -- create_table(:issue_relations) > -> 0.0156s > == CreateIssueRelations: migrated (0.0156s) > ================================== > > == AddRelationsPermissions: migrating > ======================================== > == AddRelationsPermissions: migrated (0.1250s) > =============================== > > == SetLanguageLengthToFive: migrating > ======================================== > -- change_column(:users, :language, :string, {:limit=>5, :default=>""}) > rake aborted! > An error has occurred, this and all later migrations canceled: > > Invalid attempt to call Read when reader is closed. > System.Data:0:in `ReadInternal' > System.Data:0:in `Read' > statement.rb:48:in `fetch' > statement.rb:207:in `fetch' > statement.rb:236:in `each' > IronRuby.Libraries:0:in `Each' > :0:in `inject' > sqlserver_adapter.rb:878:in `handle_as_array' > > sqlserver_adapter.rb:862:in `raw_select' > sqlserver_adapter.rb:814:in `select' > database_statements.rb:6:in `select_all' > query_cache.rb:58:in `select_all_with_query_cache' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn > ection_adapters/sqlserver_adapter.rb:911:in `remove_default_constraint' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn > ection_adapters/sqlserver_adapter.rb:655:in `change_column' > :0:in `__send__' > migration.rb:348:in `method_missing' > migration.rb:328:in `say_with_time' > benchmark.rb:291:in `measure' > migration.rb:325:in `say_with_time' > migration.rb:345:in `method_missing' > ./db/migrate/044_set_language_length_to_five.rb:3:in `up' > :0:in `send' > migration.rb:282:in `migrate' > benchmark.rb:291:in `measure' > migration.rb:273:in `migrate' > :0:in `send' > C:1:in `migrate' > migration.rb:485:in `migrate' > :0:in `call' > migration.rb:560:in `ddl_transaction' > database_statements.rb:113:in `transaction' > transactions.rb:180:in `transaction' > migration.rb:558:in `ddl_transaction' > migration.rb:472:in `migrate' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:472:in`m > igrate' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:400:in`u > p' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:383:in`m > igrate' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:116 > :0:in `[]' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in`invoke_with_call_chain' > > C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in`mon_synchronize' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in`invoke_with_call_chain' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in`invoke_task' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in`top_level' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in`top_level' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in`standard_exception_handling > ' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in`top_level' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in`standard_exception_handling > ' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 > :0:in `load' > C:/Program Files/IronRuby 0.9.4.0/bin/irake:19 > > > On Fri, Feb 19, 2010 at 4:36 PM, Shri Borde wrote: > >> We can lock back to 2.3 which is the version that we check against. Is >> the connection problem related to IronRuby or specific to your setup? >> >> >> >> *From:* ironruby-core-bounces at rubyforge.org [mailto: >> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Scott Holden >> *Sent:* Friday, February 19, 2010 2:29 PM >> >> *To:* ironruby-core at rubyforge.org >> *Subject:* Re: [Ironruby-core] Getting up and running with ActiveRecord + >> Sqlserver >> >> >> >> Locking down 2.3.1 fixed the old error, now I'm just having a connection >> problem. BTW, there's no remote gem for 2.3.1, so people will need to pull >> it from github and build it themselves for now. Here's my database.yml: >> >> development: >> mode: ADONET >> adapter: sqlserver >> host: webdevelopment1 >> database: redmine_development >> integrated_security: true >> >> On Fri, Feb 19, 2010 at 2:25 PM, Shri Borde >> wrote: >> >> Scott, I see you are using 2.3.4 of the activerecord-sqlserver-adapter >> gem. Can you lock down on 2.3.1 of the gem instead using something like the >> following in your Ruby code before you do ?require ?ironruby-sqlserver??: >> >> >> >> gem ?activerecord-sqlserver-adapter?, ?= 2.3.1? >> >> >> >> They dropped support for DBI within the last week. The links below have >> info about the change. >> >> >> http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/4cf40c1330aef3a?hl=en >> >> >> http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/647522f857e3c31c?hl=en >> >> >> >> If locking down on 2.3.1 works for you, we can just add that to >> ironruby-sqlserver. >> >> >> >> >> >> *From:* ironruby-core-bounces at rubyforge.org [mailto: >> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Scott Holden >> *Sent:* Friday, February 19, 2010 11:25 AM >> *To:* ironruby-core at rubyforge.org >> *Subject:* [Ironruby-core] Getting up and running with ActiveRecord + >> Sqlserver >> >> >> >> I'm trying to follow the example given at >> http://ironruby.net/Documentation/Real_Ruby_Applications/Rails for >> getting ActiveRecord up and running. Whenever I try to run a migration, I'm >> getting this error. Could anyone point me in the right direction? I'm >> trying to get a simple rails app up and running, then I want to start trying >> to get Redmine working on IronRuby. Redmine is my company's only internal >> Rails app at the moment, but I'd like to use it as a way to get people >> started using IronRuby. It would be a great way to integrate a Rails >> application with our internal ORM and create a Redmine plugin to tie into >> our deployment system. >> >> Here's my trace from rake db:migrate >> >> C:\Documents and Settings\sholden\My >> Documents\NetBeansProjects\redmine>irake db:migrate --trace >> (in C:/Documents and Settings/sholden/My >> Documents/NetBeansProjects/redmine) >> ** Invoke db:migrate (first_time) >> ** Invoke environment (first_time) >> ** Execute environment >> rake aborted! >> undefined method `columns' for :ado:Symbol >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:862:in`raw_select' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:827:in`select' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in`select_all' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in`select_all_with_query_cache' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in`select_one' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in`select_value' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in`database_version' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in`info_schema_query' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1448:in`silence' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in`info_schema_query' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in`database_version' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:219:in >> `database_year' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:191:in`initialize' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/ironruby-sqlserver-0.1.0/lib/activerecord-sqlserver-adapter/adonet_patch.rb:36:in`sqlserver_connection' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in`new_connection' >> :0:in `__send__' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in`checkout_new_connection' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in`checkout' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in`checkout' >> :0:in `loop' >> C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in`mon_synchronize' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in`checkout' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in`connection' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in`retrieve_connection' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in`retrieve_connection' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in`connection' >> C:/Documents and Settings/sholden/My >> Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in >> `quoted_left_column_name' >> C:/Documents and Settings/sholden/My >> Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in >> `acts_as_nested_set' >> C:/Documents and Settings/sholden/My >> Documents/NetBeansProjects/redmine/app/models/project.rb:54 >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380: >> in `load_file' >> :0:in `load' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379: >> in `load_file' >> dependencies.rb:490:in `new_constants_in' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259: >> in `require_or_load' >> C:/Documents and Settings/sholden/My >> Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in >> `require_or_load_with_engine_additions' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' >> dependencies.rb:398:in `load_missing_constant' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:98:in`const_missing' >> :0:in `__send__' >> C:/Documents and Settings/sholden/My >> Documents/NetBeansProjects/redmine/app/models/attachment.rb:31 >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in`load_file' >> :0:in `load' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379 >> :in `load_file' >> dependencies.rb:490:in `new_constants_in' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in`require_or_load' >> C:/Documents and Settings/sholden/My >> Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in >> `require_or_load_with_engine_additions' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in`load_missing_constant' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' >> C:/Documents and Settings/sholden/My >> Documents/NetBeansProjects/redmine/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:32:in >> `acts_as_attachable' >> C:/Documents and Settings/sholden/My >> Documents/NetBeansProjects/redmine/app/models/message.rb:22 >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in`load_file' >> :0:in `load' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in`load_file' >> dependencies.rb:490:in `new_constants_in' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in`require_or_load' >> C:/Documents and Settings/sholden/My >> Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in >> `require_or_load_with_engine_additions' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in`load_missing_constant' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:157:in`observed_class' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:183:in`observed_classes' >> inflector.rb:360:in `constantize' >> :0:in `each' >> inflector.rb:355:in `constantize' >> inflections.rb:161:in `constantize' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:166:in`initialize' >> C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/singleton.rb:94 >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:38:in`instantiate_observers' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:36:in`instantiate_observers' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:15:in`define_dispatcher_callbacks >> ' >> :0:in `each' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in`evaluate_method >> ' >> :0:in `[]' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in`call >> ' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in`run' >> :0:in `each' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in`run' >> :0:in `send' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in`run_callbacks >> ' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in`run_prepare_callbacks >> ' >> :0:in `__send__' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in`prepare_dispatcher' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in`process' >> :0:in `send' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in`run' >> >> Thanks for any advice, >> >> -Scott >> >> >> _______________________________________________ >> 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 sholde4 at gmail.com Fri Feb 19 17:56:04 2010 From: sholde4 at gmail.com (Scott Holden) Date: Fri, 19 Feb 2010 16:56:04 -0600 Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver In-Reply-To: <4b34c4521002191454i128d24bcu556eed05121262fa@mail.gmail.com> References: <4b34c4521002191124qb7ff6d3j3d8550b92b78ecc2@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A704085F@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191429s7af89288ha4753b13ed9a17c6@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040AC3@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191453m233bd341h29210a3407c11b2b@mail.gmail.com> <4b34c4521002191454i128d24bcu556eed05121262fa@mail.gmail.com> Message-ID: <4b34c4521002191456x44b3685ep6f95937ccb71d813@mail.gmail.com> Make that 0.9.2. Apparently the 0.9 versioning is getting mixed up in my head :P On Fri, Feb 19, 2010 at 4:54 PM, Scott Holden wrote: > By the way, I'm working with Redmine 0.9.4 stable > > > On Fri, Feb 19, 2010 at 4:53 PM, Scott Holden wrote: > >> Hah! I'm a moron. Got started looking too deep for my problems, missed >> my own stupid mistake... web^H^H^Hsqldevelopment1. Thanks a ton for being >> so helpful. >> >> I'm trying migrations from Redmine, but blowing up on >> 044_set_language_length_to_five. >> >> Line 3 seems to be the issue: >> >> change_column :users, :language, :string, :limit => 5, :default => "" >> >> Here's my trace: >> >> >> C:\Documents and Settings\sholden\My >> Documents\NetBeansProjects\redmine>irake db:migrate --trace >> (in C:/Documents and Settings/sholden/My >> Documents/NetBeansProjects/redmine) >> ** Invoke db:migrate (first_time) >> ** Invoke environment (first_time) >> ** Execute environment >> ** Execute db:migrate >> == Setup: migrating >> ========================================================== >> -- create_table("attachments", {:force=>true}) >> -> 0.1406s >> -- create_table("auth_sources", {:force=>true}) >> -> 0.0313s >> -- create_table("custom_fields", {:force=>true}) >> -> 0.0156s >> -- create_table("custom_fields_projects", {:id=>false, :force=>true}) >> -> 0.0156s >> -- create_table("custom_fields_trackers", {:id=>false, :force=>true}) >> -> 0.0469s >> -- create_table("custom_values", {:force=>true}) >> -> 0.0313s >> -- create_table("documents", {:force=>true}) >> -> 0.0313s >> -- add_index("documents", ["project_id"], {:name=>"documents_project_id"}) >> -> 0.0000s >> -- create_table("enumerations", {:force=>true}) >> -> 0.0625s >> -- create_table("issue_categories", {:force=>true}) >> -> 0.0313s >> -- add_index("issue_categories", ["project_id"], >> {:name=>"issue_categories_project_id"}) >> -> 0.0313s >> -- create_table("issue_histories", {:force=>true}) >> -> 0.0781s >> -- add_index("issue_histories", ["issue_id"], >> {:name=>"issue_histories_issue_id"}) >> -> 0.0000s >> -- create_table("issue_statuses", {:force=>true}) >> -> 0.0781s >> -- create_table("issues", {:force=>true}) >> -> 0.0469s >> -- add_index("issues", ["project_id"], {:name=>"issues_project_id"}) >> -> 0.0000s >> -- create_table("members", {:force=>true}) >> -> 0.0156s >> -- create_table("news", {:force=>true}) >> -> 0.0625s >> -- add_index("news", ["project_id"], {:name=>"news_project_id"}) >> -> 0.0000s >> -- create_table("permissions", {:force=>true}) >> -> 0.0313s >> -- create_table("permissions_roles", {:id=>false, :force=>true}) >> -> 0.0156s >> -- add_index("permissions_roles", ["role_id"], >> {:name=>"permissions_roles_role_id"}) >> -> 0.0156s >> -- create_table("projects", {:force=>true}) >> -> 0.0313s >> -- create_table("roles", {:force=>true}) >> -> 0.0156s >> -- create_table("tokens", {:force=>true}) >> -> 0.0313s >> -- create_table("trackers", {:force=>true}) >> -> 0.0313s >> -- create_table("users", {:force=>true}) >> -> 0.0313s >> -- create_table("versions", {:force=>true}) >> -> 0.0313s >> -- add_index("versions", ["project_id"], {:name=>"versions_project_id"}) >> -> 0.0000s >> -- create_table("workflows", {:force=>true}) >> -> 0.0313s >> == Setup: migrated (2.4844s) >> ================================================= >> >> == IssueMove: migrating >> ====================================================== >> == IssueMove: migrated (0.1094s) >> ============================================= >> >> == IssueAddNote: migrating >> =================================================== >> == IssueAddNote: migrated (0.1406s) >> ========================================== >> >> == ExportPdf: migrating >> ====================================================== >> == ExportPdf: migrated (0.1250s) >> ============================================= >> >> == IssueStartDate: migrating >> ================================================= >> -- add_column(:issues, :start_date, :date) >> -> 0.0000s >> -- add_column(:issues, :done_ratio, :integer, {:default=>0, :null=>false}) >> -> 0.0313s >> == IssueStartDate: migrated (0.0469s) >> ======================================== >> >> == CalendarAndActivity: migrating >> ============================================ >> == CalendarAndActivity: migrated (0.1250s) >> =================================== >> >> == CreateJournals: migrating >> ================================================= >> -- create_table(:journals, {:force=>true}) >> -> 0.0469s >> -- create_table(:journal_details, {:force=>true}) >> -> 0.0313s >> -- add_index("journals", ["journalized_id", "journalized_type"], >> {:name=>"journals_journalized_id"}) >> -> 0.0156s >> -- add_index("journal_details", ["journal_id"], >> {:name=>"journal_details_journal_id"}) >> -> 0.0156s >> -- drop_table(:issue_histories) >> -> 0.0156s >> == CreateJournals: migrated (0.3750s) >> ======================================== >> >> == CreateUserPreferences: migrating >> ========================================== >> -- create_table(:user_preferences) >> -> 0.0156s >> == CreateUserPreferences: migrated (0.0156s) >> ================================= >> >> == AddHideMailPref: migrating >> ================================================ >> -- add_column(:user_preferences, :hide_mail, :boolean, {:default=>false}) >> -> 0.0156s >> == AddHideMailPref: migrated (0.0156s) >> ======================================= >> >> == CreateComments: migrating >> ================================================= >> -- create_table(:comments) >> -> 0.0156s >> == CreateComments: migrated (0.0156s) >> ======================================== >> >> == AddNewsCommentsCount: migrating >> =========================================== >> -- add_column(:news, :comments_count, :integer, {:default=>0, >> :null=>false}) >> -> 0.0156s >> == AddNewsCommentsCount: migrated (0.0156s) >> ================================== >> >> == AddCommentsPermissions: migrating >> ========================================= >> == AddCommentsPermissions: migrated (0.1094s) >> ================================ >> >> == CreateQueries: migrating >> ================================================== >> -- create_table(:queries, {:force=>true}) >> -> 0.0313s >> == CreateQueries: migrated (0.0313s) >> ========================================= >> >> == AddQueriesPermissions: migrating >> ========================================== >> == AddQueriesPermissions: migrated (0.0938s) >> ================================= >> >> == CreateRepositories: migrating >> ============================================= >> -- create_table(:repositories, {:force=>true}) >> -> 0.0313s >> == CreateRepositories: migrated (0.0313s) >> ==================================== >> >> == AddRepositoriesPermissions: migrating >> ===================================== >> == AddRepositoriesPermissions: migrated (0.1563s) >> ============================ >> >> == CreateSettings: migrating >> ================================================= >> -- create_table(:settings, {:force=>true}) >> -> 0.0156s >> == CreateSettings: migrated (0.0313s) >> ======================================== >> >> == SetDocAndFilesNotifications: migrating >> ==================================== >> == SetDocAndFilesNotifications: migrated (0.2031s) >> =========================== >> >> == AddIssueStatusPosition: migrating >> ========================================= >> -- add_column(:issue_statuses, :position, :integer, {:default=>1}) >> -> 0.0156s >> == AddIssueStatusPosition: migrated (0.0781s) >> ================================ >> >> == AddRolePosition: migrating >> ================================================ >> -- add_column(:roles, :position, :integer, {:default=>1}) >> -> 0.0156s >> == AddRolePosition: migrated (0.1719s) >> ======================================= >> >> == AddTrackerPosition: migrating >> ============================================= >> -- add_column(:trackers, :position, :integer, {:default=>1}) >> -> 0.0156s >> == AddTrackerPosition: migrated (0.0625s) >> ==================================== >> >> == SerializePossiblesValues: migrating >> ======================================= >> == SerializePossiblesValues: migrated (0.0469s) >> ============================== >> >> == AddTrackerIsInRoadmap: migrating >> ========================================== >> -- add_column(:trackers, :is_in_roadmap, :boolean, {:default=>true, >> :null=>false}) >> -> 0.0000s >> == AddTrackerIsInRoadmap: migrated (0.0000s) >> ================================= >> >> == AddRoadmapPermission: migrating >> =========================================== >> == AddRoadmapPermission: migrated (0.1250s) >> ================================== >> >> == AddSearchPermission: migrating >> ============================================ >> == AddSearchPermission: migrated (0.0938s) >> =================================== >> >> == AddRepositoryLoginAndPassword: migrating >> ================================== >> -- add_column(:repositories, :login, :string, {:limit=>60, :default=>""}) >> -> 0.0000s >> -- add_column(:repositories, :password, :string, {:limit=>60, >> :default=>""}) >> -> 0.0313s >> == AddRepositoryLoginAndPassword: migrated (0.0313s) >> ========================= >> >> == CreateWikis: migrating >> ==================================================== >> -- create_table(:wikis) >> -> 0.0000s >> -- add_index(:wikis, :project_id, {:name=>:wikis_project_id}) >> -> 0.0000s >> == CreateWikis: migrated (0.0313s) >> =========================================== >> >> == CreateWikiPages: migrating >> ================================================ >> -- create_table(:wiki_pages) >> -> 0.0156s >> -- add_index(:wiki_pages, [:wiki_id, :title], >> {:name=>:wiki_pages_wiki_id_title}) >> -> 0.0156s >> == CreateWikiPages: migrated (0.0313s) >> ======================================= >> >> == CreateWikiContents: migrating >> ============================================= >> -- create_table(:wiki_contents) >> -> 0.0156s >> -- add_index(:wiki_contents, :page_id, {:name=>:wiki_contents_page_id}) >> -> 0.0000s >> -- create_table(:wiki_content_versions) >> -> 0.0313s >> -- add_index(:wiki_content_versions, :wiki_content_id, >> {:name=>:wiki_content_versions_wcid}) >> -> 0.0000s >> == CreateWikiContents: migrated (0.0469s) >> ==================================== >> >> == AddProjectsFeedsPermissions: migrating >> ==================================== >> == AddProjectsFeedsPermissions: migrated (0.0938s) >> =========================== >> >> == AddRepositoryRootUrl: migrating >> =========================================== >> -- add_column(:repositories, :root_url, :string, {:limit=>255, >> :default=>""}) >> -> 0.0000s >> == AddRepositoryRootUrl: migrated (0.0156s) >> ================================== >> >> == CreateTimeEntries: migrating >> ============================================== >> -- create_table(:time_entries) >> -> 0.0156s >> -- add_index(:time_entries, [:project_id], >> {:name=>:time_entries_project_id}) >> -> 0.0000s >> -- add_index(:time_entries, [:issue_id], {:name=>:time_entries_issue_id}) >> -> 0.0156s >> == CreateTimeEntries: migrated (0.0313s) >> ===================================== >> >> == AddTimelogPermissions: migrating >> ========================================== >> == AddTimelogPermissions: migrated (0.0938s) >> ================================= >> >> == CreateChangesets: migrating >> =============================================== >> -- create_table(:changesets) >> -> 0.0000s >> -- add_index(:changesets, [:repository_id, :revision], {:unique=>true, >> :name=>:changesets_repos_rev}) >> -> 0.0156s >> == CreateChangesets: migrated (0.0313s) >> ====================================== >> >> == CreateChanges: migrating >> ================================================== >> -- create_table(:changes) >> -> 0.0313s >> -- add_index(:changes, [:changeset_id], {:name=>:changesets_changeset_id}) >> -> 0.0000s >> == CreateChanges: migrated (0.0313s) >> ========================================= >> >> == AddChangesetCommitDate: migrating >> ========================================= >> -- add_column(:changesets, :commit_date, :date) >> -> 0.0156s >> == AddChangesetCommitDate: migrated (0.0313s) >> ================================ >> >> == AddProjectIdentifier: migrating >> =========================================== >> -- add_column(:projects, :identifier, :string, {:limit=>20}) >> -> 0.0000s >> == AddProjectIdentifier: migrated (0.0000s) >> ================================== >> >> == AddCustomFieldIsFilter: migrating >> ========================================= >> -- add_column(:custom_fields, :is_filter, :boolean, {:null=>false, >> :default=>false}) >> -> 0.0000s >> == AddCustomFieldIsFilter: migrated (0.0000s) >> ================================ >> >> == CreateWatchers: migrating >> ================================================= >> -- create_table(:watchers) >> -> 0.0156s >> == CreateWatchers: migrated (0.0156s) >> ======================================== >> >> == CreateChangesetsIssues: migrating >> ========================================= >> -- create_table(:changesets_issues, {:id=>false}) >> -> 0.0156s >> -- add_index(:changesets_issues, [:changeset_id, :issue_id], >> {:unique=>true, :name=>:changesets_issues_ids}) >> -> 0.0000s >> == CreateChangesetsIssues: migrated (0.0156s) >> ================================ >> >> == RenameCommentToComments: migrating >> ======================================== >> == RenameCommentToComments: migrated (0.4063s) >> =============================== >> >> == CreateIssueRelations: migrating >> =========================================== >> -- create_table(:issue_relations) >> -> 0.0156s >> == CreateIssueRelations: migrated (0.0156s) >> ================================== >> >> == AddRelationsPermissions: migrating >> ======================================== >> == AddRelationsPermissions: migrated (0.1250s) >> =============================== >> >> == SetLanguageLengthToFive: migrating >> ======================================== >> -- change_column(:users, :language, :string, {:limit=>5, :default=>""}) >> rake aborted! >> An error has occurred, this and all later migrations canceled: >> >> Invalid attempt to call Read when reader is closed. >> System.Data:0:in `ReadInternal' >> System.Data:0:in `Read' >> statement.rb:48:in `fetch' >> statement.rb:207:in `fetch' >> statement.rb:236:in `each' >> IronRuby.Libraries:0:in `Each' >> :0:in `inject' >> sqlserver_adapter.rb:878:in `handle_as_array' >> >> sqlserver_adapter.rb:862:in `raw_select' >> sqlserver_adapter.rb:814:in `select' >> database_statements.rb:6:in `select_all' >> query_cache.rb:58:in `select_all_with_query_cache' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn >> ection_adapters/sqlserver_adapter.rb:911:in `remove_default_constraint' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn >> ection_adapters/sqlserver_adapter.rb:655:in `change_column' >> :0:in `__send__' >> migration.rb:348:in `method_missing' >> migration.rb:328:in `say_with_time' >> benchmark.rb:291:in `measure' >> migration.rb:325:in `say_with_time' >> migration.rb:345:in `method_missing' >> ./db/migrate/044_set_language_length_to_five.rb:3:in `up' >> :0:in `send' >> migration.rb:282:in `migrate' >> benchmark.rb:291:in `measure' >> migration.rb:273:in `migrate' >> :0:in `send' >> C:1:in `migrate' >> migration.rb:485:in `migrate' >> :0:in `call' >> migration.rb:560:in `ddl_transaction' >> database_statements.rb:113:in `transaction' >> transactions.rb:180:in `transaction' >> migration.rb:558:in `ddl_transaction' >> migration.rb:472:in `migrate' >> :0:in `each' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:472:in`m >> igrate' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:400:in`u >> p' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:383:in`m >> igrate' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:116 >> :0:in `[]' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in`execute' >> :0:in `each' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in`execute' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in`invoke_with_call_chain' >> >> C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in`mon_synchronize' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in`invoke_with_call_chain' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in`invoke_task' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in`top_level' >> :0:in `each' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in`top_level' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in`standard_exception_handling >> ' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in`top_level' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in`standard_exception_handling >> ' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' >> C:/Program Files/IronRuby >> 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 >> :0:in `load' >> C:/Program Files/IronRuby 0.9.4.0/bin/irake:19 >> >> >> On Fri, Feb 19, 2010 at 4:36 PM, Shri Borde wrote: >> >>> We can lock back to 2.3 which is the version that we check against. Is >>> the connection problem related to IronRuby or specific to your setup? >>> >>> >>> >>> *From:* ironruby-core-bounces at rubyforge.org [mailto: >>> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Scott Holden >>> *Sent:* Friday, February 19, 2010 2:29 PM >>> >>> *To:* ironruby-core at rubyforge.org >>> *Subject:* Re: [Ironruby-core] Getting up and running with ActiveRecord >>> + Sqlserver >>> >>> >>> >>> Locking down 2.3.1 fixed the old error, now I'm just having a connection >>> problem. BTW, there's no remote gem for 2.3.1, so people will need to pull >>> it from github and build it themselves for now. Here's my database.yml: >>> >>> development: >>> mode: ADONET >>> adapter: sqlserver >>> host: webdevelopment1 >>> database: redmine_development >>> integrated_security: true >>> >>> On Fri, Feb 19, 2010 at 2:25 PM, Shri Borde >>> wrote: >>> >>> Scott, I see you are using 2.3.4 of the activerecord-sqlserver-adapter >>> gem. Can you lock down on 2.3.1 of the gem instead using something like the >>> following in your Ruby code before you do ?require ?ironruby-sqlserver??: >>> >>> >>> >>> gem ?activerecord-sqlserver-adapter?, ?= 2.3.1? >>> >>> >>> >>> They dropped support for DBI within the last week. The links below have >>> info about the change. >>> >>> >>> http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/4cf40c1330aef3a?hl=en >>> >>> >>> http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/647522f857e3c31c?hl=en >>> >>> >>> >>> If locking down on 2.3.1 works for you, we can just add that to >>> ironruby-sqlserver. >>> >>> >>> >>> >>> >>> *From:* ironruby-core-bounces at rubyforge.org [mailto: >>> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Scott Holden >>> *Sent:* Friday, February 19, 2010 11:25 AM >>> *To:* ironruby-core at rubyforge.org >>> *Subject:* [Ironruby-core] Getting up and running with ActiveRecord + >>> Sqlserver >>> >>> >>> >>> I'm trying to follow the example given at >>> http://ironruby.net/Documentation/Real_Ruby_Applications/Rails for >>> getting ActiveRecord up and running. Whenever I try to run a migration, I'm >>> getting this error. Could anyone point me in the right direction? I'm >>> trying to get a simple rails app up and running, then I want to start trying >>> to get Redmine working on IronRuby. Redmine is my company's only internal >>> Rails app at the moment, but I'd like to use it as a way to get people >>> started using IronRuby. It would be a great way to integrate a Rails >>> application with our internal ORM and create a Redmine plugin to tie into >>> our deployment system. >>> >>> Here's my trace from rake db:migrate >>> >>> C:\Documents and Settings\sholden\My >>> Documents\NetBeansProjects\redmine>irake db:migrate --trace >>> (in C:/Documents and Settings/sholden/My >>> Documents/NetBeansProjects/redmine) >>> ** Invoke db:migrate (first_time) >>> ** Invoke environment (first_time) >>> ** Execute environment >>> rake aborted! >>> undefined method `columns' for :ado:Symbol >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:862:in`raw_select' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:827:in`select' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in`select_all' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in`select_all_with_query_cache' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in`select_one' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in`select_value' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in`database_version' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in`info_schema_query' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1448:in`silence' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in`info_schema_query' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in`database_version' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:219:in >>> `database_year' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:191:in`initialize' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/ironruby-sqlserver-0.1.0/lib/activerecord-sqlserver-adapter/adonet_patch.rb:36:in`sqlserver_connection' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in`new_connection' >>> :0:in `__send__' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in`checkout_new_connection' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in`checkout' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in`checkout' >>> :0:in `loop' >>> C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in`mon_synchronize' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in`checkout' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in`connection' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in`retrieve_connection' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in`retrieve_connection' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in`connection' >>> C:/Documents and Settings/sholden/My >>> Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in >>> `quoted_left_column_name' >>> C:/Documents and Settings/sholden/My >>> Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in >>> `acts_as_nested_set' >>> C:/Documents and Settings/sholden/My >>> Documents/NetBeansProjects/redmine/app/models/project.rb:54 >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380: >>> in `load_file' >>> :0:in `load' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379: >>> in `load_file' >>> dependencies.rb:490:in `new_constants_in' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259: >>> in `require_or_load' >>> C:/Documents and Settings/sholden/My >>> Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in >>> `require_or_load_with_engine_additions' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' >>> dependencies.rb:398:in `load_missing_constant' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:98:in`const_missing' >>> :0:in `__send__' >>> C:/Documents and Settings/sholden/My >>> Documents/NetBeansProjects/redmine/app/models/attachment.rb:31 >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in`load_file' >>> :0:in `load' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379 >>> :in `load_file' >>> dependencies.rb:490:in `new_constants_in' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in`require_or_load' >>> C:/Documents and Settings/sholden/My >>> Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in >>> `require_or_load_with_engine_additions' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in`load_missing_constant' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' >>> C:/Documents and Settings/sholden/My >>> Documents/NetBeansProjects/redmine/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:32:in >>> `acts_as_attachable' >>> C:/Documents and Settings/sholden/My >>> Documents/NetBeansProjects/redmine/app/models/message.rb:22 >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in`load_file' >>> :0:in `load' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in`load_file' >>> dependencies.rb:490:in `new_constants_in' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in`require_or_load' >>> C:/Documents and Settings/sholden/My >>> Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in >>> `require_or_load_with_engine_additions' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in`load_missing_constant' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:157:in`observed_class' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:183:in`observed_classes' >>> inflector.rb:360:in `constantize' >>> :0:in `each' >>> inflector.rb:355:in `constantize' >>> inflections.rb:161:in `constantize' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:166:in`initialize' >>> C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/singleton.rb:94 >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:38:in`instantiate_observers' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:36:in`instantiate_observers' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:15:in`define_dispatcher_callbacks >>> ' >>> :0:in `each' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in`evaluate_method >>> ' >>> :0:in `[]' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in`call >>> ' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in`run' >>> :0:in `each' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in`run' >>> :0:in `send' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in`run_callbacks >>> ' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in`run_prepare_callbacks >>> ' >>> :0:in `__send__' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in`prepare_dispatcher' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in`process' >>> :0:in `send' >>> C:/Program Files/IronRuby >>> 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in`run' >>> >>> Thanks for any advice, >>> >>> -Scott >>> >>> >>> _______________________________________________ >>> 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 Shri.Borde at microsoft.com Fri Feb 19 18:13:30 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Fri, 19 Feb 2010 23:13:30 +0000 Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver In-Reply-To: <4b34c4521002191456x44b3685ep6f95937ccb71d813@mail.gmail.com> References: <4b34c4521002191124qb7ff6d3j3d8550b92b78ecc2@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A704085F@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191429s7af89288ha4753b13ed9a17c6@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040AC3@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191453m233bd341h29210a3407c11b2b@mail.gmail.com> <4b34c4521002191454i128d24bcu556eed05121262fa@mail.gmail.com> <4b34c4521002191456x44b3685ep6f95937ccb71d813@mail.gmail.com> Message-ID: <6459203F8B1AF641995AE49D47FA51A7040B5C@TK5EX14MBXC134.redmond.corp.microsoft.com> So you are running into "Invalid attempt to call Read when reader is closed". I fixed that error in ironruby-dbi. Could you grab http://github.com/ironruby/ironruby/blob/master/Merlin/External.LCA_RESTRICTED/Languages/Ruby/ruby-1.8.6p368/lib/ruby/gems/1.8/gems/ironruby-dbi-0.1.0/lib/dbd/mssql/statement.rb and copy it over your ironruby-dbi gem? If you are curious, the fix involves the following lines which deal with the case of the reader being closed. def fetch if @reader and @reader.is_closed if @pending_fetches return @pending_fetches.shift else return nil end end From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Scott Holden Sent: Friday, February 19, 2010 2:56 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver Make that 0.9.2. Apparently the 0.9 versioning is getting mixed up in my head :P On Fri, Feb 19, 2010 at 4:54 PM, Scott Holden > wrote: By the way, I'm working with Redmine 0.9.4 stable On Fri, Feb 19, 2010 at 4:53 PM, Scott Holden > wrote: Hah! I'm a moron. Got started looking too deep for my problems, missed my own stupid mistake... web^H^H^Hsqldevelopment1. Thanks a ton for being so helpful. I'm trying migrations from Redmine, but blowing up on 044_set_language_length_to_five. Line 3 seems to be the issue: change_column :users, :language, :string, :limit => 5, :default => "" Here's my trace: C:\Documents and Settings\sholden\My Documents\NetBeansProjects\redmine>irake db:migrate --trace (in C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == Setup: migrating ========================================================== -- create_table("attachments", {:force=>true}) -> 0.1406s -- create_table("auth_sources", {:force=>true}) -> 0.0313s -- create_table("custom_fields", {:force=>true}) -> 0.0156s -- create_table("custom_fields_projects", {:id=>false, :force=>true}) -> 0.0156s -- create_table("custom_fields_trackers", {:id=>false, :force=>true}) -> 0.0469s -- create_table("custom_values", {:force=>true}) -> 0.0313s -- create_table("documents", {:force=>true}) -> 0.0313s -- add_index("documents", ["project_id"], {:name=>"documents_project_id"}) -> 0.0000s -- create_table("enumerations", {:force=>true}) -> 0.0625s -- create_table("issue_categories", {:force=>true}) -> 0.0313s -- add_index("issue_categories", ["project_id"], {:name=>"issue_categories_project_id"}) -> 0.0313s -- create_table("issue_histories", {:force=>true}) -> 0.0781s -- add_index("issue_histories", ["issue_id"], {:name=>"issue_histories_issue_id"}) -> 0.0000s -- create_table("issue_statuses", {:force=>true}) -> 0.0781s -- create_table("issues", {:force=>true}) -> 0.0469s -- add_index("issues", ["project_id"], {:name=>"issues_project_id"}) -> 0.0000s -- create_table("members", {:force=>true}) -> 0.0156s -- create_table("news", {:force=>true}) -> 0.0625s -- add_index("news", ["project_id"], {:name=>"news_project_id"}) -> 0.0000s -- create_table("permissions", {:force=>true}) -> 0.0313s -- create_table("permissions_roles", {:id=>false, :force=>true}) -> 0.0156s -- add_index("permissions_roles", ["role_id"], {:name=>"permissions_roles_role_id"}) -> 0.0156s -- create_table("projects", {:force=>true}) -> 0.0313s -- create_table("roles", {:force=>true}) -> 0.0156s -- create_table("tokens", {:force=>true}) -> 0.0313s -- create_table("trackers", {:force=>true}) -> 0.0313s -- create_table("users", {:force=>true}) -> 0.0313s -- create_table("versions", {:force=>true}) -> 0.0313s -- add_index("versions", ["project_id"], {:name=>"versions_project_id"}) -> 0.0000s -- create_table("workflows", {:force=>true}) -> 0.0313s == Setup: migrated (2.4844s) ================================================= == IssueMove: migrating ====================================================== == IssueMove: migrated (0.1094s) ============================================= == IssueAddNote: migrating =================================================== == IssueAddNote: migrated (0.1406s) ========================================== == ExportPdf: migrating ====================================================== == ExportPdf: migrated (0.1250s) ============================================= == IssueStartDate: migrating ================================================= -- add_column(:issues, :start_date, :date) -> 0.0000s -- add_column(:issues, :done_ratio, :integer, {:default=>0, :null=>false}) -> 0.0313s == IssueStartDate: migrated (0.0469s) ======================================== == CalendarAndActivity: migrating ============================================ == CalendarAndActivity: migrated (0.1250s) =================================== == CreateJournals: migrating ================================================= -- create_table(:journals, {:force=>true}) -> 0.0469s -- create_table(:journal_details, {:force=>true}) -> 0.0313s -- add_index("journals", ["journalized_id", "journalized_type"], {:name=>"journals_journalized_id"}) -> 0.0156s -- add_index("journal_details", ["journal_id"], {:name=>"journal_details_journal_id"}) -> 0.0156s -- drop_table(:issue_histories) -> 0.0156s == CreateJournals: migrated (0.3750s) ======================================== == CreateUserPreferences: migrating ========================================== -- create_table(:user_preferences) -> 0.0156s == CreateUserPreferences: migrated (0.0156s) ================================= == AddHideMailPref: migrating ================================================ -- add_column(:user_preferences, :hide_mail, :boolean, {:default=>false}) -> 0.0156s == AddHideMailPref: migrated (0.0156s) ======================================= == CreateComments: migrating ================================================= -- create_table(:comments) -> 0.0156s == CreateComments: migrated (0.0156s) ======================================== == AddNewsCommentsCount: migrating =========================================== -- add_column(:news, :comments_count, :integer, {:default=>0, :null=>false}) -> 0.0156s == AddNewsCommentsCount: migrated (0.0156s) ================================== == AddCommentsPermissions: migrating ========================================= == AddCommentsPermissions: migrated (0.1094s) ================================ == CreateQueries: migrating ================================================== -- create_table(:queries, {:force=>true}) -> 0.0313s == CreateQueries: migrated (0.0313s) ========================================= == AddQueriesPermissions: migrating ========================================== == AddQueriesPermissions: migrated (0.0938s) ================================= == CreateRepositories: migrating ============================================= -- create_table(:repositories, {:force=>true}) -> 0.0313s == CreateRepositories: migrated (0.0313s) ==================================== == AddRepositoriesPermissions: migrating ===================================== == AddRepositoriesPermissions: migrated (0.1563s) ============================ == CreateSettings: migrating ================================================= -- create_table(:settings, {:force=>true}) -> 0.0156s == CreateSettings: migrated (0.0313s) ======================================== == SetDocAndFilesNotifications: migrating ==================================== == SetDocAndFilesNotifications: migrated (0.2031s) =========================== == AddIssueStatusPosition: migrating ========================================= -- add_column(:issue_statuses, :position, :integer, {:default=>1}) -> 0.0156s == AddIssueStatusPosition: migrated (0.0781s) ================================ == AddRolePosition: migrating ================================================ -- add_column(:roles, :position, :integer, {:default=>1}) -> 0.0156s == AddRolePosition: migrated (0.1719s) ======================================= == AddTrackerPosition: migrating ============================================= -- add_column(:trackers, :position, :integer, {:default=>1}) -> 0.0156s == AddTrackerPosition: migrated (0.0625s) ==================================== == SerializePossiblesValues: migrating ======================================= == SerializePossiblesValues: migrated (0.0469s) ============================== == AddTrackerIsInRoadmap: migrating ========================================== -- add_column(:trackers, :is_in_roadmap, :boolean, {:default=>true, :null=>false}) -> 0.0000s == AddTrackerIsInRoadmap: migrated (0.0000s) ================================= == AddRoadmapPermission: migrating =========================================== == AddRoadmapPermission: migrated (0.1250s) ================================== == AddSearchPermission: migrating ============================================ == AddSearchPermission: migrated (0.0938s) =================================== == AddRepositoryLoginAndPassword: migrating ================================== -- add_column(:repositories, :login, :string, {:limit=>60, :default=>""}) -> 0.0000s -- add_column(:repositories, :password, :string, {:limit=>60, :default=>""}) -> 0.0313s == AddRepositoryLoginAndPassword: migrated (0.0313s) ========================= == CreateWikis: migrating ==================================================== -- create_table(:wikis) -> 0.0000s -- add_index(:wikis, :project_id, {:name=>:wikis_project_id}) -> 0.0000s == CreateWikis: migrated (0.0313s) =========================================== == CreateWikiPages: migrating ================================================ -- create_table(:wiki_pages) -> 0.0156s -- add_index(:wiki_pages, [:wiki_id, :title], {:name=>:wiki_pages_wiki_id_title}) -> 0.0156s == CreateWikiPages: migrated (0.0313s) ======================================= == CreateWikiContents: migrating ============================================= -- create_table(:wiki_contents) -> 0.0156s -- add_index(:wiki_contents, :page_id, {:name=>:wiki_contents_page_id}) -> 0.0000s -- create_table(:wiki_content_versions) -> 0.0313s -- add_index(:wiki_content_versions, :wiki_content_id, {:name=>:wiki_content_versions_wcid}) -> 0.0000s == CreateWikiContents: migrated (0.0469s) ==================================== == AddProjectsFeedsPermissions: migrating ==================================== == AddProjectsFeedsPermissions: migrated (0.0938s) =========================== == AddRepositoryRootUrl: migrating =========================================== -- add_column(:repositories, :root_url, :string, {:limit=>255, :default=>""}) -> 0.0000s == AddRepositoryRootUrl: migrated (0.0156s) ================================== == CreateTimeEntries: migrating ============================================== -- create_table(:time_entries) -> 0.0156s -- add_index(:time_entries, [:project_id], {:name=>:time_entries_project_id}) -> 0.0000s -- add_index(:time_entries, [:issue_id], {:name=>:time_entries_issue_id}) -> 0.0156s == CreateTimeEntries: migrated (0.0313s) ===================================== == AddTimelogPermissions: migrating ========================================== == AddTimelogPermissions: migrated (0.0938s) ================================= == CreateChangesets: migrating =============================================== -- create_table(:changesets) -> 0.0000s -- add_index(:changesets, [:repository_id, :revision], {:unique=>true, :name=>:changesets_repos_rev}) -> 0.0156s == CreateChangesets: migrated (0.0313s) ====================================== == CreateChanges: migrating ================================================== -- create_table(:changes) -> 0.0313s -- add_index(:changes, [:changeset_id], {:name=>:changesets_changeset_id}) -> 0.0000s == CreateChanges: migrated (0.0313s) ========================================= == AddChangesetCommitDate: migrating ========================================= -- add_column(:changesets, :commit_date, :date) -> 0.0156s == AddChangesetCommitDate: migrated (0.0313s) ================================ == AddProjectIdentifier: migrating =========================================== -- add_column(:projects, :identifier, :string, {:limit=>20}) -> 0.0000s == AddProjectIdentifier: migrated (0.0000s) ================================== == AddCustomFieldIsFilter: migrating ========================================= -- add_column(:custom_fields, :is_filter, :boolean, {:null=>false, :default=>false}) -> 0.0000s == AddCustomFieldIsFilter: migrated (0.0000s) ================================ == CreateWatchers: migrating ================================================= -- create_table(:watchers) -> 0.0156s == CreateWatchers: migrated (0.0156s) ======================================== == CreateChangesetsIssues: migrating ========================================= -- create_table(:changesets_issues, {:id=>false}) -> 0.0156s -- add_index(:changesets_issues, [:changeset_id, :issue_id], {:unique=>true, :name=>:changesets_issues_ids}) -> 0.0000s == CreateChangesetsIssues: migrated (0.0156s) ================================ == RenameCommentToComments: migrating ======================================== == RenameCommentToComments: migrated (0.4063s) =============================== == CreateIssueRelations: migrating =========================================== -- create_table(:issue_relations) -> 0.0156s == CreateIssueRelations: migrated (0.0156s) ================================== == AddRelationsPermissions: migrating ======================================== == AddRelationsPermissions: migrated (0.1250s) =============================== == SetLanguageLengthToFive: migrating ======================================== -- change_column(:users, :language, :string, {:limit=>5, :default=>""}) rake aborted! An error has occurred, this and all later migrations canceled: Invalid attempt to call Read when reader is closed. System.Data:0:in `ReadInternal' System.Data:0:in `Read' statement.rb:48:in `fetch' statement.rb:207:in `fetch' statement.rb:236:in `each' IronRuby.Libraries:0:in `Each' :0:in `inject' sqlserver_adapter.rb:878:in `handle_as_array' sqlserver_adapter.rb:862:in `raw_select' sqlserver_adapter.rb:814:in `select' database_statements.rb:6:in `select_all' query_cache.rb:58:in `select_all_with_query_cache' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn ection_adapters/sqlserver_adapter.rb:911:in `remove_default_constraint' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn ection_adapters/sqlserver_adapter.rb:655:in `change_column' :0:in `__send__' migration.rb:348:in `method_missing' migration.rb:328:in `say_with_time' benchmark.rb:291:in `measure' migration.rb:325:in `say_with_time' migration.rb:345:in `method_missing' ./db/migrate/044_set_language_length_to_five.rb:3:in `up' :0:in `send' migration.rb:282:in `migrate' benchmark.rb:291:in `measure' migration.rb:273:in `migrate' :0:in `send' C:1:in `migrate' migration.rb:485:in `migrate' :0:in `call' migration.rb:560:in `ddl_transaction' database_statements.rb:113:in `transaction' transactions.rb:180:in `transaction' migration.rb:558:in `ddl_transaction' migration.rb:472:in `migrate' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:472:in `m igrate' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:400:in `u p' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:383:in `m igrate' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:116 :0:in `[]' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in `mon_synchronize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling ' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling ' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 :0:in `load' C:/Program Files/IronRuby 0.9.4.0/bin/irake:19 On Fri, Feb 19, 2010 at 4:36 PM, Shri Borde > wrote: We can lock back to 2.3 which is the version that we check against. Is the connection problem related to IronRuby or specific to your setup? From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Scott Holden Sent: Friday, February 19, 2010 2:29 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver Locking down 2.3.1 fixed the old error, now I'm just having a connection problem. BTW, there's no remote gem for 2.3.1, so people will need to pull it from github and build it themselves for now. Here's my database.yml: development: mode: ADONET adapter: sqlserver host: webdevelopment1 database: redmine_development integrated_security: true On Fri, Feb 19, 2010 at 2:25 PM, Shri Borde > wrote: Scott, I see you are using 2.3.4 of the activerecord-sqlserver-adapter gem. Can you lock down on 2.3.1 of the gem instead using something like the following in your Ruby code before you do "require 'ironruby-sqlserver'": gem "activerecord-sqlserver-adapter", "= 2.3.1" They dropped support for DBI within the last week. The links below have info about the change. http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/4cf40c1330aef3a?hl=en http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/647522f857e3c31c?hl=en If locking down on 2.3.1 works for you, we can just add that to ironruby-sqlserver. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Scott Holden Sent: Friday, February 19, 2010 11:25 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver I'm trying to follow the example given at http://ironruby.net/Documentation/Real_Ruby_Applications/Rails for getting ActiveRecord up and running. Whenever I try to run a migration, I'm getting this error. Could anyone point me in the right direction? I'm trying to get a simple rails app up and running, then I want to start trying to get Redmine working on IronRuby. Redmine is my company's only internal Rails app at the moment, but I'd like to use it as a way to get people started using IronRuby. It would be a great way to integrate a Rails application with our internal ORM and create a Redmine plugin to tie into our deployment system. Here's my trace from rake db:migrate C:\Documents and Settings\sholden\My Documents\NetBeansProjects\redmine>irake db:migrate --trace (in C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! undefined method `columns' for :ado:Symbol C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:862:in `raw_select' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:827:in `select' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in `select_all_with_query_cache' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in `select_one' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in `select_value' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in `database_version' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in `info_schema_query' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1448:in `silence' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in `info_schema_query' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in `database_version' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:219:in `database_year' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:191:in `initialize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ironruby-sqlserver-0.1.0/lib/activerecord-sqlserver-adapter/adonet_patch.rb:36:in `sqlserver_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection' :0:in `__send__' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout' :0:in `loop' C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in `mon_synchronize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in `quoted_left_column_name' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in `acts_as_nested_set' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/app/models/project.rb:54 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380: in `load_file' :0:in `load' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379: in `load_file' dependencies.rb:490:in `new_constants_in' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259: in `require_or_load' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load_with_engine_additions' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' dependencies.rb:398:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:98:in `const_missing' :0:in `__send__' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/app/models/attachment.rb:31 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_file' :0:in `load' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379 :in `load_file' dependencies.rb:490:in `new_constants_in' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in `require_or_load' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load_with_engine_additions' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:32:in `acts_as_attachable' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/app/models/message.rb:22 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_file' :0:in `load' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in `load_file' dependencies.rb:490:in `new_constants_in' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in `require_or_load' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load_with_engine_additions' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:157:in `observed_class' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:183:in `observed_classes' inflector.rb:360:in `constantize' :0:in `each' inflector.rb:355:in `constantize' inflections.rb:161:in `constantize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:166:in `initialize' C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/singleton.rb:94 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:38:in `instantiate_observers' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:36:in `instantiate_observers' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:15:in`define_dispatcher_callbacks' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in`evaluate_method' :0:in `[]' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in`call' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run' :0:in `send' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in`run_callbacks' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in`run_prepare_callbacks' :0:in `__send__' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in `prepare_dispatcher' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in `process' :0:in `send' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run' Thanks for any advice, -Scott _______________________________________________ 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 sholde4 at gmail.com Fri Feb 19 19:59:20 2010 From: sholde4 at gmail.com (Scott Holden) Date: Fri, 19 Feb 2010 18:59:20 -0600 Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver In-Reply-To: <6459203F8B1AF641995AE49D47FA51A7040B5C@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <4b34c4521002191124qb7ff6d3j3d8550b92b78ecc2@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A704085F@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191429s7af89288ha4753b13ed9a17c6@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040AC3@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191453m233bd341h29210a3407c11b2b@mail.gmail.com> <4b34c4521002191454i128d24bcu556eed05121262fa@mail.gmail.com> <4b34c4521002191456x44b3685ep6f95937ccb71d813@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040B5C@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: <4b34c4521002191659g2bc8a1f0h80caf5d79e0482b4@mail.gmail.com> Shri, thanks a ton for your help. That fixed the reader is closed issue, but I ran into another migration problem. In ChangeChangesetsRevisionToString, the migration tries change_column :changesets, :revision, :string, :null => false Sqlserver is not too happy about changing int to varchar(255). I'll probably try to look at it some more in the morning, but if you've already seen this, please let me know. -Scott On Fri, Feb 19, 2010 at 5:13 PM, Shri Borde wrote: > So you are running into ?Invalid attempt to call Read when reader is > closed?. I fixed that error in ironruby-dbi. Could you grab > http://github.com/ironruby/ironruby/blob/master/Merlin/External.LCA_RESTRICTED/Languages/Ruby/ruby-1.8.6p368/lib/ruby/gems/1.8/gems/ironruby-dbi-0.1.0/lib/dbd/mssql/statement.rband copy it over your ironruby-dbi gem? > > > > If you are curious, the fix involves the following lines which deal with > the case of the reader being closed. > > > > def fetch > > if @reader and @reader.is_closed > > if @pending_fetches > > return @pending_fetches.shift > > else > > return nil > > end > > end > > > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Scott Holden > *Sent:* Friday, February 19, 2010 2:56 PM > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Getting up and running with ActiveRecord + > Sqlserver > > > > Make that 0.9.2. Apparently the 0.9 versioning is getting mixed up in my > head :P > > On Fri, Feb 19, 2010 at 4:54 PM, Scott Holden wrote: > > By the way, I'm working with Redmine 0.9.4 stable > > > > On Fri, Feb 19, 2010 at 4:53 PM, Scott Holden wrote: > > Hah! I'm a moron. Got started looking too deep for my problems, missed my > own stupid mistake... web^H^H^Hsqldevelopment1. Thanks a ton for being so > helpful. > > I'm trying migrations from Redmine, but blowing up on > 044_set_language_length_to_five. > > Line 3 seems to be the issue: > > change_column :users, :language, :string, :limit => 5, :default => "" > > Here's my trace: > > > > C:\Documents and Settings\sholden\My > Documents\NetBeansProjects\redmine>irake db:migrate --trace > (in C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine) > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > > ** Execute db:migrate > == Setup: migrating > ========================================================== > -- create_table("attachments", {:force=>true}) > -> 0.1406s > -- create_table("auth_sources", {:force=>true}) > -> 0.0313s > -- create_table("custom_fields", {:force=>true}) > -> 0.0156s > -- create_table("custom_fields_projects", {:id=>false, :force=>true}) > -> 0.0156s > -- create_table("custom_fields_trackers", {:id=>false, :force=>true}) > -> 0.0469s > -- create_table("custom_values", {:force=>true}) > -> 0.0313s > -- create_table("documents", {:force=>true}) > -> 0.0313s > -- add_index("documents", ["project_id"], {:name=>"documents_project_id"}) > -> 0.0000s > -- create_table("enumerations", {:force=>true}) > -> 0.0625s > -- create_table("issue_categories", {:force=>true}) > -> 0.0313s > -- add_index("issue_categories", ["project_id"], > {:name=>"issue_categories_project_id"}) > -> 0.0313s > -- create_table("issue_histories", {:force=>true}) > -> 0.0781s > -- add_index("issue_histories", ["issue_id"], > {:name=>"issue_histories_issue_id"}) > -> 0.0000s > -- create_table("issue_statuses", {:force=>true}) > -> 0.0781s > -- create_table("issues", {:force=>true}) > -> 0.0469s > -- add_index("issues", ["project_id"], {:name=>"issues_project_id"}) > -> 0.0000s > -- create_table("members", {:force=>true}) > -> 0.0156s > -- create_table("news", {:force=>true}) > -> 0.0625s > -- add_index("news", ["project_id"], {:name=>"news_project_id"}) > -> 0.0000s > -- create_table("permissions", {:force=>true}) > -> 0.0313s > -- create_table("permissions_roles", {:id=>false, :force=>true}) > -> 0.0156s > -- add_index("permissions_roles", ["role_id"], > {:name=>"permissions_roles_role_id"}) > -> 0.0156s > -- create_table("projects", {:force=>true}) > -> 0.0313s > -- create_table("roles", {:force=>true}) > -> 0.0156s > -- create_table("tokens", {:force=>true}) > -> 0.0313s > -- create_table("trackers", {:force=>true}) > -> 0.0313s > -- create_table("users", {:force=>true}) > -> 0.0313s > -- create_table("versions", {:force=>true}) > -> 0.0313s > -- add_index("versions", ["project_id"], {:name=>"versions_project_id"}) > -> 0.0000s > -- create_table("workflows", {:force=>true}) > -> 0.0313s > == Setup: migrated (2.4844s) > ================================================= > > == IssueMove: migrating > ====================================================== > == IssueMove: migrated (0.1094s) > ============================================= > > == IssueAddNote: migrating > =================================================== > == IssueAddNote: migrated (0.1406s) > ========================================== > > == ExportPdf: migrating > ====================================================== > == ExportPdf: migrated (0.1250s) > ============================================= > > == IssueStartDate: migrating > ================================================= > -- add_column(:issues, :start_date, :date) > -> 0.0000s > -- add_column(:issues, :done_ratio, :integer, {:default=>0, :null=>false}) > -> 0.0313s > == IssueStartDate: migrated (0.0469s) > ======================================== > > == CalendarAndActivity: migrating > ============================================ > == CalendarAndActivity: migrated (0.1250s) > =================================== > > == CreateJournals: migrating > ================================================= > -- create_table(:journals, {:force=>true}) > -> 0.0469s > -- create_table(:journal_details, {:force=>true}) > -> 0.0313s > -- add_index("journals", ["journalized_id", "journalized_type"], > {:name=>"journals_journalized_id"}) > -> 0.0156s > -- add_index("journal_details", ["journal_id"], > {:name=>"journal_details_journal_id"}) > -> 0.0156s > -- drop_table(:issue_histories) > -> 0.0156s > == CreateJournals: migrated (0.3750s) > ======================================== > > == CreateUserPreferences: migrating > ========================================== > -- create_table(:user_preferences) > -> 0.0156s > == CreateUserPreferences: migrated (0.0156s) > ================================= > > == AddHideMailPref: migrating > ================================================ > -- add_column(:user_preferences, :hide_mail, :boolean, {:default=>false}) > -> 0.0156s > == AddHideMailPref: migrated (0.0156s) > ======================================= > > == CreateComments: migrating > ================================================= > -- create_table(:comments) > -> 0.0156s > == CreateComments: migrated (0.0156s) > ======================================== > > == AddNewsCommentsCount: migrating > =========================================== > -- add_column(:news, :comments_count, :integer, {:default=>0, > :null=>false}) > -> 0.0156s > == AddNewsCommentsCount: migrated (0.0156s) > ================================== > > == AddCommentsPermissions: migrating > ========================================= > == AddCommentsPermissions: migrated (0.1094s) > ================================ > > == CreateQueries: migrating > ================================================== > -- create_table(:queries, {:force=>true}) > -> 0.0313s > == CreateQueries: migrated (0.0313s) > ========================================= > > == AddQueriesPermissions: migrating > ========================================== > == AddQueriesPermissions: migrated (0.0938s) > ================================= > > == CreateRepositories: migrating > ============================================= > -- create_table(:repositories, {:force=>true}) > -> 0.0313s > == CreateRepositories: migrated (0.0313s) > ==================================== > > == AddRepositoriesPermissions: migrating > ===================================== > == AddRepositoriesPermissions: migrated (0.1563s) > ============================ > > == CreateSettings: migrating > ================================================= > -- create_table(:settings, {:force=>true}) > -> 0.0156s > == CreateSettings: migrated (0.0313s) > ======================================== > > == SetDocAndFilesNotifications: migrating > ==================================== > == SetDocAndFilesNotifications: migrated (0.2031s) > =========================== > > == AddIssueStatusPosition: migrating > ========================================= > -- add_column(:issue_statuses, :position, :integer, {:default=>1}) > -> 0.0156s > == AddIssueStatusPosition: migrated (0.0781s) > ================================ > > == AddRolePosition: migrating > ================================================ > -- add_column(:roles, :position, :integer, {:default=>1}) > -> 0.0156s > == AddRolePosition: migrated (0.1719s) > ======================================= > > == AddTrackerPosition: migrating > ============================================= > -- add_column(:trackers, :position, :integer, {:default=>1}) > -> 0.0156s > == AddTrackerPosition: migrated (0.0625s) > ==================================== > > == SerializePossiblesValues: migrating > ======================================= > == SerializePossiblesValues: migrated (0.0469s) > ============================== > > == AddTrackerIsInRoadmap: migrating > ========================================== > -- add_column(:trackers, :is_in_roadmap, :boolean, {:default=>true, > :null=>false}) > -> 0.0000s > == AddTrackerIsInRoadmap: migrated (0.0000s) > ================================= > > == AddRoadmapPermission: migrating > =========================================== > == AddRoadmapPermission: migrated (0.1250s) > ================================== > > == AddSearchPermission: migrating > ============================================ > == AddSearchPermission: migrated (0.0938s) > =================================== > > == AddRepositoryLoginAndPassword: migrating > ================================== > -- add_column(:repositories, :login, :string, {:limit=>60, :default=>""}) > -> 0.0000s > -- add_column(:repositories, :password, :string, {:limit=>60, > :default=>""}) > -> 0.0313s > == AddRepositoryLoginAndPassword: migrated (0.0313s) > ========================= > > == CreateWikis: migrating > ==================================================== > -- create_table(:wikis) > -> 0.0000s > -- add_index(:wikis, :project_id, {:name=>:wikis_project_id}) > -> 0.0000s > == CreateWikis: migrated (0.0313s) > =========================================== > > == CreateWikiPages: migrating > ================================================ > -- create_table(:wiki_pages) > -> 0.0156s > -- add_index(:wiki_pages, [:wiki_id, :title], > {:name=>:wiki_pages_wiki_id_title}) > -> 0.0156s > == CreateWikiPages: migrated (0.0313s) > ======================================= > > == CreateWikiContents: migrating > ============================================= > -- create_table(:wiki_contents) > -> 0.0156s > -- add_index(:wiki_contents, :page_id, {:name=>:wiki_contents_page_id}) > -> 0.0000s > -- create_table(:wiki_content_versions) > -> 0.0313s > -- add_index(:wiki_content_versions, :wiki_content_id, > {:name=>:wiki_content_versions_wcid}) > -> 0.0000s > == CreateWikiContents: migrated (0.0469s) > ==================================== > > == AddProjectsFeedsPermissions: migrating > ==================================== > == AddProjectsFeedsPermissions: migrated (0.0938s) > =========================== > > == AddRepositoryRootUrl: migrating > =========================================== > -- add_column(:repositories, :root_url, :string, {:limit=>255, > :default=>""}) > -> 0.0000s > == AddRepositoryRootUrl: migrated (0.0156s) > ================================== > > == CreateTimeEntries: migrating > ============================================== > -- create_table(:time_entries) > -> 0.0156s > -- add_index(:time_entries, [:project_id], > {:name=>:time_entries_project_id}) > -> 0.0000s > -- add_index(:time_entries, [:issue_id], {:name=>:time_entries_issue_id}) > -> 0.0156s > == CreateTimeEntries: migrated (0.0313s) > ===================================== > > == AddTimelogPermissions: migrating > ========================================== > == AddTimelogPermissions: migrated (0.0938s) > ================================= > > == CreateChangesets: migrating > =============================================== > -- create_table(:changesets) > -> 0.0000s > -- add_index(:changesets, [:repository_id, :revision], {:unique=>true, > :name=>:changesets_repos_rev}) > -> 0.0156s > == CreateChangesets: migrated (0.0313s) > ====================================== > > == CreateChanges: migrating > ================================================== > -- create_table(:changes) > -> 0.0313s > -- add_index(:changes, [:changeset_id], {:name=>:changesets_changeset_id}) > -> 0.0000s > == CreateChanges: migrated (0.0313s) > ========================================= > > == AddChangesetCommitDate: migrating > ========================================= > -- add_column(:changesets, :commit_date, :date) > -> 0.0156s > == AddChangesetCommitDate: migrated (0.0313s) > ================================ > > == AddProjectIdentifier: migrating > =========================================== > -- add_column(:projects, :identifier, :string, {:limit=>20}) > -> 0.0000s > == AddProjectIdentifier: migrated (0.0000s) > ================================== > > == AddCustomFieldIsFilter: migrating > ========================================= > -- add_column(:custom_fields, :is_filter, :boolean, {:null=>false, > :default=>false}) > -> 0.0000s > == AddCustomFieldIsFilter: migrated (0.0000s) > ================================ > > == CreateWatchers: migrating > ================================================= > -- create_table(:watchers) > -> 0.0156s > == CreateWatchers: migrated (0.0156s) > ======================================== > > == CreateChangesetsIssues: migrating > ========================================= > -- create_table(:changesets_issues, {:id=>false}) > -> 0.0156s > -- add_index(:changesets_issues, [:changeset_id, :issue_id], > {:unique=>true, :name=>:changesets_issues_ids}) > -> 0.0000s > == CreateChangesetsIssues: migrated (0.0156s) > ================================ > > == RenameCommentToComments: migrating > ======================================== > == RenameCommentToComments: migrated (0.4063s) > =============================== > > == CreateIssueRelations: migrating > =========================================== > -- create_table(:issue_relations) > -> 0.0156s > == CreateIssueRelations: migrated (0.0156s) > ================================== > > == AddRelationsPermissions: migrating > ======================================== > == AddRelationsPermissions: migrated (0.1250s) > =============================== > > == SetLanguageLengthToFive: migrating > ======================================== > -- change_column(:users, :language, :string, {:limit=>5, :default=>""}) > rake aborted! > An error has occurred, this and all later migrations canceled: > > Invalid attempt to call Read when reader is closed. > System.Data:0:in `ReadInternal' > System.Data:0:in `Read' > statement.rb:48:in `fetch' > statement.rb:207:in `fetch' > statement.rb:236:in `each' > IronRuby.Libraries:0:in `Each' > :0:in `inject' > sqlserver_adapter.rb:878:in `handle_as_array' > > > sqlserver_adapter.rb:862:in `raw_select' > > sqlserver_adapter.rb:814:in `select' > database_statements.rb:6:in `select_all' > query_cache.rb:58:in `select_all_with_query_cache' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn > ection_adapters/sqlserver_adapter.rb:911:in `remove_default_constraint' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn > ection_adapters/sqlserver_adapter.rb:655:in `change_column' > :0:in `__send__' > migration.rb:348:in `method_missing' > migration.rb:328:in `say_with_time' > benchmark.rb:291:in `measure' > migration.rb:325:in `say_with_time' > migration.rb:345:in `method_missing' > ./db/migrate/044_set_language_length_to_five.rb:3:in `up' > :0:in `send' > migration.rb:282:in `migrate' > benchmark.rb:291:in `measure' > migration.rb:273:in `migrate' > :0:in `send' > C:1:in `migrate' > migration.rb:485:in `migrate' > :0:in `call' > migration.rb:560:in `ddl_transaction' > database_statements.rb:113:in `transaction' > transactions.rb:180:in `transaction' > migration.rb:558:in `ddl_transaction' > migration.rb:472:in `migrate' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:472:in`m > igrate' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:400:in`u > p' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:383:in`m > igrate' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:116 > :0:in `[]' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in`invoke_with_call_chain' > > > C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in`mon_synchronize' > > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in`invoke_with_call_chain' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in`invoke_task' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in`top_level' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in`top_level' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in`standard_exception_handling > ' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in`top_level' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in`standard_exception_handling > ' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 > :0:in `load' > C:/Program Files/IronRuby 0.9.4.0/bin/irake:19 > > > > On Fri, Feb 19, 2010 at 4:36 PM, Shri Borde > wrote: > > We can lock back to 2.3 which is the version that we check against. Is the > connection problem related to IronRuby or specific to your setup? > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Scott Holden > *Sent:* Friday, February 19, 2010 2:29 PM > > > *To:* ironruby-core at rubyforge.org > > *Subject:* Re: [Ironruby-core] Getting up and running with ActiveRecord + > Sqlserver > > > > Locking down 2.3.1 fixed the old error, now I'm just having a connection > problem. BTW, there's no remote gem for 2.3.1, so people will need to pull > it from github and build it themselves for now. Here's my database.yml: > > development: > mode: ADONET > adapter: sqlserver > host: webdevelopment1 > database: redmine_development > integrated_security: true > > On Fri, Feb 19, 2010 at 2:25 PM, Shri Borde > wrote: > > Scott, I see you are using 2.3.4 of the activerecord-sqlserver-adapter gem. > Can you lock down on 2.3.1 of the gem instead using something like the > following in your Ruby code before you do ?require ?ironruby-sqlserver??: > > > > gem ?activerecord-sqlserver-adapter?, ?= 2.3.1? > > > > They dropped support for DBI within the last week. The links below have > info about the change. > > > http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/4cf40c1330aef3a?hl=en > > > http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/647522f857e3c31c?hl=en > > > > If locking down on 2.3.1 works for you, we can just add that to > ironruby-sqlserver. > > > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Scott Holden > *Sent:* Friday, February 19, 2010 11:25 AM > *To:* ironruby-core at rubyforge.org > *Subject:* [Ironruby-core] Getting up and running with ActiveRecord + > Sqlserver > > > > I'm trying to follow the example given at > http://ironruby.net/Documentation/Real_Ruby_Applications/Rails for getting > ActiveRecord up and running. Whenever I try to run a migration, I'm getting > this error. Could anyone point me in the right direction? I'm trying to > get a simple rails app up and running, then I want to start trying to get > Redmine working on IronRuby. Redmine is my company's only internal Rails > app at the moment, but I'd like to use it as a way to get people started > using IronRuby. It would be a great way to integrate a Rails application > with our internal ORM and create a Redmine plugin to tie into our deployment > system. > > Here's my trace from rake db:migrate > > C:\Documents and Settings\sholden\My > Documents\NetBeansProjects\redmine>irake db:migrate --trace > (in C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine) > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > rake aborted! > undefined method `columns' for :ado:Symbol > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:862:in`raw_select' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:827:in`select' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in`select_all' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in`select_all_with_query_cache' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in`select_one' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in`select_value' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in`database_version' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in`info_schema_query' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1448:in`silence' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in`info_schema_query' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in`database_version' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:219:in > `database_year' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:191:in`initialize' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/ironruby-sqlserver-0.1.0/lib/activerecord-sqlserver-adapter/adonet_patch.rb:36:in`sqlserver_connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in`new_connection' > :0:in `__send__' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in`checkout_new_connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in`checkout' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in`checkout' > :0:in `loop' > C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in`mon_synchronize' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in`checkout' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in`connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in`retrieve_connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in`retrieve_connection' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in`connection' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in > `quoted_left_column_name' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in > `acts_as_nested_set' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/app/models/project.rb:54 > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380: > in `load_file' > :0:in `load' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379: > in `load_file' > dependencies.rb:490:in `new_constants_in' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259: > in `require_or_load' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in > `require_or_load_with_engine_additions' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > dependencies.rb:398:in `load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:98:in`const_missing' > :0:in `__send__' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/app/models/attachment.rb:31 > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in`load_file' > :0:in `load' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379 > :in `load_file' > dependencies.rb:490:in `new_constants_in' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in`require_or_load' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in > `require_or_load_with_engine_additions' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:32:in > `acts_as_attachable' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/app/models/message.rb:22 > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in`load_file' > :0:in `load' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in`load_file' > dependencies.rb:490:in `new_constants_in' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in`require_or_load' > C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in > `require_or_load_with_engine_additions' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in`load_missing_constant' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:157:in`observed_class' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:183:in`observed_classes' > inflector.rb:360:in `constantize' > :0:in `each' > inflector.rb:355:in `constantize' > inflections.rb:161:in `constantize' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:166:in`initialize' > C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/singleton.rb:94 > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:38:in`instantiate_observers' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:36:in`instantiate_observers' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:15:in`define_dispatcher_callbacks > ' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in`evaluate_method > ' > :0:in `[]' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in`call > ' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in`run' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in`run' > :0:in `send' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in`run_callbacks > ' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in`run_prepare_callbacks > ' > :0:in `__send__' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in`prepare_dispatcher' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in`process' > :0:in `send' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in`run' > > Thanks for any advice, > > -Scott > > > _______________________________________________ > 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 Shri.Borde at microsoft.com Fri Feb 19 20:08:36 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Sat, 20 Feb 2010 01:08:36 +0000 Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver In-Reply-To: <4b34c4521002191659g2bc8a1f0h80caf5d79e0482b4@mail.gmail.com> References: <4b34c4521002191124qb7ff6d3j3d8550b92b78ecc2@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A704085F@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191429s7af89288ha4753b13ed9a17c6@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040AC3@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191453m233bd341h29210a3407c11b2b@mail.gmail.com> <4b34c4521002191454i128d24bcu556eed05121262fa@mail.gmail.com> <4b34c4521002191456x44b3685ep6f95937ccb71d813@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040B5C@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191659g2bc8a1f0h80caf5d79e0482b4@mail.gmail.com> Message-ID: <6459203F8B1AF641995AE49D47FA51A7040D87@TK5EX14MBXC134.redmond.corp.microsoft.com> Sorry, no idea about this one. I just know the failures from the unit tests. You can see the currently failing tests with a brief description of the failure in the disable_tests function in http://github.com/ironruby/ironruby/blob/master/Merlin/Main/Languages/Ruby/Tests/Scripts/utr/active_record_tests.rb. I don't see anything about mismatched types there. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Scott Holden Sent: Friday, February 19, 2010 4:59 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver Shri, thanks a ton for your help. That fixed the reader is closed issue, but I ran into another migration problem. In ChangeChangesetsRevisionToString, the migration tries change_column :changesets, :revision, :string, :null => false Sqlserver is not too happy about changing int to varchar(255). I'll probably try to look at it some more in the morning, but if you've already seen this, please let me know. -Scott On Fri, Feb 19, 2010 at 5:13 PM, Shri Borde > wrote: So you are running into "Invalid attempt to call Read when reader is closed". I fixed that error in ironruby-dbi. Could you grab http://github.com/ironruby/ironruby/blob/master/Merlin/External.LCA_RESTRICTED/Languages/Ruby/ruby-1.8.6p368/lib/ruby/gems/1.8/gems/ironruby-dbi-0.1.0/lib/dbd/mssql/statement.rb and copy it over your ironruby-dbi gem? If you are curious, the fix involves the following lines which deal with the case of the reader being closed. def fetch if @reader and @reader.is_closed if @pending_fetches return @pending_fetches.shift else return nil end end From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Scott Holden Sent: Friday, February 19, 2010 2:56 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver Make that 0.9.2. Apparently the 0.9 versioning is getting mixed up in my head :P On Fri, Feb 19, 2010 at 4:54 PM, Scott Holden > wrote: By the way, I'm working with Redmine 0.9.4 stable On Fri, Feb 19, 2010 at 4:53 PM, Scott Holden > wrote: Hah! I'm a moron. Got started looking too deep for my problems, missed my own stupid mistake... web^H^H^Hsqldevelopment1. Thanks a ton for being so helpful. I'm trying migrations from Redmine, but blowing up on 044_set_language_length_to_five. Line 3 seems to be the issue: change_column :users, :language, :string, :limit => 5, :default => "" Here's my trace: C:\Documents and Settings\sholden\My Documents\NetBeansProjects\redmine>irake db:migrate --trace (in C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == Setup: migrating ========================================================== -- create_table("attachments", {:force=>true}) -> 0.1406s -- create_table("auth_sources", {:force=>true}) -> 0.0313s -- create_table("custom_fields", {:force=>true}) -> 0.0156s -- create_table("custom_fields_projects", {:id=>false, :force=>true}) -> 0.0156s -- create_table("custom_fields_trackers", {:id=>false, :force=>true}) -> 0.0469s -- create_table("custom_values", {:force=>true}) -> 0.0313s -- create_table("documents", {:force=>true}) -> 0.0313s -- add_index("documents", ["project_id"], {:name=>"documents_project_id"}) -> 0.0000s -- create_table("enumerations", {:force=>true}) -> 0.0625s -- create_table("issue_categories", {:force=>true}) -> 0.0313s -- add_index("issue_categories", ["project_id"], {:name=>"issue_categories_project_id"}) -> 0.0313s -- create_table("issue_histories", {:force=>true}) -> 0.0781s -- add_index("issue_histories", ["issue_id"], {:name=>"issue_histories_issue_id"}) -> 0.0000s -- create_table("issue_statuses", {:force=>true}) -> 0.0781s -- create_table("issues", {:force=>true}) -> 0.0469s -- add_index("issues", ["project_id"], {:name=>"issues_project_id"}) -> 0.0000s -- create_table("members", {:force=>true}) -> 0.0156s -- create_table("news", {:force=>true}) -> 0.0625s -- add_index("news", ["project_id"], {:name=>"news_project_id"}) -> 0.0000s -- create_table("permissions", {:force=>true}) -> 0.0313s -- create_table("permissions_roles", {:id=>false, :force=>true}) -> 0.0156s -- add_index("permissions_roles", ["role_id"], {:name=>"permissions_roles_role_id"}) -> 0.0156s -- create_table("projects", {:force=>true}) -> 0.0313s -- create_table("roles", {:force=>true}) -> 0.0156s -- create_table("tokens", {:force=>true}) -> 0.0313s -- create_table("trackers", {:force=>true}) -> 0.0313s -- create_table("users", {:force=>true}) -> 0.0313s -- create_table("versions", {:force=>true}) -> 0.0313s -- add_index("versions", ["project_id"], {:name=>"versions_project_id"}) -> 0.0000s -- create_table("workflows", {:force=>true}) -> 0.0313s == Setup: migrated (2.4844s) ================================================= == IssueMove: migrating ====================================================== == IssueMove: migrated (0.1094s) ============================================= == IssueAddNote: migrating =================================================== == IssueAddNote: migrated (0.1406s) ========================================== == ExportPdf: migrating ====================================================== == ExportPdf: migrated (0.1250s) ============================================= == IssueStartDate: migrating ================================================= -- add_column(:issues, :start_date, :date) -> 0.0000s -- add_column(:issues, :done_ratio, :integer, {:default=>0, :null=>false}) -> 0.0313s == IssueStartDate: migrated (0.0469s) ======================================== == CalendarAndActivity: migrating ============================================ == CalendarAndActivity: migrated (0.1250s) =================================== == CreateJournals: migrating ================================================= -- create_table(:journals, {:force=>true}) -> 0.0469s -- create_table(:journal_details, {:force=>true}) -> 0.0313s -- add_index("journals", ["journalized_id", "journalized_type"], {:name=>"journals_journalized_id"}) -> 0.0156s -- add_index("journal_details", ["journal_id"], {:name=>"journal_details_journal_id"}) -> 0.0156s -- drop_table(:issue_histories) -> 0.0156s == CreateJournals: migrated (0.3750s) ======================================== == CreateUserPreferences: migrating ========================================== -- create_table(:user_preferences) -> 0.0156s == CreateUserPreferences: migrated (0.0156s) ================================= == AddHideMailPref: migrating ================================================ -- add_column(:user_preferences, :hide_mail, :boolean, {:default=>false}) -> 0.0156s == AddHideMailPref: migrated (0.0156s) ======================================= == CreateComments: migrating ================================================= -- create_table(:comments) -> 0.0156s == CreateComments: migrated (0.0156s) ======================================== == AddNewsCommentsCount: migrating =========================================== -- add_column(:news, :comments_count, :integer, {:default=>0, :null=>false}) -> 0.0156s == AddNewsCommentsCount: migrated (0.0156s) ================================== == AddCommentsPermissions: migrating ========================================= == AddCommentsPermissions: migrated (0.1094s) ================================ == CreateQueries: migrating ================================================== -- create_table(:queries, {:force=>true}) -> 0.0313s == CreateQueries: migrated (0.0313s) ========================================= == AddQueriesPermissions: migrating ========================================== == AddQueriesPermissions: migrated (0.0938s) ================================= == CreateRepositories: migrating ============================================= -- create_table(:repositories, {:force=>true}) -> 0.0313s == CreateRepositories: migrated (0.0313s) ==================================== == AddRepositoriesPermissions: migrating ===================================== == AddRepositoriesPermissions: migrated (0.1563s) ============================ == CreateSettings: migrating ================================================= -- create_table(:settings, {:force=>true}) -> 0.0156s == CreateSettings: migrated (0.0313s) ======================================== == SetDocAndFilesNotifications: migrating ==================================== == SetDocAndFilesNotifications: migrated (0.2031s) =========================== == AddIssueStatusPosition: migrating ========================================= -- add_column(:issue_statuses, :position, :integer, {:default=>1}) -> 0.0156s == AddIssueStatusPosition: migrated (0.0781s) ================================ == AddRolePosition: migrating ================================================ -- add_column(:roles, :position, :integer, {:default=>1}) -> 0.0156s == AddRolePosition: migrated (0.1719s) ======================================= == AddTrackerPosition: migrating ============================================= -- add_column(:trackers, :position, :integer, {:default=>1}) -> 0.0156s == AddTrackerPosition: migrated (0.0625s) ==================================== == SerializePossiblesValues: migrating ======================================= == SerializePossiblesValues: migrated (0.0469s) ============================== == AddTrackerIsInRoadmap: migrating ========================================== -- add_column(:trackers, :is_in_roadmap, :boolean, {:default=>true, :null=>false}) -> 0.0000s == AddTrackerIsInRoadmap: migrated (0.0000s) ================================= == AddRoadmapPermission: migrating =========================================== == AddRoadmapPermission: migrated (0.1250s) ================================== == AddSearchPermission: migrating ============================================ == AddSearchPermission: migrated (0.0938s) =================================== == AddRepositoryLoginAndPassword: migrating ================================== -- add_column(:repositories, :login, :string, {:limit=>60, :default=>""}) -> 0.0000s -- add_column(:repositories, :password, :string, {:limit=>60, :default=>""}) -> 0.0313s == AddRepositoryLoginAndPassword: migrated (0.0313s) ========================= == CreateWikis: migrating ==================================================== -- create_table(:wikis) -> 0.0000s -- add_index(:wikis, :project_id, {:name=>:wikis_project_id}) -> 0.0000s == CreateWikis: migrated (0.0313s) =========================================== == CreateWikiPages: migrating ================================================ -- create_table(:wiki_pages) -> 0.0156s -- add_index(:wiki_pages, [:wiki_id, :title], {:name=>:wiki_pages_wiki_id_title}) -> 0.0156s == CreateWikiPages: migrated (0.0313s) ======================================= == CreateWikiContents: migrating ============================================= -- create_table(:wiki_contents) -> 0.0156s -- add_index(:wiki_contents, :page_id, {:name=>:wiki_contents_page_id}) -> 0.0000s -- create_table(:wiki_content_versions) -> 0.0313s -- add_index(:wiki_content_versions, :wiki_content_id, {:name=>:wiki_content_versions_wcid}) -> 0.0000s == CreateWikiContents: migrated (0.0469s) ==================================== == AddProjectsFeedsPermissions: migrating ==================================== == AddProjectsFeedsPermissions: migrated (0.0938s) =========================== == AddRepositoryRootUrl: migrating =========================================== -- add_column(:repositories, :root_url, :string, {:limit=>255, :default=>""}) -> 0.0000s == AddRepositoryRootUrl: migrated (0.0156s) ================================== == CreateTimeEntries: migrating ============================================== -- create_table(:time_entries) -> 0.0156s -- add_index(:time_entries, [:project_id], {:name=>:time_entries_project_id}) -> 0.0000s -- add_index(:time_entries, [:issue_id], {:name=>:time_entries_issue_id}) -> 0.0156s == CreateTimeEntries: migrated (0.0313s) ===================================== == AddTimelogPermissions: migrating ========================================== == AddTimelogPermissions: migrated (0.0938s) ================================= == CreateChangesets: migrating =============================================== -- create_table(:changesets) -> 0.0000s -- add_index(:changesets, [:repository_id, :revision], {:unique=>true, :name=>:changesets_repos_rev}) -> 0.0156s == CreateChangesets: migrated (0.0313s) ====================================== == CreateChanges: migrating ================================================== -- create_table(:changes) -> 0.0313s -- add_index(:changes, [:changeset_id], {:name=>:changesets_changeset_id}) -> 0.0000s == CreateChanges: migrated (0.0313s) ========================================= == AddChangesetCommitDate: migrating ========================================= -- add_column(:changesets, :commit_date, :date) -> 0.0156s == AddChangesetCommitDate: migrated (0.0313s) ================================ == AddProjectIdentifier: migrating =========================================== -- add_column(:projects, :identifier, :string, {:limit=>20}) -> 0.0000s == AddProjectIdentifier: migrated (0.0000s) ================================== == AddCustomFieldIsFilter: migrating ========================================= -- add_column(:custom_fields, :is_filter, :boolean, {:null=>false, :default=>false}) -> 0.0000s == AddCustomFieldIsFilter: migrated (0.0000s) ================================ == CreateWatchers: migrating ================================================= -- create_table(:watchers) -> 0.0156s == CreateWatchers: migrated (0.0156s) ======================================== == CreateChangesetsIssues: migrating ========================================= -- create_table(:changesets_issues, {:id=>false}) -> 0.0156s -- add_index(:changesets_issues, [:changeset_id, :issue_id], {:unique=>true, :name=>:changesets_issues_ids}) -> 0.0000s == CreateChangesetsIssues: migrated (0.0156s) ================================ == RenameCommentToComments: migrating ======================================== == RenameCommentToComments: migrated (0.4063s) =============================== == CreateIssueRelations: migrating =========================================== -- create_table(:issue_relations) -> 0.0156s == CreateIssueRelations: migrated (0.0156s) ================================== == AddRelationsPermissions: migrating ======================================== == AddRelationsPermissions: migrated (0.1250s) =============================== == SetLanguageLengthToFive: migrating ======================================== -- change_column(:users, :language, :string, {:limit=>5, :default=>""}) rake aborted! An error has occurred, this and all later migrations canceled: Invalid attempt to call Read when reader is closed. System.Data:0:in `ReadInternal' System.Data:0:in `Read' statement.rb:48:in `fetch' statement.rb:207:in `fetch' statement.rb:236:in `each' IronRuby.Libraries:0:in `Each' :0:in `inject' sqlserver_adapter.rb:878:in `handle_as_array' sqlserver_adapter.rb:862:in `raw_select' sqlserver_adapter.rb:814:in `select' database_statements.rb:6:in `select_all' query_cache.rb:58:in `select_all_with_query_cache' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn ection_adapters/sqlserver_adapter.rb:911:in `remove_default_constraint' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn ection_adapters/sqlserver_adapter.rb:655:in `change_column' :0:in `__send__' migration.rb:348:in `method_missing' migration.rb:328:in `say_with_time' benchmark.rb:291:in `measure' migration.rb:325:in `say_with_time' migration.rb:345:in `method_missing' ./db/migrate/044_set_language_length_to_five.rb:3:in `up' :0:in `send' migration.rb:282:in `migrate' benchmark.rb:291:in `measure' migration.rb:273:in `migrate' :0:in `send' C:1:in `migrate' migration.rb:485:in `migrate' :0:in `call' migration.rb:560:in `ddl_transaction' database_statements.rb:113:in `transaction' transactions.rb:180:in `transaction' migration.rb:558:in `ddl_transaction' migration.rb:472:in `migrate' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:472:in `m igrate' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:400:in `u p' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:383:in `m igrate' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:116 :0:in `[]' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in `mon_synchronize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling ' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling ' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 :0:in `load' C:/Program Files/IronRuby 0.9.4.0/bin/irake:19 On Fri, Feb 19, 2010 at 4:36 PM, Shri Borde > wrote: We can lock back to 2.3 which is the version that we check against. Is the connection problem related to IronRuby or specific to your setup? From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Scott Holden Sent: Friday, February 19, 2010 2:29 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver Locking down 2.3.1 fixed the old error, now I'm just having a connection problem. BTW, there's no remote gem for 2.3.1, so people will need to pull it from github and build it themselves for now. Here's my database.yml: development: mode: ADONET adapter: sqlserver host: webdevelopment1 database: redmine_development integrated_security: true On Fri, Feb 19, 2010 at 2:25 PM, Shri Borde > wrote: Scott, I see you are using 2.3.4 of the activerecord-sqlserver-adapter gem. Can you lock down on 2.3.1 of the gem instead using something like the following in your Ruby code before you do "require 'ironruby-sqlserver'": gem "activerecord-sqlserver-adapter", "= 2.3.1" They dropped support for DBI within the last week. The links below have info about the change. http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/4cf40c1330aef3a?hl=en http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/647522f857e3c31c?hl=en If locking down on 2.3.1 works for you, we can just add that to ironruby-sqlserver. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Scott Holden Sent: Friday, February 19, 2010 11:25 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver I'm trying to follow the example given at http://ironruby.net/Documentation/Real_Ruby_Applications/Rails for getting ActiveRecord up and running. Whenever I try to run a migration, I'm getting this error. Could anyone point me in the right direction? I'm trying to get a simple rails app up and running, then I want to start trying to get Redmine working on IronRuby. Redmine is my company's only internal Rails app at the moment, but I'd like to use it as a way to get people started using IronRuby. It would be a great way to integrate a Rails application with our internal ORM and create a Redmine plugin to tie into our deployment system. Here's my trace from rake db:migrate C:\Documents and Settings\sholden\My Documents\NetBeansProjects\redmine>irake db:migrate --trace (in C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! undefined method `columns' for :ado:Symbol C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:862:in `raw_select' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:827:in `select' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in `select_all_with_query_cache' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in `select_one' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in `select_value' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in `database_version' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in `info_schema_query' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1448:in `silence' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in `info_schema_query' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in `database_version' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:219:in `database_year' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:191:in `initialize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ironruby-sqlserver-0.1.0/lib/activerecord-sqlserver-adapter/adonet_patch.rb:36:in `sqlserver_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection' :0:in `__send__' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout' :0:in `loop' C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in `mon_synchronize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in `quoted_left_column_name' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in `acts_as_nested_set' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/app/models/project.rb:54 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380: in `load_file' :0:in `load' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379: in `load_file' dependencies.rb:490:in `new_constants_in' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259: in `require_or_load' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load_with_engine_additions' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' dependencies.rb:398:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:98:in `const_missing' :0:in `__send__' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/app/models/attachment.rb:31 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_file' :0:in `load' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379 :in `load_file' dependencies.rb:490:in `new_constants_in' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in `require_or_load' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load_with_engine_additions' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:32:in `acts_as_attachable' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/app/models/message.rb:22 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_file' :0:in `load' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in `load_file' dependencies.rb:490:in `new_constants_in' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in `require_or_load' C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load_with_engine_additions' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in `load_missing_constant' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:157:in `observed_class' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:183:in `observed_classes' inflector.rb:360:in `constantize' :0:in `each' inflector.rb:355:in `constantize' inflections.rb:161:in `constantize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:166:in `initialize' C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/singleton.rb:94 C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:38:in `instantiate_observers' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:36:in `instantiate_observers' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:15:in`define_dispatcher_callbacks' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in`evaluate_method' :0:in `[]' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in`call' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run' :0:in `send' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in`run_callbacks' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in`run_prepare_callbacks' :0:in `__send__' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in `prepare_dispatcher' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in `process' :0:in `send' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run' Thanks for any advice, -Scott _______________________________________________ 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 Fri Feb 19 20:29:07 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 20 Feb 2010 01:29:07 +0000 Subject: [Ironruby-core] Code Review: TypeInferenceBugs Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3DB59CD3@TK5EX14MBXC122.redmond.corp.microsoft.com> tfpt review "/shelveset:TypeInferenceBugs;REDMOND\tomat" Comment : Fixes bugs in type inference: 1) By-ref generic parameter public void Foo(ref T x); Foo(1) Foo(StrongBox()) 2) Multiple generic parameters public IEnumerable Select(IEnumerable source, Func selector); 3) Generic arrays public int Foo(T[] x); 4) Type shape difference public static int f5(Dictionary, Dictionary> arg); C.f5( Dictionary[List[str], Dictionary[int, str]]() ) In general type inference seems to need more test coverage - various type shapes, arrays, ref/out with and w/o strong boxes, params array, params dict, optional, named combinations. I've added a few tests for the cases above to Ruby unit tests. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: TypeInferenceBugs.diff Type: application/octet-stream Size: 5082 bytes Desc: TypeInferenceBugs.diff URL: From sholde4 at gmail.com Fri Feb 19 23:13:03 2010 From: sholde4 at gmail.com (Scott Holden) Date: Fri, 19 Feb 2010 22:13:03 -0600 Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver In-Reply-To: <6459203F8B1AF641995AE49D47FA51A7040D87@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <4b34c4521002191124qb7ff6d3j3d8550b92b78ecc2@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A704085F@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191429s7af89288ha4753b13ed9a17c6@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040AC3@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191453m233bd341h29210a3407c11b2b@mail.gmail.com> <4b34c4521002191454i128d24bcu556eed05121262fa@mail.gmail.com> <4b34c4521002191456x44b3685ep6f95937ccb71d813@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040B5C@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191659g2bc8a1f0h80caf5d79e0482b4@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040D87@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: <948E9CA7-4728-418F-9C23-96E139A11212@gmail.com> Is there an implementation of ruby-debug-IDE for ir? Sent from my iPhone On Feb 19, 2010, at 7:08 PM, Shri Borde wrote: > Sorry, no idea about this one. > > > > I just know the failures from the unit tests. You can see the > currently failing tests with a brief description of the failure in > the disable_tests function in http://github.com/ironruby/ironruby/blob/master/Merlin/Main/Languages/Ruby/Tests/Scripts/utr/active_record_tests.rb > . I don?t see anything about mismatched types there. > > > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Scott Holden > Sent: Friday, February 19, 2010 4:59 PM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Getting up and running with > ActiveRecord + Sqlserver > > > > Shri, thanks a ton for your help. That fixed the reader is closed > issue, but I ran into another migration problem. In > ChangeChangesetsRevisionToString, the migration tries > > change_column :changesets, :revision, :string, :null => false > > Sqlserver is not too happy about changing int to varchar(255). I'll > probably try to look at it some more in the morning, but if you've > already seen this, please let me know. > > -Scott > > On Fri, Feb 19, 2010 at 5:13 PM, Shri Borde > wrote: > > So you are running into ?Invalid attempt to call Read when reader is > closed?. I fixed that error in ironruby-dbi. Could you grab http://github.com/ironruby/ironruby/blob/master/Merlin/External.LCA_RESTRICTED/Languages/Ruby/ruby-1.8.6p368/lib/ruby/gems/1.8/gems/ironruby-dbi-0.1.0/lib/dbd/mssql/statement. > rb and copy it over your ironruby-dbi gem? > > > > If you are curious, the fix involves the following lines which deal > with the case of the reader being closed. > > > > def fetch > > if @reader and @reader.is_closed > > if @pending_fetches > > return @pending_fetches.shift > > else > > return nil > > end > > end > > > > > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Scott Holden > Sent: Friday, February 19, 2010 2:56 PM > > > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Getting up and running with > ActiveRecord + Sqlserver > > > > Make that 0.9.2. Apparently the 0.9 versioning is getting mixed up > in my head :P > > On Fri, Feb 19, 2010 at 4:54 PM, Scott Holden > wrote: > > By the way, I'm working with Redmine 0.9.4 stable > > > > On Fri, Feb 19, 2010 at 4:53 PM, Scott Holden > wrote: > > Hah! I'm a moron. Got started looking too deep for my problems, > missed my own stupid mistake... web^H^H^Hsqldevelopment1. Thanks a > ton for being so helpful. > > I'm trying migrations from Redmine, but blowing up on > 044_set_language_length_to_five. > > Line 3 seems to be the issue: > > change_column :users, :language, :string, :limit => 5, :default => "" > > Here's my trace: > > > > C:\Documents and Settings\sholden\My Documents\NetBeansProjects > \redmine>irake db:migrate --trace > (in C:/Documents and Settings/sholden/My Documents/NetBeansProjects/ > redmine) > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > > ** Execute db:migrate > == Setup: migrating > ========================================================== > -- create_table("attachments", {:force=>true}) > -> 0.1406s > -- create_table("auth_sources", {:force=>true}) > -> 0.0313s > -- create_table("custom_fields", {:force=>true}) > -> 0.0156s > -- create_table("custom_fields_projects", {:id=>false, :force=>true}) > -> 0.0156s > -- create_table("custom_fields_trackers", {:id=>false, :force=>true}) > -> 0.0469s > -- create_table("custom_values", {:force=>true}) > -> 0.0313s > -- create_table("documents", {:force=>true}) > -> 0.0313s > -- add_index("documents", ["project_id"], > {:name=>"documents_project_id"}) > -> 0.0000s > -- create_table("enumerations", {:force=>true}) > -> 0.0625s > -- create_table("issue_categories", {:force=>true}) > -> 0.0313s > -- add_index("issue_categories", ["project_id"], > {:name=>"issue_categories_project_id"}) > -> 0.0313s > -- create_table("issue_histories", {:force=>true}) > -> 0.0781s > -- add_index("issue_histories", ["issue_id"], > {:name=>"issue_histories_issue_id"}) > -> 0.0000s > -- create_table("issue_statuses", {:force=>true}) > -> 0.0781s > -- create_table("issues", {:force=>true}) > -> 0.0469s > -- add_index("issues", ["project_id"], {:name=>"issues_project_id"}) > -> 0.0000s > -- create_table("members", {:force=>true}) > -> 0.0156s > -- create_table("news", {:force=>true}) > -> 0.0625s > -- add_index("news", ["project_id"], {:name=>"news_project_id"}) > -> 0.0000s > -- create_table("permissions", {:force=>true}) > -> 0.0313s > -- create_table("permissions_roles", {:id=>false, :force=>true}) > -> 0.0156s > -- add_index("permissions_roles", ["role_id"], > {:name=>"permissions_roles_role_id"}) > -> 0.0156s > -- create_table("projects", {:force=>true}) > -> 0.0313s > -- create_table("roles", {:force=>true}) > -> 0.0156s > -- create_table("tokens", {:force=>true}) > -> 0.0313s > -- create_table("trackers", {:force=>true}) > -> 0.0313s > -- create_table("users", {:force=>true}) > -> 0.0313s > -- create_table("versions", {:force=>true}) > -> 0.0313s > -- add_index("versions", ["project_id"], > {:name=>"versions_project_id"}) > -> 0.0000s > -- create_table("workflows", {:force=>true}) > -> 0.0313s > == Setup: migrated (2.4844s) > ================================================= > > == IssueMove: migrating > ====================================================== > == IssueMove: migrated (0.1094s) > ============================================= > > == IssueAddNote: migrating > =================================================== > == IssueAddNote: migrated (0.1406s) > ========================================== > > == ExportPdf: migrating > ====================================================== > == ExportPdf: migrated (0.1250s) > ============================================= > > == IssueStartDate: migrating > ================================================= > -- add_column(:issues, :start_date, :date) > -> 0.0000s > -- add_column(:issues, :done_ratio, :integer, > {:default=>0, :null=>false}) > -> 0.0313s > == IssueStartDate: migrated (0.0469s) > ======================================== > > == CalendarAndActivity: migrating > ============================================ > == CalendarAndActivity: migrated (0.1250s) > =================================== > > == CreateJournals: migrating > ================================================= > -- create_table(:journals, {:force=>true}) > -> 0.0469s > -- create_table(:journal_details, {:force=>true}) > -> 0.0313s > -- add_index("journals", ["journalized_id", "journalized_type"], > {:name=>"journals_journalized_id"}) > -> 0.0156s > -- add_index("journal_details", ["journal_id"], > {:name=>"journal_details_journal_id"}) > -> 0.0156s > -- drop_table(:issue_histories) > -> 0.0156s > == CreateJournals: migrated (0.3750s) > ======================================== > > == CreateUserPreferences: migrating > ========================================== > -- create_table(:user_preferences) > -> 0.0156s > == CreateUserPreferences: migrated (0.0156s) > ================================= > > == AddHideMailPref: migrating > ================================================ > -- add_column(:user_preferences, :hide_mail, :boolean, > {:default=>false}) > -> 0.0156s > == AddHideMailPref: migrated (0.0156s) > ======================================= > > == CreateComments: migrating > ================================================= > -- create_table(:comments) > -> 0.0156s > == CreateComments: migrated (0.0156s) > ======================================== > > == AddNewsCommentsCount: migrating > =========================================== > -- add_column(:news, :comments_count, :integer, > {:default=>0, :null=>false}) > -> 0.0156s > == AddNewsCommentsCount: migrated (0.0156s) > ================================== > > == AddCommentsPermissions: migrating > ========================================= > == AddCommentsPermissions: migrated (0.1094s) > ================================ > > == CreateQueries: migrating > ================================================== > -- create_table(:queries, {:force=>true}) > -> 0.0313s > == CreateQueries: migrated (0.0313s) > ========================================= > > == AddQueriesPermissions: migrating > ========================================== > == AddQueriesPermissions: migrated (0.0938s) > ================================= > > == CreateRepositories: migrating > ============================================= > -- create_table(:repositories, {:force=>true}) > -> 0.0313s > == CreateRepositories: migrated (0.0313s) > ==================================== > > == AddRepositoriesPermissions: migrating > ===================================== > == AddRepositoriesPermissions: migrated (0.1563s) > ============================ > > == CreateSettings: migrating > ================================================= > -- create_table(:settings, {:force=>true}) > -> 0.0156s > == CreateSettings: migrated (0.0313s) > ======================================== > > == SetDocAndFilesNotifications: migrating > ==================================== > == SetDocAndFilesNotifications: migrated (0.2031s) > =========================== > > == AddIssueStatusPosition: migrating > ========================================= > -- add_column(:issue_statuses, :position, :integer, {:default=>1}) > -> 0.0156s > == AddIssueStatusPosition: migrated (0.0781s) > ================================ > > == AddRolePosition: migrating > ================================================ > -- add_column(:roles, :position, :integer, {:default=>1}) > -> 0.0156s > == AddRolePosition: migrated (0.1719s) > ======================================= > > == AddTrackerPosition: migrating > ============================================= > -- add_column(:trackers, :position, :integer, {:default=>1}) > -> 0.0156s > == AddTrackerPosition: migrated (0.0625s) > ==================================== > > == SerializePossiblesValues: migrating > ======================================= > == SerializePossiblesValues: migrated (0.0469s) > ============================== > > == AddTrackerIsInRoadmap: migrating > ========================================== > -- add_column(:trackers, :is_in_roadmap, :boolean, > {:default=>true, :null=>false}) > -> 0.0000s > == AddTrackerIsInRoadmap: migrated (0.0000s) > ================================= > > == AddRoadmapPermission: migrating > =========================================== > == AddRoadmapPermission: migrated (0.1250s) > ================================== > > == AddSearchPermission: migrating > ============================================ > == AddSearchPermission: migrated (0.0938s) > =================================== > > == AddRepositoryLoginAndPassword: migrating > ================================== > -- add_column(:repositories, :login, :string, > {:limit=>60, :default=>""}) > -> 0.0000s > -- add_column(:repositories, :password, :string, > {:limit=>60, :default=>""}) > -> 0.0313s > == AddRepositoryLoginAndPassword: migrated (0.0313s) > ========================= > > == CreateWikis: migrating > ==================================================== > -- create_table(:wikis) > -> 0.0000s > -- add_index(:wikis, :project_id, {:name=>:wikis_project_id}) > -> 0.0000s > == CreateWikis: migrated (0.0313s) > =========================================== > > == CreateWikiPages: migrating > ================================================ > -- create_table(:wiki_pages) > -> 0.0156s > -- add_index(:wiki_pages, [:wiki_id, :title], > {:name=>:wiki_pages_wiki_id_title}) > -> 0.0156s > == CreateWikiPages: migrated (0.0313s) > ======================================= > > == CreateWikiContents: migrating > ============================================= > -- create_table(:wiki_contents) > -> 0.0156s > -- add_index(:wiki_contents, :page_id, > {:name=>:wiki_contents_page_id}) > -> 0.0000s > -- create_table(:wiki_content_versions) > -> 0.0313s > -- add_index(:wiki_content_versions, :wiki_content_id, > {:name=>:wiki_content_versions_wcid}) > -> 0.0000s > == CreateWikiContents: migrated (0.0469s) > ==================================== > > == AddProjectsFeedsPermissions: migrating > ==================================== > == AddProjectsFeedsPermissions: migrated (0.0938s) > =========================== > > == AddRepositoryRootUrl: migrating > =========================================== > -- add_column(:repositories, :root_url, :string, > {:limit=>255, :default=>""}) > -> 0.0000s > == AddRepositoryRootUrl: migrated (0.0156s) > ================================== > > == CreateTimeEntries: migrating > ============================================== > -- create_table(:time_entries) > -> 0.0156s > -- add_index(:time_entries, [:project_id], > {:name=>:time_entries_project_id}) > -> 0.0000s > -- add_index(:time_entries, [:issue_id], > {:name=>:time_entries_issue_id}) > -> 0.0156s > == CreateTimeEntries: migrated (0.0313s) > ===================================== > > == AddTimelogPermissions: migrating > ========================================== > == AddTimelogPermissions: migrated (0.0938s) > ================================= > > == CreateChangesets: migrating > =============================================== > -- create_table(:changesets) > -> 0.0000s > -- add_index(:changesets, [:repository_id, :revision], > {:unique=>true, :name=>:changesets_repos_rev}) > -> 0.0156s > == CreateChangesets: migrated (0.0313s) > ====================================== > > == CreateChanges: migrating > ================================================== > -- create_table(:changes) > -> 0.0313s > -- add_index(:changes, [:changeset_id], > {:name=>:changesets_changeset_id}) > -> 0.0000s > == CreateChanges: migrated (0.0313s) > ========================================= > > == AddChangesetCommitDate: migrating > ========================================= > -- add_column(:changesets, :commit_date, :date) > -> 0.0156s > == AddChangesetCommitDate: migrated (0.0313s) > ================================ > > == AddProjectIdentifier: migrating > =========================================== > -- add_column(:projects, :identifier, :string, {:limit=>20}) > -> 0.0000s > == AddProjectIdentifier: migrated (0.0000s) > ================================== > > == AddCustomFieldIsFilter: migrating > ========================================= > -- add_column(:custom_fields, :is_filter, :boolean, > {:null=>false, :default=>false}) > -> 0.0000s > == AddCustomFieldIsFilter: migrated (0.0000s) > ================================ > > == CreateWatchers: migrating > ================================================= > -- create_table(:watchers) > -> 0.0156s > == CreateWatchers: migrated (0.0156s) > ======================================== > > == CreateChangesetsIssues: migrating > ========================================= > -- create_table(:changesets_issues, {:id=>false}) > -> 0.0156s > -- add_index(:changesets_issues, [:changeset_id, :issue_id], > {:unique=>true, :name=>:changesets_issues_ids}) > -> 0.0000s > == CreateChangesetsIssues: migrated (0.0156s) > ================================ > > == RenameCommentToComments: migrating > ======================================== > == RenameCommentToComments: migrated (0.4063s) > =============================== > > == CreateIssueRelations: migrating > =========================================== > -- create_table(:issue_relations) > -> 0.0156s > == CreateIssueRelations: migrated (0.0156s) > ================================== > > == AddRelationsPermissions: migrating > ======================================== > == AddRelationsPermissions: migrated (0.1250s) > =============================== > > == SetLanguageLengthToFive: migrating > ======================================== > -- change_column(:users, :language, :string, > {:limit=>5, :default=>""}) > rake aborted! > An error has occurred, this and all later migrations canceled: > > Invalid attempt to call Read when reader is closed. > System.Data:0:in `ReadInternal' > System.Data:0:in `Read' > statement.rb:48:in `fetch' > statement.rb:207:in `fetch' > statement.rb:236:in `each' > IronRuby.Libraries:0:in `Each' > :0:in `inject' > sqlserver_adapter.rb:878:in `handle_as_array' > > > sqlserver_adapter.rb:862:in `raw_select' > > sqlserver_adapter.rb:814:in `select' > database_statements.rb:6:in `select_all' > query_cache.rb:58:in `select_all_with_query_cache' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn > ection_adapters/sqlserver_adapter.rb:911:in > `remove_default_constraint' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn > ection_adapters/sqlserver_adapter.rb:655:in `change_column' > :0:in `__send__' > migration.rb:348:in `method_missing' > migration.rb:328:in `say_with_time' > benchmark.rb:291:in `measure' > migration.rb:325:in `say_with_time' > migration.rb:345:in `method_missing' > ./db/migrate/044_set_language_length_to_five.rb:3:in `up' > :0:in `send' > migration.rb:282:in `migrate' > benchmark.rb:291:in `measure' > migration.rb:273:in `migrate' > :0:in `send' > C:1:in `migrate' > migration.rb:485:in `migrate' > :0:in `call' > migration.rb:560:in `ddl_transaction' > database_statements.rb:113:in `transaction' > transactions.rb:180:in `transaction' > migration.rb:558:in `ddl_transaction' > migration.rb:472:in `migrate' > :0:in `each' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > activerecord-2.3.5/lib/active_record/migration.rb:472:in `m > igrate' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > activerecord-2.3.5/lib/active_record/migration.rb:400:in `u > p' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > activerecord-2.3.5/lib/active_record/migration.rb:383:in `m > igrate' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > rails-2.3.5/lib/tasks/databases.rake:116 > :0:in `[]' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > rake-0.8.7/lib/rake.rb:636:in `execute' > :0:in `each' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > rake-0.8.7/lib/rake.rb:631:in `execute' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' > > > C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in > `mon_synchronize' > > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > rake-0.8.7/lib/rake.rb:583:in `invoke' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > rake-0.8.7/lib/rake.rb:2051:in `invoke_task' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > rake-0.8.7/lib/rake.rb:2029:in `top_level' > :0:in `each' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > rake-0.8.7/lib/rake.rb:2029:in `top_level' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling > ' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > rake-0.8.7/lib/rake.rb:2023:in `top_level' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > rake-0.8.7/lib/rake.rb:2001:in `run' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling > ' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > rake-0.8.7/lib/rake.rb:1998:in `run' > C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/ > rake-0.8.7/bin/rake:31 > :0:in `load' > C:/Program Files/IronRuby 0.9.4.0/bin/irake:19 > > > > On Fri, Feb 19, 2010 at 4:36 PM, Shri Borde > wrote: > > We can lock back to 2.3 which is the version that we check against. > Is the connection problem related to IronRuby or specific to your > setup? > > > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Scott Holden > Sent: Friday, February 19, 2010 2:29 PM > > > To: ironruby-core at rubyforge.org > > Subject: Re: [Ironruby-core] Getting up and running with > ActiveRecord + Sqlserver > > > > Locking down 2.3.1 fixed the old error, now I'm just having a > connection problem. BTW, there's no remote gem for 2.3.1, so people > will need to pull it from github and build it themselves for now. > Here's my database.yml: > > development: > mode: ADONET > adapter: sqlserver > host: webdevelopment1 > database: redmine_development > integrated_security: true > > On Fri, Feb 19, 2010 at 2:25 PM, Shri Borde > wrote: > > Scott, I see you are using 2.3.4 of the activerecord-sqlserver- > adapter gem. Can you lock down on 2.3.1 of the gem instead using > something like the following in your Ruby code before you do ?requir > e ?ironruby-sqlserver??: > > > > gem ?activerecord-sqlserver-adapter?, ?= 2.3.1? > > > > They dropped support for DBI within the last week. The links below > have info about the change. > > http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/4cf40c1330aef3a?hl=en > > http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/647522f857e3c31c?hl=en > > > > If locking down on 2.3.1 works for you, we can just add that to > ironruby-sqlserver. > > > > > > From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core- > bounces at rubyforge.org] On Behalf Of Scott Holden > Sent: Friday, February 19, 2010 11:25 AM > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Getting up and running with ActiveRecord + > Sqlserver > > > > I'm trying to follow the example given at http://ironruby.net/Documentation/Real_Ruby_Applications/ > > _______________________________________________ > 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 whiterabbitconsulting.eu Fri Feb 19 23:23:28 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Fri, 19 Feb 2010 21:23:28 -0700 Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver In-Reply-To: <948E9CA7-4728-418F-9C23-96E139A11212@gmail.com> References: <4b34c4521002191124qb7ff6d3j3d8550b92b78ecc2@mail.gmail.com> <4b34c4521002191429s7af89288ha4753b13ed9a17c6@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040AC3@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191453m233bd341h29210a3407c11b2b@mail.gmail.com> <4b34c4521002191454i128d24bcu556eed05121262fa@mail.gmail.com> <4b34c4521002191456x44b3685ep6f95937ccb71d813@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040B5C@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191659g2bc8a1f0h80caf5d79e0482b4@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040D87@TK5EX14MBXC134.redmond.corp.microsoft.com> <948E9CA7-4728-418F-9C23-96E139A11212@gmail.com> Message-ID: there isn't but you can use visual studio to debug ironruby stuff. IIRC System::Diagnostics::Debugger.break would set a breakpoint. http://github.com/casualjim/ironrubymvc/blob/master/IronRubyMvc/Controllers/controller.rb#L1 I don't know if you can actually debug this. What you can do as a workaround is to create a new column with nvarchar(255) and copy the data into that column, next you can drop the int column (I think that's what a migration should do anyway in the case of sql server, I'm not sure if postgres or mysql will let you change types of a column either). I'm not currently on my windows dev machine so I can't properly test, I can say that getting rubymine to run on IronRuby was one of the things I was going to look at after mid march, the other rails app I'm going to look at running on ironruby is spreecommerce. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Web: http://whiterabbitconsulting.eu Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Feb 19, 2010 at 9:13 PM, Scott Holden wrote: > Is there an implementation of ruby-debug-IDE for ir? > > Sent from my iPhone > > On Feb 19, 2010, at 7:08 PM, Shri Borde wrote: > > Sorry, no idea about this one. > > > > I just know the failures from the unit tests. You can see the currently > failing tests with a brief description of the failure in the disable_tests > function in > > http://github.com/ironruby/ironruby/blob/master/Merlin/Main/Languages/Ruby/Tests/Scripts/utr/active_record_tests.rb. > I don?t see anything about mismatched types there. > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Scott Holden > *Sent:* Friday, February 19, 2010 4:59 PM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Getting up and running with ActiveRecord + > Sqlserver > > > > Shri, thanks a ton for your help. That fixed the reader is closed issue, > but I ran into another migration problem. In > ChangeChangesetsRevisionToString, the migration tries > > change_column :changesets, :revision, :string, :null => false > > Sqlserver is not too happy about changing int to varchar(255). I'll > probably try to look at it some more in the morning, but if you've already > seen this, please let me know. > > -Scott > > On Fri, Feb 19, 2010 at 5:13 PM, Shri Borde < > Shri.Borde at microsoft.com> wrote: > > So you are running into ?Invalid attempt to call Read when reader is > closed?. I fixed that error in ironruby-dbi. Could you grab > > http://github.com/ironruby/ironruby/blob/master/Merlin/External.LCA_RESTRICTED/Languages/Ruby/ruby-1.8.6p368/lib/ruby/gems/1.8/gems/ironruby-dbi-0.1.0/lib/dbd/mssql/statement.rband copy it over your ironruby-dbi gem? > > > > If you are curious, the fix involves the following lines which deal with > the case of the reader being closed. > > > > def fetch > > if @reader and @reader.is_closed > > if @pending_fetches > > return @pending_fetches.shift > > else > > return nil > > end > > end > > > > > > *From:* > ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Scott Holden > *Sent:* Friday, February 19, 2010 2:56 PM > > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Getting up and running with ActiveRecord + > Sqlserver > > > > Make that 0.9.2. Apparently the 0.9 versioning is getting mixed up in my > head :P > > On Fri, Feb 19, 2010 at 4:54 PM, Scott Holden < > sholde4 at gmail.com> wrote: > > By the way, I'm working with Redmine 0.9.4 stable > > > > On Fri, Feb 19, 2010 at 4:53 PM, Scott Holden < > sholde4 at gmail.com> wrote: > > Hah! I'm a moron. Got started looking too deep for my problems, missed my > own stupid mistake... web^H^H^Hsqldevelopment1. Thanks a ton for being so > helpful. > > I'm trying migrations from Redmine, but blowing up on > 044_set_language_length_to_five. > > Line 3 seems to be the issue: > > change_column :users, :language, :string, :limit => 5, :default => "" > > Here's my trace: > > > > C:\Documents and Settings\sholden\My > Documents\NetBeansProjects\redmine>irake db:migrate --trace > (in C:/Documents and Settings/sholden/My > Documents/NetBeansProjects/redmine) > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > > ** Execute db:migrate > == Setup: migrating > ========================================================== > -- create_table("attachments", {:force=>true}) > -> 0.1406s > -- create_table("auth_sources", {:force=>true}) > -> 0.0313s > -- create_table("custom_fields", {:force=>true}) > -> 0.0156s > -- create_table("custom_fields_projects", {:id=>false, :force=>true}) > -> 0.0156s > -- create_table("custom_fields_trackers", {:id=>false, :force=>true}) > -> 0.0469s > -- create_table("custom_values", {:force=>true}) > -> 0.0313s > -- create_table("documents", {:force=>true}) > -> 0.0313s > -- add_index("documents", ["project_id"], {:name=>"documents_project_id"}) > -> 0.0000s > -- create_table("enumerations", {:force=>true}) > -> 0.0625s > -- create_table("issue_categories", {:force=>true}) > -> 0.0313s > -- add_index("issue_categories", ["project_id"], > {:name=>"issue_categories_project_id"}) > -> 0.0313s > -- create_table("issue_histories", {:force=>true}) > -> 0.0781s > -- add_index("issue_histories", ["issue_id"], > {:name=>"issue_histories_issue_id"}) > -> 0.0000s > -- create_table("issue_statuses", {:force=>true}) > -> 0.0781s > -- create_table("issues", {:force=>true}) > -> 0.0469s > -- add_index("issues", ["project_id"], {:name=>"issues_project_id"}) > -> 0.0000s > -- create_table("members", {:force=>true}) > -> 0.0156s > -- create_table("news", {:force=>true}) > -> 0.0625s > -- add_index("news", ["project_id"], {:name=>"news_project_id"}) > -> 0.0000s > -- create_table("permissions", {:force=>true}) > -> 0.0313s > -- create_table("permissions_roles", {:id=>false, :force=>true}) > -> 0.0156s > -- add_index("permissions_roles", ["role_id"], > {:name=>"permissions_roles_role_id"}) > -> 0.0156s > -- create_table("projects", {:force=>true}) > -> 0.0313s > -- create_table("roles", {:force=>true}) > -> 0.0156s > -- create_table("tokens", {:force=>true}) > -> 0.0313s > -- create_table("trackers", {:force=>true}) > -> 0.0313s > -- create_table("users", {:force=>true}) > -> 0.0313s > -- create_table("versions", {:force=>true}) > -> 0.0313s > -- add_index("versions", ["project_id"], {:name=>"versions_project_id"}) > -> 0.0000s > -- create_table("workflows", {:force=>true}) > -> 0.0313s > == Setup: migrated (2.4844s) > ================================================= > > == IssueMove: migrating > ====================================================== > == IssueMove: migrated (0.1094s) > ============================================= > > == IssueAddNote: migrating > =================================================== > == IssueAddNote: migrated (0.1406s) > ========================================== > > == ExportPdf: migrating > ====================================================== > == ExportPdf: migrated (0.1250s) > ============================================= > > == IssueStartDate: migrating > ================================================= > -- add_column(:issues, :start_date, :date) > -> 0.0000s > -- add_column(:issues, :done_ratio, :integer, {:default=>0, :null=>false}) > -> 0.0313s > == IssueStartDate: migrated (0.0469s) > ======================================== > > == CalendarAndActivity: migrating > ============================================ > == CalendarAndActivity: migrated (0.1250s) > =================================== > > == CreateJournals: migrating > ================================================= > -- create_table(:journals, {:force=>true}) > -> 0.0469s > -- create_table(:journal_details, {:force=>true}) > -> 0.0313s > -- add_index("journals", ["journalized_id", "journalized_type"], > {:name=>"journals_journalized_id"}) > -> 0.0156s > -- add_index("journal_details", ["journal_id"], > {:name=>"journal_details_journal_id"}) > -> 0.0156s > -- drop_table(:issue_histories) > -> 0.0156s > == CreateJournals: migrated (0.3750s) > ======================================== > > == CreateUserPreferences: migrating > ========================================== > -- create_table(:user_preferences) > -> 0.0156s > == CreateUserPreferences: migrated (0.0156s) > ================================= > > == AddHideMailPref: migrating > ================================================ > -- add_column(:user_preferences, :hide_mail, :boolean, {:default=>false}) > -> 0.0156s > == AddHideMailPref: migrated (0.0156s) > ======================================= > > == CreateComments: migrating > ================================================= > -- create_table(:comments) > -> 0.0156s > == CreateComments: migrated (0.0156s) > ======================================== > > == AddNewsCommentsCount: migrating > =========================================== > -- add_column(:news, :comments_count, :integer, {:default=>0, > :null=>false}) > -> 0.0156s > == AddNewsCommentsCount: migrated (0.0156s) > ================================== > > == AddCommentsPermissions: migrating > ========================================= > == AddCommentsPermissions: migrated (0.1094s) > ================================ > > == CreateQueries: migrating > ================================================== > -- create_table(:queries, {:force=>true}) > -> 0.0313s > == CreateQueries: migrated (0.0313s) > ========================================= > > == AddQueriesPermissions: migrating > ========================================== > == AddQueriesPermissions: migrated (0.0938s) > ================================= > > == CreateRepositories: migrating > ============================================= > -- create_table(:repositories, {:force=>true}) > -> 0.0313s > == CreateRepositories: migrated (0.0313s) > ==================================== > > == AddRepositoriesPermissions: migrating > ===================================== > == AddRepositoriesPermissions: migrated (0.1563s) > ============================ > > == CreateSettings: migrating > ================================================= > -- create_table(:settings, {:force=>true}) > -> 0.0156s > == CreateSettings: migrated (0.0313s) > ======================================== > > == SetDocAndFilesNotifications: migrating > ==================================== > == SetDocAndFilesNotifications: migrated (0.2031s) > =========================== > > == AddIssueStatusPosition: migrating > ========================================= > -- add_column(:issue_statuses, :position, :integer, {:default=>1}) > -> 0.0156s > == AddIssueStatusPosition: migrated (0.0781s) > ================================ > > == AddRolePosition: migrating > ================================================ > -- add_column(:roles, :position, :integer, {:default=>1}) > -> 0.0156s > == AddRolePosition: migrated (0.1719s) > ======================================= > > == AddTrackerPosition: migrating > ============================================= > -- add_column(:trackers, :position, :integer, {:default=>1}) > -> 0.0156s > == AddTrackerPosition: migrated (0.0625s) > ==================================== > > == SerializePossiblesValues: migrating > ======================================= > == SerializePossiblesValues: migrated (0.0469s) > ============================== > > == AddTrackerIsInRoadmap: migrating > ========================================== > -- add_column(:trackers, :is_in_roadmap, :boolean, {:default=>true, > :null=>false}) > -> 0.0000s > == AddTrackerIsInRoadmap: migrated (0.0000s) > ================================= > > == AddRoadmapPermission: migrating > =========================================== > == AddRoadmapPermission: migrated (0.1250s) > ================================== > > == AddSearchPermission: migrating > ============================================ > == AddSearchPermission: migrated (0.0938s) > =================================== > > == AddRepositoryLoginAndPassword: migrating > ================================== > -- add_column(:repositories, :login, :string, {:limit=>60, :default=>""}) > -> 0.0000s > -- add_column(:repositories, :password, :string, {:limit=>60, > :default=>""}) > -> 0.0313s > == AddRepositoryLoginAndPassword: migrated (0.0313s) > ========================= > > == CreateWikis: migrating > ==================================================== > -- create_table(:wikis) > -> 0.0000s > -- add_index(:wikis, :project_id, {:name=>:wikis_project_id}) > -> 0.0000s > == CreateWikis: migrated (0.0313s) > =========================================== > > == CreateWikiPages: migrating > ================================================ > -- create_table(:wiki_pages) > -> 0.0156s > -- add_index(:wiki_pages, [:wiki_id, :title], > {:name=>:wiki_pages_wiki_id_title}) > -> 0.0156s > == CreateWikiPages: migrated (0.0313s) > ======================================= > > == CreateWikiContents: migrating > ============================================= > -- create_table(:wiki_contents) > -> 0.0156s > -- add_index(:wiki_contents, :page_id, {:name=>:wiki_contents_page_id}) > -> 0.0000s > -- create_table(:wiki_content_versions) > -> 0.0313s > -- add_index(:wiki_content_versions, :wiki_content_id, > {:name=>:wiki_content_versions_wcid}) > -> 0.0000s > == CreateWikiContents: migrated (0.0469s) > ==================================== > > == AddProjectsFeedsPermissions: migrating > ==================================== > == AddProjectsFeedsPermissions: migrated (0.0938s) > =========================== > > == AddRepositoryRootUrl: migrating > =========================================== > -- add_column(:repositories, :root_url, :string, {:limit=>255, > :default=>""}) > -> 0.0000s > == AddRepositoryRootUrl: migrated (0.0156s) > ================================== > > == CreateTimeEntries: migrating > ============================================== > -- create_table(:time_entries) > -> 0.0156s > -- add_index(:time_entries, [:project_id], > {:name=>:time_entries_project_id}) > -> 0.0000s > -- add_index(:time_entries, [:issue_id], {:name=>:time_entries_issue_id}) > -> 0.0156s > == CreateTimeEntries: migrated (0.0313s) > ===================================== > > == AddTimelogPermissions: migrating > ========================================== > == AddTimelogPermissions: migrated (0.0938s) > ================================= > > == CreateChangesets: migrating > =============================================== > -- create_table(:changesets) > -> 0.0000s > -- add_index(:changesets, [:repository_id, :revision], {:unique=>true, > :name=>:changesets_repos_rev}) > -> 0.0156s > == CreateChangesets: migrated (0.0313s) > ====================================== > > == CreateChanges: migrating > ================================================== > -- create_table(:changes) > -> 0.0313s > -- add_index(:changes, [:changeset_id], {:name=>:changesets_changeset_id}) > -> 0.0000s > == CreateChanges: migrated (0.0313s) > ========================================= > > == AddChangesetCommitDate: migrating > ========================================= > -- add_column(:changesets, :commit_date, :date) > -> 0.0156s > == AddChangesetCommitDate: migrated (0.0313s) > ================================ > > == AddProjectIdentifier: migrating > =========================================== > -- add_column(:projects, :identifier, :string, {:limit=>20}) > -> 0.0000s > == AddProjectIdentifier: migrated (0.0000s) > ================================== > > == AddCustomFieldIsFilter: migrating > ========================================= > -- add_column(:custom_fields, :is_filter, :boolean, {:null=>false, > :default=>false}) > -> 0.0000s > == AddCustomFieldIsFilter: migrated (0.0000s) > ================================ > > == CreateWatchers: migrating > ================================================= > -- create_table(:watchers) > -> 0.0156s > == CreateWatchers: migrated (0.0156s) > ======================================== > > == CreateChangesetsIssues: migrating > ========================================= > -- create_table(:changesets_issues, {:id=>false}) > -> 0.0156s > -- add_index(:changesets_issues, [:changeset_id, :issue_id], > {:unique=>true, :name=>:changesets_issues_ids}) > -> 0.0000s > == CreateChangesetsIssues: migrated (0.0156s) > ================================ > > == RenameCommentToComments: migrating > ======================================== > == RenameCommentToComments: migrated (0.4063s) > =============================== > > == CreateIssueRelations: migrating > =========================================== > -- create_table(:issue_relations) > -> 0.0156s > == CreateIssueRelations: migrated (0.0156s) > ================================== > > == AddRelationsPermissions: migrating > ======================================== > == AddRelationsPermissions: migrated (0.1250s) > =============================== > > == SetLanguageLengthToFive: migrating > ======================================== > -- change_column(:users, :language, :string, {:limit=>5, :default=>""}) > rake aborted! > An error has occurred, this and all later migrations canceled: > > Invalid attempt to call Read when reader is closed. > System.Data:0:in `ReadInternal' > System.Data:0:in `Read' > statement.rb:48:in `fetch' > statement.rb:207:in `fetch' > statement.rb:236:in `each' > IronRuby.Libraries:0:in `Each' > :0:in `inject' > sqlserver_adapter.rb:878:in `handle_as_array' > > > sqlserver_adapter.rb:862:in `raw_select' > > sqlserver_adapter.rb:814:in `select' > database_statements.rb:6:in `select_all' > query_cache.rb:58:in `select_all_with_query_cache' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn > ection_adapters/sqlserver_adapter.rb:911:in `remove_default_constraint' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn > ection_adapters/sqlserver_adapter.rb:655:in `change_column' > :0:in `__send__' > migration.rb:348:in `method_missing' > migration.rb:328:in `say_with_time' > benchmark.rb:291:in `measure' > migration.rb:325:in `say_with_time' > migration.rb:345:in `method_missing' > ./db/migrate/044_set_language_length_to_five.rb:3:in `up' > :0:in `send' > migration.rb:282:in `migrate' > benchmark.rb:291:in `measure' > migration.rb:273:in `migrate' > :0:in `send' > C:1:in `migrate' > migration.rb:485:in `migrate' > :0:in `call' > migration.rb:560:in `ddl_transaction' > database_statements.rb:113:in `transaction' > transactions.rb:180:in `transaction' > migration.rb:558:in `ddl_transaction' > migration.rb:472:in `migrate' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:472:in`m > igrate' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:400:in`u > p' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:383:in`m > igrate' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:116 > :0:in `[]' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in`invoke_with_call_chain' > > > C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in`mon_synchronize' > > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in`invoke_with_call_chain' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in`invoke_task' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in`top_level' > :0:in `each' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in`top_level' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in`standard_exception_handling > ' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in`top_level' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in`standard_exception_handling > ' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' > C:/Program Files/IronRuby > 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 > :0:in `load' > C:/Program Files/IronRuby 0.9.4.0/bin/irake:19 > > > > On Fri, Feb 19, 2010 at 4:36 PM, Shri Borde < > Shri.Borde at microsoft.com> wrote: > > We can lock back to 2.3 which is the version that we check against. Is the > connection problem related to IronRuby or specific to your setup? > > > > *From:* > ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Scott Holden > *Sent:* Friday, February 19, 2010 2:29 PM > > > *To:* ironruby-core at rubyforge.org > > *Subject:* Re: [Ironruby-core] Getting up and running with ActiveRecord + > Sqlserver > > > > Locking down 2.3.1 fixed the old error, now I'm just having a connection > problem. BTW, there's no remote gem for 2.3.1, so people will need to pull > it from github and build it themselves for now. Here's my database.yml: > > development: > mode: ADONET > adapter: sqlserver > host: webdevelopment1 > database: redmine_development > integrated_security: true > > On Fri, Feb 19, 2010 at 2:25 PM, Shri Borde < > Shri.Borde at microsoft.com> wrote: > > Scott, I see you are using 2.3.4 of the activerecord-sqlserver-adapter gem. > Can you lock down on 2.3.1 of the gem instead using something like the > following in your Ruby code before you do ?require ?ironruby-sqlserver??: > > > > gem ?activerecord-sqlserver-adapter?, ?= 2.3.1? > > > > They dropped support for DBI within the last week. The links below have > info about the change. > > > > http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/4cf40c1330aef3a?hl=en > > > > http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/647522f857e3c31c?hl=en > > > > If locking down on 2.3.1 works for you, we can just add that to > ironruby-sqlserver. > > > > > > *From:* > ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Scott Holden > *Sent:* Friday, February 19, 2010 11:25 AM > *To:* ironruby-core at rubyforge.org > *Subject:* [Ironruby-core] Getting up and running with ActiveRecord + > Sqlserver > > > > I'm trying to follow the example given at > > http://ironruby.net/Documentation/Real_Ruby_Applications/ > > _______________________________________________ > > 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 Shri.Borde at microsoft.com Sat Feb 20 01:33:42 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Sat, 20 Feb 2010 06:33:42 +0000 Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver In-Reply-To: References: <4b34c4521002191124qb7ff6d3j3d8550b92b78ecc2@mail.gmail.com> <4b34c4521002191429s7af89288ha4753b13ed9a17c6@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040AC3@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191453m233bd341h29210a3407c11b2b@mail.gmail.com> <4b34c4521002191454i128d24bcu556eed05121262fa@mail.gmail.com> <4b34c4521002191456x44b3685ep6f95937ccb71d813@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040B5C@TK5EX14MBXC134.redmond.corp.microsoft.com> <4b34c4521002191659g2bc8a1f0h80caf5d79e0482b4@mail.gmail.com> <6459203F8B1AF641995AE49D47FA51A7040D87@TK5EX14MBXC134.redmond.corp.microsoft.com> <948E9CA7-4728-418F-9C23-96E139A11212@gmail.com> Message-ID: <6459203F8B1AF641995AE49D47FA51A7041404@TK5EX14MBXC134.redmond.corp.microsoft.com> I use the ?repl binding? technique mentioned at http://wiki.github.com/ironruby/ironruby/debugging a lot. set_trace_func is also very useful at times. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ivan Porto Carrero Sent: Friday, February 19, 2010 8:23 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver there isn't but you can use visual studio to debug ironruby stuff. IIRC System::Diagnostics::Debugger.break would set a breakpoint. http://github.com/casualjim/ironrubymvc/blob/master/IronRubyMvc/Controllers/controller.rb#L1 I don't know if you can actually debug this. What you can do as a workaround is to create a new column with nvarchar(255) and copy the data into that column, next you can drop the int column (I think that's what a migration should do anyway in the case of sql server, I'm not sure if postgres or mysql will let you change types of a column either). I'm not currently on my windows dev machine so I can't properly test, I can say that getting rubymine to run on IronRuby was one of the things I was going to look at after mid march, the other rails app I'm going to look at running on ironruby is spreecommerce. --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Web: http://whiterabbitconsulting.eu Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Fri, Feb 19, 2010 at 9:13 PM, Scott Holden > wrote: Is there an implementation of ruby-debug-IDE for ir? Sent from my iPhone On Feb 19, 2010, at 7:08 PM, Shri Borde > wrote: Sorry, no idea about this one. I just know the failures from the unit tests. You can see the currently failing tests with a brief description of the failure in the disable_tests function in http://github.com/ironruby/ironruby/blob/master/Merlin/Main/Languages/Ruby/Tests/Scripts/utr/active_record_tests.rb. I don?t see anything about mismatched types there. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Scott Holden Sent: Friday, February 19, 2010 4:59 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver Shri, thanks a ton for your help. That fixed the reader is closed issue, but I ran into another migration problem. In ChangeChangesetsRevisionToString, the migration tries change_column :changesets, :revision, :string, :null => false Sqlserver is not too happy about changing int to varchar(255). I'll probably try to look at it some more in the morning, but if you've already seen this, please let me know. -Scott On Fri, Feb 19, 2010 at 5:13 PM, Shri Borde > wrote: So you are running into ?Invalid attempt to call Read when reader is closed?. I fixed that error in ironruby-dbi. Could you grab http://github.com/ironruby/ironruby/blob/master/Merlin/External.LCA_RESTRICTED/Languages/Ruby/ruby-1.8.6p368/lib/ruby/gems/1.8/gems/ironruby-dbi-0.1.0/lib/dbd/mssql/statement.rb and copy it over your ironruby-dbi gem? If you are curious, the fix involves the following lines which deal with the case of the reader being closed. def fetch if @reader and @reader.is_closed if @pending_fetches return @pending_fetches.shift else return nil end end From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Scott Holden Sent: Friday, February 19, 2010 2:56 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver Make that 0.9.2. Apparently the 0.9 versioning is getting mixed up in my head :P On Fri, Feb 19, 2010 at 4:54 PM, Scott Holden > wrote: By the way, I'm working with Redmine 0.9.4 stable On Fri, Feb 19, 2010 at 4:53 PM, Scott Holden > wrote: Hah! I'm a moron. Got started looking too deep for my problems, missed my own stupid mistake... web^H^H^Hsqldevelopment1. Thanks a ton for being so helpful. I'm trying migrations from Redmine, but blowing up on 044_set_language_length_to_five. Line 3 seems to be the issue: change_column :users, :language, :string, :limit => 5, :default => "" Here's my trace: C:\Documents and Settings\sholden\My Documents\NetBeansProjects\redmine>irake db:migrate --trace (in C:/Documents and Settings/sholden/My Documents/NetBeansProjects/redmine) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == Setup: migrating ========================================================== -- create_table("attachments", {:force=>true}) -> 0.1406s -- create_table("auth_sources", {:force=>true}) -> 0.0313s -- create_table("custom_fields", {:force=>true}) -> 0.0156s -- create_table("custom_fields_projects", {:id=>false, :force=>true}) -> 0.0156s -- create_table("custom_fields_trackers", {:id=>false, :force=>true}) -> 0.0469s -- create_table("custom_values", {:force=>true}) -> 0.0313s -- create_table("documents", {:force=>true}) -> 0.0313s -- add_index("documents", ["project_id"], {:name=>"documents_project_id"}) -> 0.0000s -- create_table("enumerations", {:force=>true}) -> 0.0625s -- create_table("issue_categories", {:force=>true}) -> 0.0313s -- add_index("issue_categories", ["project_id"], {:name=>"issue_categories_project_id"}) -> 0.0313s -- create_table("issue_histories", {:force=>true}) -> 0.0781s -- add_index("issue_histories", ["issue_id"], {:name=>"issue_histories_issue_id"}) -> 0.0000s -- create_table("issue_statuses", {:force=>true}) -> 0.0781s -- create_table("issues", {:force=>true}) -> 0.0469s -- add_index("issues", ["project_id"], {:name=>"issues_project_id"}) -> 0.0000s -- create_table("members", {:force=>true}) -> 0.0156s -- create_table("news", {:force=>true}) -> 0.0625s -- add_index("news", ["project_id"], {:name=>"news_project_id"}) -> 0.0000s -- create_table("permissions", {:force=>true}) -> 0.0313s -- create_table("permissions_roles", {:id=>false, :force=>true}) -> 0.0156s -- add_index("permissions_roles", ["role_id"], {:name=>"permissions_roles_role_id"}) -> 0.0156s -- create_table("projects", {:force=>true}) -> 0.0313s -- create_table("roles", {:force=>true}) -> 0.0156s -- create_table("tokens", {:force=>true}) -> 0.0313s -- create_table("trackers", {:force=>true}) -> 0.0313s -- create_table("users", {:force=>true}) -> 0.0313s -- create_table("versions", {:force=>true}) -> 0.0313s -- add_index("versions", ["project_id"], {:name=>"versions_project_id"}) -> 0.0000s -- create_table("workflows", {:force=>true}) -> 0.0313s == Setup: migrated (2.4844s) ================================================= == IssueMove: migrating ====================================================== == IssueMove: migrated (0.1094s) ============================================= == IssueAddNote: migrating =================================================== == IssueAddNote: migrated (0.1406s) ========================================== == ExportPdf: migrating ====================================================== == ExportPdf: migrated (0.1250s) ============================================= == IssueStartDate: migrating ================================================= -- add_column(:issues, :start_date, :date) -> 0.0000s -- add_column(:issues, :done_ratio, :integer, {:default=>0, :null=>false}) -> 0.0313s == IssueStartDate: migrated (0.0469s) ======================================== == CalendarAndActivity: migrating ============================================ == CalendarAndActivity: migrated (0.1250s) =================================== == CreateJournals: migrating ================================================= -- create_table(:journals, {:force=>true}) -> 0.0469s -- create_table(:journal_details, {:force=>true}) -> 0.0313s -- add_index("journals", ["journalized_id", "journalized_type"], {:name=>"journals_journalized_id"}) -> 0.0156s -- add_index("journal_details", ["journal_id"], {:name=>"journal_details_journal_id"}) -> 0.0156s -- drop_table(:issue_histories) -> 0.0156s == CreateJournals: migrated (0.3750s) ======================================== == CreateUserPreferences: migrating ========================================== -- create_table(:user_preferences) -> 0.0156s == CreateUserPreferences: migrated (0.0156s) ================================= == AddHideMailPref: migrating ================================================ -- add_column(:user_preferences, :hide_mail, :boolean, {:default=>false}) -> 0.0156s == AddHideMailPref: migrated (0.0156s) ======================================= == CreateComments: migrating ================================================= -- create_table(:comments) -> 0.0156s == CreateComments: migrated (0.0156s) ======================================== == AddNewsCommentsCount: migrating =========================================== -- add_column(:news, :comments_count, :integer, {:default=>0, :null=>false}) -> 0.0156s == AddNewsCommentsCount: migrated (0.0156s) ================================== == AddCommentsPermissions: migrating ========================================= == AddCommentsPermissions: migrated (0.1094s) ================================ == CreateQueries: migrating ================================================== -- create_table(:queries, {:force=>true}) -> 0.0313s == CreateQueries: migrated (0.0313s) ========================================= == AddQueriesPermissions: migrating ========================================== == AddQueriesPermissions: migrated (0.0938s) ================================= == CreateRepositories: migrating ============================================= -- create_table(:repositories, {:force=>true}) -> 0.0313s == CreateRepositories: migrated (0.0313s) ==================================== == AddRepositoriesPermissions: migrating ===================================== == AddRepositoriesPermissions: migrated (0.1563s) ============================ == CreateSettings: migrating ================================================= -- create_table(:settings, {:force=>true}) -> 0.0156s == CreateSettings: migrated (0.0313s) ======================================== == SetDocAndFilesNotifications: migrating ==================================== == SetDocAndFilesNotifications: migrated (0.2031s) =========================== == AddIssueStatusPosition: migrating ========================================= -- add_column(:issue_statuses, :position, :integer, {:default=>1}) -> 0.0156s == AddIssueStatusPosition: migrated (0.0781s) ================================ == AddRolePosition: migrating ================================================ -- add_column(:roles, :position, :integer, {:default=>1}) -> 0.0156s == AddRolePosition: migrated (0.1719s) ======================================= == AddTrackerPosition: migrating ============================================= -- add_column(:trackers, :position, :integer, {:default=>1}) -> 0.0156s == AddTrackerPosition: migrated (0.0625s) ==================================== == SerializePossiblesValues: migrating ======================================= == SerializePossiblesValues: migrated (0.0469s) ============================== == AddTrackerIsInRoadmap: migrating ========================================== -- add_column(:trackers, :is_in_roadmap, :boolean, {:default=>true, :null=>false}) -> 0.0000s == AddTrackerIsInRoadmap: migrated (0.0000s) ================================= == AddRoadmapPermission: migrating =========================================== == AddRoadmapPermission: migrated (0.1250s) ================================== == AddSearchPermission: migrating ============================================ == AddSearchPermission: migrated (0.0938s) =================================== == AddRepositoryLoginAndPassword: migrating ================================== -- add_column(:repositories, :login, :string, {:limit=>60, :default=>""}) -> 0.0000s -- add_column(:repositories, :password, :string, {:limit=>60, :default=>""}) -> 0.0313s == AddRepositoryLoginAndPassword: migrated (0.0313s) ========================= == CreateWikis: migrating ==================================================== -- create_table(:wikis) -> 0.0000s -- add_index(:wikis, :project_id, {:name=>:wikis_project_id}) -> 0.0000s == CreateWikis: migrated (0.0313s) =========================================== == CreateWikiPages: migrating ================================================ -- create_table(:wiki_pages) -> 0.0156s -- add_index(:wiki_pages, [:wiki_id, :title], {:name=>:wiki_pages_wiki_id_title}) -> 0.0156s == CreateWikiPages: migrated (0.0313s) ======================================= == CreateWikiContents: migrating ============================================= -- create_table(:wiki_contents) -> 0.0156s -- add_index(:wiki_contents, :page_id, {:name=>:wiki_contents_page_id}) -> 0.0000s -- create_table(:wiki_content_versions) -> 0.0313s -- add_index(:wiki_content_versions, :wiki_content_id, {:name=>:wiki_content_versions_wcid}) -> 0.0000s == CreateWikiContents: migrated (0.0469s) ==================================== == AddProjectsFeedsPermissions: migrating ==================================== == AddProjectsFeedsPermissions: migrated (0.0938s) =========================== == AddRepositoryRootUrl: migrating =========================================== -- add_column(:repositories, :root_url, :string, {:limit=>255, :default=>""}) -> 0.0000s == AddRepositoryRootUrl: migrated (0.0156s) ================================== == CreateTimeEntries: migrating ============================================== -- create_table(:time_entries) -> 0.0156s -- add_index(:time_entries, [:project_id], {:name=>:time_entries_project_id}) -> 0.0000s -- add_index(:time_entries, [:issue_id], {:name=>:time_entries_issue_id}) -> 0.0156s == CreateTimeEntries: migrated (0.0313s) ===================================== == AddTimelogPermissions: migrating ========================================== == AddTimelogPermissions: migrated (0.0938s) ================================= == CreateChangesets: migrating =============================================== -- create_table(:changesets) -> 0.0000s -- add_index(:changesets, [:repository_id, :revision], {:unique=>true, :name=>:changesets_repos_rev}) -> 0.0156s == CreateChangesets: migrated (0.0313s) ====================================== == CreateChanges: migrating ================================================== -- create_table(:changes) -> 0.0313s -- add_index(:changes, [:changeset_id], {:name=>:changesets_changeset_id}) -> 0.0000s == CreateChanges: migrated (0.0313s) ========================================= == AddChangesetCommitDate: migrating ========================================= -- add_column(:changesets, :commit_date, :date) -> 0.0156s == AddChangesetCommitDate: migrated (0.0313s) ================================ == AddProjectIdentifier: migrating =========================================== -- add_column(:projects, :identifier, :string, {:limit=>20}) -> 0.0000s == AddProjectIdentifier: migrated (0.0000s) ================================== == AddCustomFieldIsFilter: migrating ========================================= -- add_column(:custom_fields, :is_filter, :boolean, {:null=>false, :default=>false}) -> 0.0000s == AddCustomFieldIsFilter: migrated (0.0000s) ================================ == CreateWatchers: migrating ================================================= -- create_table(:watchers) -> 0.0156s == CreateWatchers: migrated (0.0156s) ======================================== == CreateChangesetsIssues: migrating ========================================= -- create_table(:changesets_issues, {:id=>false}) -> 0.0156s -- add_index(:changesets_issues, [:changeset_id, :issue_id], {:unique=>true, :name=>:changesets_issues_ids}) -> 0.0000s == CreateChangesetsIssues: migrated (0.0156s) ================================ == RenameCommentToComments: migrating ======================================== == RenameCommentToComments: migrated (0.4063s) =============================== == CreateIssueRelations: migrating =========================================== -- create_table(:issue_relations) -> 0.0156s == CreateIssueRelations: migrated (0.0156s) ================================== == AddRelationsPermissions: migrating ======================================== == AddRelationsPermissions: migrated (0.1250s) =============================== == SetLanguageLengthToFive: migrating ======================================== -- change_column(:users, :language, :string, {:limit=>5, :default=>""}) rake aborted! An error has occurred, this and all later migrations canceled: Invalid attempt to call Read when reader is closed. System.Data:0:in `ReadInternal' System.Data:0:in `Read' statement.rb:48:in `fetch' statement.rb:207:in `fetch' statement.rb:236:in `each' IronRuby.Libraries:0:in `Each' :0:in `inject' sqlserver_adapter.rb:878:in `handle_as_array' sqlserver_adapter.rb:862:in `raw_select' sqlserver_adapter.rb:814:in `select' database_statements.rb:6:in `select_all' query_cache.rb:58:in `select_all_with_query_cache' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn ection_adapters/sqlserver_adapter.rb:911:in `remove_default_constraint' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.1/lib/active_record/conn ection_adapters/sqlserver_adapter.rb:655:in `change_column' :0:in `__send__' migration.rb:348:in `method_missing' migration.rb:328:in `say_with_time' benchmark.rb:291:in `measure' migration.rb:325:in `say_with_time' migration.rb:345:in `method_missing' ./db/migrate/044_set_language_length_to_five.rb:3:in `up' :0:in `send' migration.rb:282:in `migrate' benchmark.rb:291:in `measure' migration.rb:273:in `migrate' :0:in `send' C:1:in `migrate' migration.rb:485:in `migrate' :0:in `call' migration.rb:560:in `ddl_transaction' database_statements.rb:113:in `transaction' transactions.rb:180:in `transaction' migration.rb:558:in `ddl_transaction' migration.rb:472:in `migrate' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:472:in `m igrate' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:400:in `u p' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/migration.rb:383:in `m igrate' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:116 :0:in `[]' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in `mon_synchronize' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' :0:in `each' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling ' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling ' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' C:/Program Files/IronRuby 0.9.4.0/lib/ironruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 :0:in `load' C:/Program Files/IronRuby 0.9.4.0/bin/irake:19 On Fri, Feb 19, 2010 at 4:36 PM, Shri Borde > wrote: We can lock back to 2.3 which is the version that we check against. Is the connection problem related to IronRuby or specific to your setup? From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Scott Holden Sent: Friday, February 19, 2010 2:29 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver Locking down 2.3.1 fixed the old error, now I'm just having a connection problem. BTW, there's no remote gem for 2.3.1, so people will need to pull it from github and build it themselves for now. Here's my database.yml: development: mode: ADONET adapter: sqlserver host: webdevelopment1 database: redmine_development integrated_security: true On Fri, Feb 19, 2010 at 2:25 PM, Shri Borde > wrote: Scott, I see you are using 2.3.4 of the activerecord-sqlserver-adapter gem. Can you lock down on 2.3.1 of the gem instead using something like the following in your Ruby code before you do ?require ?ironruby-sqlserver??: gem ?activerecord-sqlserver-adapter?, ?= 2.3.1? They dropped support for DBI within the last week. The links below have info about the change. http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/4cf40c1330aef3a?hl=en http://groups.google.com/group/rails-sqlserver-adapter/browse_thread/thread/647522f857e3c31c?hl=en If locking down on 2.3.1 works for you, we can just add that to ironruby-sqlserver. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Scott Holden Sent: Friday, February 19, 2010 11:25 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Getting up and running with ActiveRecord + Sqlserver I'm trying to follow the example given at http://ironruby.net/Documentation/Real_Ruby_Applications/ _______________________________________________ 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 johnnonolan at gmail.com Sat Feb 20 05:16:16 2010 From: johnnonolan at gmail.com (John Nolan) Date: Sat, 20 Feb 2010 10:16:16 +0000 Subject: [Ironruby-core] Getting started with IronRuby and c# issues. Message-ID: Hi IronRuby mailing list, Inspired by a talk by Ben Hall on testing c# with Ruby I thought I'd give it a go but I'm frustratingly stuck at the first hurdle. I've emailed Ben but as I've not had an immediate response I thought I'd open it to you good people. Any way. I thought I'd start off simple and follow Dom Green's blog. domgreen.com/2010/02/07/pumping-iron-ruby-net-testing/ He's set a class in c# with a simple property (here's mine) namespace IronRubyAndCSharp { public class Person { public string FirstName { get; set; } public Person(string name) { FirstName = name; } } } and tested it like so require "test/unit" require "../IronRuby/bin/debug/IronRubyAndCSharp.dll" class PersonTest < Test::Unit::TestCase include IronRubyAndCSharp def test_create_person_called_john john = Person.new("John") assert_not_nil(john) assert_equal("John",Person.FirstName) end end RubyMine(RM) has no problem with the require of the dll but it does have a problem recognising the namespace "IronRubyAndCSharp" and the Person class (squiggly lines ahoy). When I run the tests in RM I get NoMethodError: undefined method `FirstName' for IronRubyAndCSharp::Person:Class C:/Users/John/Documents/IronRuby/Tests/Person_test.rb:14:in `test_create_person_called_john' :0:in `send' :0:in `each' C:/Program Files (x86)/IronRuby 0.9.4.0/Lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `run_suite' :0:in `each' C:\Program Files (x86)\JetBrains\RubyMine 2.0.1\rb\testing\patch\testunit/test/unit/ui/testrunnermediator.rb:36:in `run_suite' testrunner.rb:213:in `start_mediator' C:\Program Files (x86)\JetBrains\RubyMine 2.0.1\rb\testing\patch\testunit/test/unit/ui/teamcity/testrunner.rb:191:in `start' testrunnerutilities.rb:28:in `run' C:/Program Files (x86)/IronRuby 0.9.4.0/Lib/ruby/1.8/test/unit/autorunner.rb:216:in `run' C:/Program Files (x86)/IronRuby 0.9.4.0/Lib/ruby/1.8/test/unit/autorunner.rb:12:in `run' Just in case RubyMine was at fault I dropped out to good old ir.exe C:\Users\John\Documents\IronRuby\Tests>ir Person_test.rb --name test_create_pers on_called_john Loaded suite Person_test Started E Finished in 0.041992 seconds. 1) Error: test_create_person_called_john(PersonTest): NoMethodError: undefined method `FirstName' for IronRubyAndCSharp::Person:Class Person_test.rb:14:in `test_create_person_called_john' :0:in `send' :0:in `each' :0:in `each' testrunner.rb:66:in `start_mediator' testrunnerutilities.rb:28:in `run' 1 tests, 1 assertions, 0 failures, 1 errors I've stuck my code up on github http://github.com/johnnonolan/IronRubyAndCSharp if you feel that was inclined. Any pointers, help or whatever much appreciated. PlzSendMeTehCodez John(no) -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.ryall at gmail.com Sat Feb 20 05:26:40 2010 From: mark.ryall at gmail.com (Mark Ryall) Date: Sat, 20 Feb 2010 21:26:40 +1100 Subject: [Ironruby-core] Getting started with IronRuby and c# issues. In-Reply-To: References: Message-ID: <43769a4a1002200226g1585c8c6vdec3521b9c809a51@mail.gmail.com> ironruby will have 'rubified' the Person class's FirstName method to first_name and I think you mean to assert against the john instance of Person (rather than the Person class). Otherwise it looks pretty close. Try: require "test/unit" require "../IronRuby/bin/debug/IronRubyAndCSharp.dll" class PersonTest < Test::Unit::TestCase include IronRubyAndCSharp def test_create_person_called_john john = Person.new("John") assert_not_nil(john) assert_equal("John",john.first_name) end end On Sat, Feb 20, 2010 at 9:16 PM, John Nolan wrote: > Hi IronRuby mailing list, > Inspired by a talk by Ben Hall on testing c# with Ruby I thought I'd give it > a go but > I'm frustratingly stuck at the first hurdle. I've emailed Ben but as I've > not had an immediate response I thought I'd open it to you good people. > Any way. I thought I'd start off simple and follow Dom Green's > blog. domgreen.com/2010/02/07/pumping-iron-ruby-net-testing/ > He's set a class in c# with a simple property (here's mine) > namespace IronRubyAndCSharp > { > public class Person > { > public string FirstName { get; set; } > public Person(string name) > { > FirstName = name; > } > } > } > and tested it like so > require "test/unit" > require "../IronRuby/bin/debug/IronRubyAndCSharp.dll" > class PersonTest < Test::Unit::TestCase > include IronRubyAndCSharp > def test_create_person_called_john > john = Person.new("John") > assert_not_nil(john) > assert_equal("John",Person.FirstName) > end > end > RubyMine(RM) has no problem with the require of the dll but it does have a > problem recognising the namespace "IronRubyAndCSharp" > and the Person class (squiggly lines ahoy). > When I run the tests in RM I get > NoMethodError: undefined method `FirstName' for > IronRubyAndCSharp::Person:Class > C:/Users/John/Documents/IronRuby/Tests/Person_test.rb:14:in > `test_create_person_called_john' > :0:in `send' > :0:in `each' > C:/Program Files > (x86)/IronRuby 0.9.4.0/Lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `run_suite' > :0:in `each' > C:\Program Files (x86)\JetBrains\RubyMine > 2.0.1\rb\testing\patch\testunit/test/unit/ui/testrunnermediator.rb:36:in > `run_suite' > testrunner.rb:213:in `start_mediator' > C:\Program Files (x86)\JetBrains\RubyMine > 2.0.1\rb\testing\patch\testunit/test/unit/ui/teamcity/testrunner.rb:191:in > `start' > testrunnerutilities.rb:28:in `run' > C:/Program Files > (x86)/IronRuby 0.9.4.0/Lib/ruby/1.8/test/unit/autorunner.rb:216:in `run' > C:/Program Files > (x86)/IronRuby 0.9.4.0/Lib/ruby/1.8/test/unit/autorunner.rb:12:in `run' > Just in case RubyMine was at fault I dropped out to good old ir.exe > C:\Users\John\Documents\IronRuby\Tests>ir Person_test.rb --name > test_create_pers > on_called_john > Loaded suite Person_test > Started > E > Finished in 0.041992 seconds. > 1) Error: > test_create_person_called_john(PersonTest): > NoMethodError: undefined method `FirstName' for > IronRubyAndCSharp::Person:Class > Person_test.rb:14:in `test_create_person_called_john' > :0:in `send' > :0:in `each' > :0:in `each' > testrunner.rb:66:in `start_mediator' > testrunnerutilities.rb:28:in `run' > 1 tests, 1 assertions, 0 failures, 1 errors > I've stuck my code up on > github http://github.com/johnnonolan/IronRubyAndCSharp if you feel that was > inclined. > Any pointers, help or whatever much appreciated. > PlzSendMeTehCodez > > John(no) > _______________________________________________ > 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 Mon Feb 22 18:46:23 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Mon, 22 Feb 2010 23:46:23 +0000 Subject: [Ironruby-core] Code Review: Buffer7 Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3DB7C760@TK5EX14MBXC122.redmond.corp.microsoft.com> tfpt review "/shelveset:Buffer7;REDMOND\tomat" Comment : Improves perf of IO#each_line. Fixes a few socket specs. Fixes: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3314 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3231 Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: Buffer7.diff Type: application/octet-stream Size: 58628 bytes Desc: Buffer7.diff URL: From johnnonolan at gmail.com Tue Feb 23 04:04:56 2010 From: johnnonolan at gmail.com (John Nolan) Date: Tue, 23 Feb 2010 09:04:56 +0000 Subject: [Ironruby-core] Getting started with IronRuby and c# issues Message-ID: Thanks Mark. The problem was definitely in the wetwear. I think the thing that threw me off was RubyMine was complaining about my namespace. Interestingly for me though both: assert_equal("John",john.FirstName) and assert_equal("John",john.first_name) work. John(no) On 22 February 2010 23:46, wrote: > Send Ironruby-core mailing list submissions to > ironruby-core at rubyforge.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://rubyforge.org/mailman/listinfo/ironruby-core > or, via email, send a message with subject or body 'help' to > ironruby-core-request at rubyforge.org > > You can reach the person managing the list at > ironruby-core-owner at rubyforge.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Ironruby-core digest..." > > > Today's Topics: > > 1. Getting started with IronRuby and c# issues. (John Nolan) > 2. Re: Getting started with IronRuby and c# issues. (Mark Ryall) > 3. Code Review: Buffer7 (Tomas Matousek) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 20 Feb 2010 10:16:16 +0000 > From: John Nolan > To: ironruby-core at rubyforge.org > Subject: [Ironruby-core] Getting started with IronRuby and c# issues. > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hi IronRuby mailing list, > > Inspired by a talk by Ben Hall on testing c# with Ruby I thought I'd give > it > a go but > I'm frustratingly stuck at the first hurdle. I've emailed Ben but as I've > not had an immediate response I thought I'd open it to you good people. > > Any way. I thought I'd start off simple and follow Dom Green's blog. > domgreen.com/2010/02/07/pumping-iron-ruby-net-testing/ > > He's set a class in c# with a simple property (here's mine) > > namespace IronRubyAndCSharp > { > public class Person > { > public string FirstName { get; set; } > > public Person(string name) > { > FirstName = name; > } > } > } > > and tested it like so > > require "test/unit" > require "../IronRuby/bin/debug/IronRubyAndCSharp.dll" > > class PersonTest < Test::Unit::TestCase > include IronRubyAndCSharp > def test_create_person_called_john > john = Person.new("John") > assert_not_nil(john) > assert_equal("John",Person.FirstName) > end > end > > RubyMine(RM) has no problem with the require of the dll but it does have a > problem recognising the namespace "IronRubyAndCSharp" > and the Person class (squiggly lines ahoy). > > When I run the tests in RM I get > > NoMethodError: undefined method `FirstName' for > IronRubyAndCSharp::Person:Class > C:/Users/John/Documents/IronRuby/Tests/Person_test.rb:14:in > `test_create_person_called_john' > :0:in `send' > :0:in `each' > C:/Program Files (x86)/IronRuby > 0.9.4.0/Lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `run_suite' > :0:in `each' > C:\Program Files (x86)\JetBrains\RubyMine > 2.0.1\rb\testing\patch\testunit/test/unit/ui/testrunnermediator.rb:36:in > `run_suite' > testrunner.rb:213:in `start_mediator' > C:\Program Files (x86)\JetBrains\RubyMine > 2.0.1\rb\testing\patch\testunit/test/unit/ui/teamcity/testrunner.rb:191:in > `start' > testrunnerutilities.rb:28:in `run' > C:/Program Files (x86)/IronRuby > 0.9.4.0/Lib/ruby/1.8/test/unit/autorunner.rb:216:in `run' > C:/Program Files (x86)/IronRuby > 0.9.4.0/Lib/ruby/1.8/test/unit/autorunner.rb:12:in `run' > > Just in case RubyMine was at fault I dropped out to good old ir.exe > > C:\Users\John\Documents\IronRuby\Tests>ir Person_test.rb --name > test_create_pers > on_called_john > Loaded suite Person_test > Started > E > Finished in 0.041992 seconds. > > 1) Error: > test_create_person_called_john(PersonTest): > NoMethodError: undefined method `FirstName' for > IronRubyAndCSharp::Person:Class > Person_test.rb:14:in `test_create_person_called_john' > :0:in `send' > :0:in `each' > :0:in `each' > testrunner.rb:66:in `start_mediator' > testrunnerutilities.rb:28:in `run' > > 1 tests, 1 assertions, 0 failures, 1 errors > > I've stuck my code up on github > http://github.com/johnnonolan/IronRubyAndCSharp if you feel that was > inclined. > > Any pointers, help or whatever much appreciated. > > PlzSendMeTehCodez > > > John(no) > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://rubyforge.org/pipermail/ironruby-core/attachments/20100220/84e2a62f/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Sat, 20 Feb 2010 21:26:40 +1100 > From: Mark Ryall > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Getting started with IronRuby and c# > issues. > Message-ID: > <43769a4a1002200226g1585c8c6vdec3521b9c809a51 at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > ironruby will have 'rubified' the Person class's FirstName method to > first_name and I think you mean to assert against the john instance of > Person (rather than the Person class). > > Otherwise it looks pretty close. > > Try: > > require "test/unit" > require "../IronRuby/bin/debug/IronRubyAndCSharp.dll" > > class PersonTest < Test::Unit::TestCase > include IronRubyAndCSharp > def test_create_person_called_john > john = Person.new("John") > assert_not_nil(john) > assert_equal("John",john.first_name) > end > end > > On Sat, Feb 20, 2010 at 9:16 PM, John Nolan wrote: > > Hi IronRuby mailing list, > > Inspired by a talk by Ben Hall on testing c# with Ruby I thought I'd give > it > > a go but > > I'm frustratingly stuck at the first hurdle. I've emailed Ben but as I've > > not had an immediate response I thought I'd open it to you good people. > > Any way. I thought I'd start off simple and follow Dom Green's > > blog. domgreen.com/2010/02/07/pumping-iron-ruby-net-testing/ > > He's set a class in c# with a simple property (here's mine) > > namespace IronRubyAndCSharp > > { > > public class Person > > { > > public string FirstName { get; set; } > > public Person(string name) > > { > > FirstName = name; > > } > > } > > } > > and tested it like so > > require "test/unit" > > require "../IronRuby/bin/debug/IronRubyAndCSharp.dll" > > class PersonTest < Test::Unit::TestCase > > include IronRubyAndCSharp > > def test_create_person_called_john > > john = Person.new("John") > > assert_not_nil(john) > > assert_equal("John",Person.FirstName) > > end > > end > > RubyMine(RM) has no problem with the require of the dll but it does have > a > > problem recognising the namespace "IronRubyAndCSharp" > > and the Person class (squiggly lines ahoy). > > When I run the tests in RM I get > > NoMethodError: undefined method `FirstName' for > > IronRubyAndCSharp::Person:Class > > C:/Users/John/Documents/IronRuby/Tests/Person_test.rb:14:in > > `test_create_person_called_john' > > :0:in `send' > > :0:in `each' > > C:/Program Files > > (x86)/IronRuby > 0.9.4.0/Lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `run_suite' > > :0:in `each' > > C:\Program Files (x86)\JetBrains\RubyMine > > 2.0.1\rb\testing\patch\testunit/test/unit/ui/testrunnermediator.rb:36:in > > `run_suite' > > testrunner.rb:213:in `start_mediator' > > C:\Program Files (x86)\JetBrains\RubyMine > > > 2.0.1\rb\testing\patch\testunit/test/unit/ui/teamcity/testrunner.rb:191:in > > `start' > > testrunnerutilities.rb:28:in `run' > > C:/Program Files > > (x86)/IronRuby 0.9.4.0/Lib/ruby/1.8/test/unit/autorunner.rb:216:in `run' > > C:/Program Files > > (x86)/IronRuby 0.9.4.0/Lib/ruby/1.8/test/unit/autorunner.rb:12:in `run' > > Just in case RubyMine was at fault I dropped out to good old ir.exe > > C:\Users\John\Documents\IronRuby\Tests>ir Person_test.rb --name > > test_create_pers > > on_called_john > > Loaded suite Person_test > > Started > > E > > Finished in 0.041992 seconds. > > 1) Error: > > test_create_person_called_john(PersonTest): > > NoMethodError: undefined method `FirstName' for > > IronRubyAndCSharp::Person:Class > > Person_test.rb:14:in `test_create_person_called_john' > > :0:in `send' > > :0:in `each' > > :0:in `each' > > testrunner.rb:66:in `start_mediator' > > testrunnerutilities.rb:28:in `run' > > 1 tests, 1 assertions, 0 failures, 1 errors > > I've stuck my code up on > > github http://github.com/johnnonolan/IronRubyAndCSharp if you feel that > was > > inclined. > > Any pointers, help or whatever much appreciated. > > PlzSendMeTehCodez > > > > John(no) > > _______________________________________________ > > Ironruby-core mailing list > > Ironruby-core at rubyforge.org > > http://rubyforge.org/mailman/listinfo/ironruby-core > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://rubyforge.org/pipermail/ironruby-core/attachments/20100220/76149074/attachment-0001.html > > > > ------------------------------ > > Message: 3 > Date: Mon, 22 Feb 2010 23:46:23 +0000 > From: Tomas Matousek > To: IronRuby External Code Reviewers > Cc: "ironruby-core at rubyforge.org" > Subject: [Ironruby-core] Code Review: Buffer7 > Message-ID: > < > 4B342496A3EFEB48839E10BB4BF5964C3DB7C760 at TK5EX14MBXC122.redmond.corp.microsoft.com > > > > Content-Type: text/plain; charset="us-ascii" > > tfpt review "/shelveset:Buffer7;REDMOND\tomat" > Comment : > Improves perf of IO#each_line. > Fixes a few socket specs. > > Fixes: > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3314 > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3231 > > Tomas > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: Buffer7.diff > Type: application/octet-stream > Size: 58628 bytes > Desc: Buffer7.diff > URL: < > http://rubyforge.org/pipermail/ironruby-core/attachments/20100222/05730632/attachment.obj > > > > ------------------------------ > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > > End of Ironruby-core Digest, Vol 30, Issue 60 > ********************************************* > -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.smith.jr at gmail.com Tue Feb 23 13:45:13 2010 From: martin.smith.jr at gmail.com (Martin Smith) Date: Tue, 23 Feb 2010 10:45:13 -0800 Subject: [Ironruby-core] Bug with chomp in IronRuby RC2 Message-ID: <21192f971002231045x2ca70b30r45701732db2b2819@mail.gmail.com> Hello, Here's a bug we've run into with chomp. If you run the following code: abc = "/toheunth????????????????????".to_clr_string abc.chomp('\\').chomp('/') puts abc (where abc is really just any string with non-english characters). and you'll get the error: IronRuby.Libraries:0:in `EndsWith': Array index is out of range. (IndexError) from IronRuby.Libraries:0:in `InternalChomp' from :0:in `chomp' from /Users/martin/Kode/rbtest/test-intl.rb:3 If you remove the to_clr_string everything works fine. Otherwise RC2 looks pretty great! It seems fater and better! Thanks, Martin From Tomas.Matousek at microsoft.com Tue Feb 23 16:53:22 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 23 Feb 2010 21:53:22 +0000 Subject: [Ironruby-core] Code Review: TypeInferenceBugs (take 2) Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3DB85678@TK5EX14MBXC122.redmond.corp.microsoft.com> tfpt review "/shelveset:TypeInferenceBugs;REDMOND\tomat" Comment : DLR: Fixes bugs in type inference: 1) By-ref generic parameter public void Foo(ref T x); Foo(1) Foo(StrongBox()) 2) Multiple generic parameters public IEnumerable Select(IEnumerable source, Func selector); 3) Generic arrays public int Foo(T[] x); 4) Type shape difference public static int f5(Dictionary, Dictionary> arg); C.f5( Dictionary[List[str], Dictionary[int, str]]() ) In general type inference seems to need more test coverage - various type shapes, arrays, ref/out with and w/o strong boxes, params array, params dict, optional, named combinations. I've added a few tests for the cases above to Ruby unit tests. Ruby: Implements IInferableInvokable on blocks so that they can be coerced to Func and Action delegates: Enumerable.select([1,2,3], lambda { |x| x + 1 }).each { |a| puts a } Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: TypeInferenceBugs.diff Type: application/octet-stream Size: 11921 bytes Desc: TypeInferenceBugs.diff URL: From Shri.Borde at microsoft.com Wed Feb 24 15:15:14 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Wed, 24 Feb 2010 20:15:14 +0000 Subject: [Ironruby-core] Code Review: Adding more Rails 3 tests Message-ID: <6459203F8B1AF641995AE49D47FA51A7051CAC@TK5EX14MBXC134.redmond.corp.microsoft.com> tfpt review "/shelveset:as3;REDMOND\sborde" Comment : Adds ActiveSupport 3.0.pre tests. Pass rate is 98%! Conditionally disables some ActiveRecord tests that fail on non-English machines Adds support to run the ActiveRecord tests with a private version of ironruby-dbi for ironruby-dbi development scenarios. -------------- next part -------------- A non-text attachment was scrubbed... Name: as3.diff Type: application/octet-stream Size: 43778 bytes Desc: as3.diff URL: From Shri.Borde at microsoft.com Wed Feb 24 15:20:59 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Wed, 24 Feb 2010 20:20:59 +0000 Subject: [Ironruby-core] Anyone interested in implementing Etc module for Mono? Message-ID: <6459203F8B1AF641995AE49D47FA51A70523D7@TK5EX14MBXC134.redmond.corp.microsoft.com> http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3543 blocks using RubyGems on *nix. It should be fairly easy to implement Etc.rb as pure Ruby code using the File functionality. The spec for Etc is at http://www.ruby-doc.org/stdlib/libdoc/etc/rdoc/classes/Etc.html. RubyGems just seems to need Etc.getpwuid. Anyone interested in tackling this problem? Shri -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan.riley at panesofglass.org Thu Feb 25 11:27:11 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Thu, 25 Feb 2010 10:27:11 -0600 Subject: [Ironruby-core] Anyone interested in implementing Etc module for Mono? In-Reply-To: <6459203F8B1AF641995AE49D47FA51A70523D7@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <6459203F8B1AF641995AE49D47FA51A70523D7@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: If no one has done this by the time I'm moved and have a machine again, I'll be happy to do it. Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Wed, Feb 24, 2010 at 2:20 PM, Shri Borde wrote: > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3543 blocks > using RubyGems on *nix. It should be fairly easy to implement Etc.rb as pure > Ruby code using the File functionality. The spec for Etc is at > http://www.ruby-doc.org/stdlib/libdoc/etc/rdoc/classes/Etc.html. RubyGems > just seems to need Etc.getpwuid. > > > > Anyone interested in tackling this problem? > > > > 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 Shri.Borde at microsoft.com Thu Feb 25 13:26:22 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Thu, 25 Feb 2010 18:26:22 +0000 Subject: [Ironruby-core] Anyone interested in implementing Etc module for Mono? In-Reply-To: References: <6459203F8B1AF641995AE49D47FA51A70523D7@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: <6459203F8B1AF641995AE49D47FA51A7053DA9@TK5EX14MBXC134.redmond.corp.microsoft.com> Cool! Let us know if you have any questions. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, February 25, 2010 8:27 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Anyone interested in implementing Etc module for Mono? If no one has done this by the time I'm moved and have a machine again, I'll be happy to do it. Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Wed, Feb 24, 2010 at 2:20 PM, Shri Borde > wrote: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3543 blocks using RubyGems on *nix. It should be fairly easy to implement Etc.rb as pure Ruby code using the File functionality. The spec for Etc is at http://www.ruby-doc.org/stdlib/libdoc/etc/rdoc/classes/Etc.html. RubyGems just seems to need Etc.getpwuid. Anyone interested in tackling this problem? 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 ryan.riley at panesofglass.org Thu Feb 25 15:28:14 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Thu, 25 Feb 2010 14:28:14 -0600 Subject: [Ironruby-core] Anyone interested in implementing Etc module for Mono? In-Reply-To: <6459203F8B1AF641995AE49D47FA51A7053DA9@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <6459203F8B1AF641995AE49D47FA51A70523D7@TK5EX14MBXC134.redmond.corp.microsoft.com> <6459203F8B1AF641995AE49D47FA51A7053DA9@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: Looks like Rubinius already has a Ruby impl. of Etc for FFI. It's licensed with BSD. Is that problematic? If so, I'll start from the specs. Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Thu, Feb 25, 2010 at 12:26 PM, Shri Borde wrote: > Cool! Let us know if you have any questions. > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ryan Riley > *Sent:* Thursday, February 25, 2010 8:27 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Anyone interested in implementing Etc > module for Mono? > > > > If no one has done this by the time I'm moved and have a machine again, > I'll be happy to do it. > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > On Wed, Feb 24, 2010 at 2:20 PM, Shri Borde > wrote: > > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3543 blocks > using RubyGems on *nix. It should be fairly easy to implement Etc.rb as pure > Ruby code using the File functionality. The spec for Etc is at > http://www.ruby-doc.org/stdlib/libdoc/etc/rdoc/classes/Etc.html. RubyGems > just seems to need Etc.getpwuid. > > > > Anyone interested in tackling this problem? > > > > Shri > > > _______________________________________________ > 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 ryan.riley at panesofglass.org Thu Feb 25 15:28:37 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Thu, 25 Feb 2010 14:28:37 -0600 Subject: [Ironruby-core] Anyone interested in implementing Etc module for Mono? In-Reply-To: References: <6459203F8B1AF641995AE49D47FA51A70523D7@TK5EX14MBXC134.redmond.corp.microsoft.com> <6459203F8B1AF641995AE49D47FA51A7053DA9@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: Sorry, link: http://github.com/evanphx/rubinius/blob/master/lib/etc.rb.ffi Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Thu, Feb 25, 2010 at 2:28 PM, Ryan Riley wrote: > Looks like Rubinius already has a Ruby impl. of Etc for FFI. It's licensed > with BSD. Is that problematic? If so, I'll start from the specs. > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > > On Thu, Feb 25, 2010 at 12:26 PM, Shri Borde wrote: > >> Cool! Let us know if you have any questions. >> >> >> >> *From:* ironruby-core-bounces at rubyforge.org [mailto: >> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ryan Riley >> *Sent:* Thursday, February 25, 2010 8:27 AM >> *To:* ironruby-core at rubyforge.org >> *Subject:* Re: [Ironruby-core] Anyone interested in implementing Etc >> module for Mono? >> >> >> >> If no one has done this by the time I'm moved and have a machine again, >> I'll be happy to do it. >> >> >> Ryan Riley >> >> Email: ryan.riley at panesofglass.org >> LinkedIn: http://www.linkedin.com/in/ryanriley >> Blog: http://wizardsofsmart.net/ >> Twitter: @panesofglass >> Website: http://panesofglass.org/ >> >> On Wed, Feb 24, 2010 at 2:20 PM, Shri Borde >> wrote: >> >> http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3543 blocks >> using RubyGems on *nix. It should be fairly easy to implement Etc.rb as pure >> Ruby code using the File functionality. The spec for Etc is at >> http://www.ruby-doc.org/stdlib/libdoc/etc/rdoc/classes/Etc.html. RubyGems >> just seems to need Etc.getpwuid. >> >> >> >> Anyone interested in tackling this problem? >> >> >> >> Shri >> >> >> _______________________________________________ >> 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 Shri.Borde at microsoft.com Thu Feb 25 15:42:33 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Thu, 25 Feb 2010 20:42:33 +0000 Subject: [Ironruby-core] Anyone interested in implementing Etc module for Mono? In-Reply-To: References: <6459203F8B1AF641995AE49D47FA51A70523D7@TK5EX14MBXC134.redmond.corp.microsoft.com> <6459203F8B1AF641995AE49D47FA51A7053DA9@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: <6459203F8B1AF641995AE49D47FA51A7053FCF@TK5EX14MBXC134.redmond.corp.microsoft.com> I think we should be able to use it. I shall double-check and let you know. In the meantime, would it be possible to manually copy the file into the lib folder try to run igem on *nix to see if there are other blocking issues? From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, February 25, 2010 12:29 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Anyone interested in implementing Etc module for Mono? Sorry, link: http://github.com/evanphx/rubinius/blob/master/lib/etc.rb.ffi Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Thu, Feb 25, 2010 at 2:28 PM, Ryan Riley > wrote: Looks like Rubinius already has a Ruby impl. of Etc for FFI. It's licensed with BSD. Is that problematic? If so, I'll start from the specs. Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Thu, Feb 25, 2010 at 12:26 PM, Shri Borde > wrote: Cool! Let us know if you have any questions. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, February 25, 2010 8:27 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Anyone interested in implementing Etc module for Mono? If no one has done this by the time I'm moved and have a machine again, I'll be happy to do it. Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Wed, Feb 24, 2010 at 2:20 PM, Shri Borde > wrote: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3543 blocks using RubyGems on *nix. It should be fairly easy to implement Etc.rb as pure Ruby code using the File functionality. The spec for Etc is at http://www.ruby-doc.org/stdlib/libdoc/etc/rdoc/classes/Etc.html. RubyGems just seems to need Etc.getpwuid. Anyone interested in tackling this problem? Shri _______________________________________________ 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 ryan.riley at panesofglass.org Thu Feb 25 16:28:11 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Thu, 25 Feb 2010 15:28:11 -0600 Subject: [Ironruby-core] Anyone interested in implementing Etc module for Mono? In-Reply-To: <6459203F8B1AF641995AE49D47FA51A7053FCF@TK5EX14MBXC134.redmond.corp.microsoft.com> References: <6459203F8B1AF641995AE49D47FA51A70523D7@TK5EX14MBXC134.redmond.corp.microsoft.com> <6459203F8B1AF641995AE49D47FA51A7053DA9@TK5EX14MBXC134.redmond.corp.microsoft.com> <6459203F8B1AF641995AE49D47FA51A7053FCF@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: I can try it next week once I have my machine set up again. I'm unable to try it until then, unfortunately. Also, I noticed that JRuby is sharing the same implementation (or similar), but both are based on FFI, not straight up Ruby. Has anyone started working on an IronRuby FFI impl? If not, would it be better to start working on this and get Etc working with FFI? Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Thu, Feb 25, 2010 at 2:42 PM, Shri Borde wrote: > I think we should be able to use it. I shall double-check and let you > know. > > > > In the meantime, would it be possible to manually copy the file into the > lib folder try to run igem on *nix to see if there are other blocking > issues? > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ryan Riley > *Sent:* Thursday, February 25, 2010 12:29 PM > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Anyone interested in implementing Etc > module for Mono? > > > > Sorry, link: http://github.com/evanphx/rubinius/blob/master/lib/etc.rb.ffi > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > On Thu, Feb 25, 2010 at 2:28 PM, Ryan Riley > wrote: > > Looks like Rubinius already has a Ruby impl. of Etc for FFI. It's licensed > with BSD. Is that problematic? If so, I'll start from the specs. > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > On Thu, Feb 25, 2010 at 12:26 PM, Shri Borde > wrote: > > Cool! Let us know if you have any questions. > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ryan Riley > *Sent:* Thursday, February 25, 2010 8:27 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Anyone interested in implementing Etc > module for Mono? > > > > If no one has done this by the time I'm moved and have a machine again, > I'll be happy to do it. > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > On Wed, Feb 24, 2010 at 2:20 PM, Shri Borde > wrote: > > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3543 blocks > using RubyGems on *nix. It should be fairly easy to implement Etc.rb as pure > Ruby code using the File functionality. The spec for Etc is at > http://www.ruby-doc.org/stdlib/libdoc/etc/rdoc/classes/Etc.html. RubyGems > just seems to need Etc.getpwuid. > > > > Anyone interested in tackling this problem? > > > > Shri > > > _______________________________________________ > 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 jdeville at microsoft.com Thu Feb 25 16:34:08 2010 From: jdeville at microsoft.com (Jim Deville) Date: Thu, 25 Feb 2010 21:34:08 +0000 Subject: [Ironruby-core] Anyone interested in implementing Etc module for Mono? In-Reply-To: References: <6459203F8B1AF641995AE49D47FA51A70523D7@TK5EX14MBXC134.redmond.corp.microsoft.com> <6459203F8B1AF641995AE49D47FA51A7053DA9@TK5EX14MBXC134.redmond.corp.microsoft.com> <6459203F8B1AF641995AE49D47FA51A7053FCF@TK5EX14MBXC134.redmond.corp.microsoft.com> Message-ID: <31BD916A7536A242870B0B4E3F9068D71C5BEC@TK5EX14MBXC136.redmond.corp.microsoft.com> I don?t think we have time to do FFI for our 1.0, but it would be useful to have it implemented soon after ? JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, February 25, 2010 1:28 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Anyone interested in implementing Etc module for Mono? I can try it next week once I have my machine set up again. I'm unable to try it until then, unfortunately. Also, I noticed that JRuby is sharing the same implementation (or similar), but both are based on FFI, not straight up Ruby. Has anyone started working on an IronRuby FFI impl? If not, would it be better to start working on this and get Etc working with FFI? Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Thu, Feb 25, 2010 at 2:42 PM, Shri Borde > wrote: I think we should be able to use it. I shall double-check and let you know. In the meantime, would it be possible to manually copy the file into the lib folder try to run igem on *nix to see if there are other blocking issues? From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, February 25, 2010 12:29 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Anyone interested in implementing Etc module for Mono? Sorry, link: http://github.com/evanphx/rubinius/blob/master/lib/etc.rb.ffi Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Thu, Feb 25, 2010 at 2:28 PM, Ryan Riley > wrote: Looks like Rubinius already has a Ruby impl. of Etc for FFI. It's licensed with BSD. Is that problematic? If so, I'll start from the specs. Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Thu, Feb 25, 2010 at 12:26 PM, Shri Borde > wrote: Cool! Let us know if you have any questions. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, February 25, 2010 8:27 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Anyone interested in implementing Etc module for Mono? If no one has done this by the time I'm moved and have a machine again, I'll be happy to do it. Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Wed, Feb 24, 2010 at 2:20 PM, Shri Borde > wrote: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3543 blocks using RubyGems on *nix. It should be fairly easy to implement Etc.rb as pure Ruby code using the File functionality. The spec for Etc is at http://www.ruby-doc.org/stdlib/libdoc/etc/rdoc/classes/Etc.html. RubyGems just seems to need Etc.getpwuid. Anyone interested in tackling this problem? Shri _______________________________________________ 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 Thu Feb 25 16:48:48 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Thu, 25 Feb 2010 21:48:48 +0000 Subject: [Ironruby-core] Anyone interested in implementing Etc module for Mono? In-Reply-To: <31BD916A7536A242870B0B4E3F9068D71C5BEC@TK5EX14MBXC136.redmond.corp.microsoft.com> References: <6459203F8B1AF641995AE49D47FA51A70523D7@TK5EX14MBXC134.redmond.corp.microsoft.com> <6459203F8B1AF641995AE49D47FA51A7053DA9@TK5EX14MBXC134.redmond.corp.microsoft.com> <6459203F8B1AF641995AE49D47FA51A7053FCF@TK5EX14MBXC134.redmond.corp.microsoft.com> <31BD916A7536A242870B0B4E3F9068D71C5BEC@TK5EX14MBXC136.redmond.corp.microsoft.com> Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3EC8C6E8@TK5EX14MBXC131.redmond.corp.microsoft.com> It would actually be better not to use FFI whenever possible. Native code interop is platform specific and thus would require us to maintain multiple implementations. If there is a managed API in Mono that does what we need we should use it. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Thursday, February 25, 2010 1:34 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Anyone interested in implementing Etc module for Mono? I don?t think we have time to do FFI for our 1.0, but it would be useful to have it implemented soon after ? JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, February 25, 2010 1:28 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Anyone interested in implementing Etc module for Mono? I can try it next week once I have my machine set up again. I'm unable to try it until then, unfortunately. Also, I noticed that JRuby is sharing the same implementation (or similar), but both are based on FFI, not straight up Ruby. Has anyone started working on an IronRuby FFI impl? If not, would it be better to start working on this and get Etc working with FFI? Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Thu, Feb 25, 2010 at 2:42 PM, Shri Borde > wrote: I think we should be able to use it. I shall double-check and let you know. In the meantime, would it be possible to manually copy the file into the lib folder try to run igem on *nix to see if there are other blocking issues? From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, February 25, 2010 12:29 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Anyone interested in implementing Etc module for Mono? Sorry, link: http://github.com/evanphx/rubinius/blob/master/lib/etc.rb.ffi Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Thu, Feb 25, 2010 at 2:28 PM, Ryan Riley > wrote: Looks like Rubinius already has a Ruby impl. of Etc for FFI. It's licensed with BSD. Is that problematic? If so, I'll start from the specs. Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Thu, Feb 25, 2010 at 12:26 PM, Shri Borde > wrote: Cool! Let us know if you have any questions. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, February 25, 2010 8:27 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Anyone interested in implementing Etc module for Mono? If no one has done this by the time I'm moved and have a machine again, I'll be happy to do it. Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Wed, Feb 24, 2010 at 2:20 PM, Shri Borde > wrote: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3543 blocks using RubyGems on *nix. It should be fairly easy to implement Etc.rb as pure Ruby code using the File functionality. The spec for Etc is at http://www.ruby-doc.org/stdlib/libdoc/etc/rdoc/classes/Etc.html. RubyGems just seems to need Etc.getpwuid. Anyone interested in tackling this problem? Shri _______________________________________________ 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 Shri.Borde at microsoft.com Thu Feb 25 17:20:05 2010 From: Shri.Borde at microsoft.com (Shri Borde) Date: Thu, 25 Feb 2010 22:20:05 +0000 Subject: [Ironruby-core] Anyone interested in implementing Etc module for Mono? In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C3EC8C6E8@TK5EX14MBXC131.redmond.corp.microsoft.com> References: <6459203F8B1AF641995AE49D47FA51A70523D7@TK5EX14MBXC134.redmond.corp.microsoft.com> <6459203F8B1AF641995AE49D47FA51A7053DA9@TK5EX14MBXC134.redmond.corp.microsoft.com> <6459203F8B1AF641995AE49D47FA51A7053FCF@TK5EX14MBXC134.redmond.corp.microsoft.com> <31BD916A7536A242870B0B4E3F9068D71C5BEC@TK5EX14MBXC136.redmond.corp.microsoft.com> <4B342496A3EFEB48839E10BB4BF5964C3EC8C6E8@TK5EX14MBXC131.redmond.corp.microsoft.com> Message-ID: <6459203F8B1AF641995AE49D47FA51A70547D6@TK5EX14MBXC134.redmond.corp.microsoft.com> One of the native functions Etc.rb calls is getpwnam. The mono equivalent seems to be http://www.go-mono.com/docs/index.aspx?link=M%3aMono.Posix.Syscall.getusername(System.Int32) From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Tomas Matousek Sent: Thursday, February 25, 2010 1:49 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Anyone interested in implementing Etc module for Mono? It would actually be better not to use FFI whenever possible. Native code interop is platform specific and thus would require us to maintain multiple implementations. If there is a managed API in Mono that does what we need we should use it. Tomas From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jim Deville Sent: Thursday, February 25, 2010 1:34 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Anyone interested in implementing Etc module for Mono? I don?t think we have time to do FFI for our 1.0, but it would be useful to have it implemented soon after ? JD From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, February 25, 2010 1:28 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Anyone interested in implementing Etc module for Mono? I can try it next week once I have my machine set up again. I'm unable to try it until then, unfortunately. Also, I noticed that JRuby is sharing the same implementation (or similar), but both are based on FFI, not straight up Ruby. Has anyone started working on an IronRuby FFI impl? If not, would it be better to start working on this and get Etc working with FFI? Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Thu, Feb 25, 2010 at 2:42 PM, Shri Borde > wrote: I think we should be able to use it. I shall double-check and let you know. In the meantime, would it be possible to manually copy the file into the lib folder try to run igem on *nix to see if there are other blocking issues? From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, February 25, 2010 12:29 PM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Anyone interested in implementing Etc module for Mono? Sorry, link: http://github.com/evanphx/rubinius/blob/master/lib/etc.rb.ffi Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Thu, Feb 25, 2010 at 2:28 PM, Ryan Riley > wrote: Looks like Rubinius already has a Ruby impl. of Etc for FFI. It's licensed with BSD. Is that problematic? If so, I'll start from the specs. Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Thu, Feb 25, 2010 at 12:26 PM, Shri Borde > wrote: Cool! Let us know if you have any questions. From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Ryan Riley Sent: Thursday, February 25, 2010 8:27 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Anyone interested in implementing Etc module for Mono? If no one has done this by the time I'm moved and have a machine again, I'll be happy to do it. Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Wed, Feb 24, 2010 at 2:20 PM, Shri Borde > wrote: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3543 blocks using RubyGems on *nix. It should be fairly easy to implement Etc.rb as pure Ruby code using the File functionality. The spec for Etc is at http://www.ruby-doc.org/stdlib/libdoc/etc/rdoc/classes/Etc.html. RubyGems just seems to need Etc.getpwuid. Anyone interested in tackling this problem? Shri _______________________________________________ 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 ivan at whiterabbitconsulting.eu Fri Feb 26 07:38:16 2010 From: ivan at whiterabbitconsulting.eu (Ivan Porto Carrero) Date: Fri, 26 Feb 2010 13:38:16 +0100 Subject: [Ironruby-core] Anyone interested in implementing Etc module for Mono? In-Reply-To: <4B342496A3EFEB48839E10BB4BF5964C3EC8C6E8@TK5EX14MBXC131.redmond.corp.microsoft.com> References: <6459203F8B1AF641995AE49D47FA51A70523D7@TK5EX14MBXC134.redmond.corp.microsoft.com> <6459203F8B1AF641995AE49D47FA51A7053DA9@TK5EX14MBXC134.redmond.corp.microsoft.com> <6459203F8B1AF641995AE49D47FA51A7053FCF@TK5EX14MBXC134.redmond.corp.microsoft.com> <31BD916A7536A242870B0B4E3F9068D71C5BEC@TK5EX14MBXC136.redmond.corp.microsoft.com> <4B342496A3EFEB48839E10BB4BF5964C3EC8C6E8@TK5EX14MBXC131.redmond.corp.microsoft.com> Message-ID: You can also look at the Mono.Native and Mono.Posix It's all in there already On Thu, Feb 25, 2010 at 10:48 PM, Tomas Matousek < Tomas.Matousek at microsoft.com> wrote: > It would actually be better *not* to use FFI whenever possible. Native > code interop is platform specific and thus would require us to maintain > multiple implementations. If there is a managed API in Mono that does what > we need we should use it. > > > > Tomas > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Jim Deville > *Sent:* Thursday, February 25, 2010 1:34 PM > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Anyone interested in implementing Etc > module for Mono? > > > > I don?t think we have time to do FFI for our 1.0, but it would be useful to > have it implemented soon after J > > > > JD > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ryan Riley > *Sent:* Thursday, February 25, 2010 1:28 PM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Anyone interested in implementing Etc > module for Mono? > > > > I can try it next week once I have my machine set up again. I'm unable to > try it until then, unfortunately. Also, I noticed that JRuby is sharing the > same implementation (or similar), but both are based on FFI, not straight up > Ruby. > > > > Has anyone started working on an IronRuby FFI impl? If not, would it be > better to start working on this and get Etc working with FFI? > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > On Thu, Feb 25, 2010 at 2:42 PM, Shri Borde > wrote: > > I think we should be able to use it. I shall double-check and let you know. > > > > In the meantime, would it be possible to manually copy the file into the > lib folder try to run igem on *nix to see if there are other blocking > issues? > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ryan Riley > *Sent:* Thursday, February 25, 2010 12:29 PM > > > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Anyone interested in implementing Etc > module for Mono? > > > > Sorry, link: http://github.com/evanphx/rubinius/blob/master/lib/etc.rb.ffi > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > On Thu, Feb 25, 2010 at 2:28 PM, Ryan Riley > wrote: > > Looks like Rubinius already has a Ruby impl. of Etc for FFI. It's licensed > with BSD. Is that problematic? If so, I'll start from the specs. > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > On Thu, Feb 25, 2010 at 12:26 PM, Shri Borde > wrote: > > Cool! Let us know if you have any questions. > > > > *From:* ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ryan Riley > *Sent:* Thursday, February 25, 2010 8:27 AM > *To:* ironruby-core at rubyforge.org > *Subject:* Re: [Ironruby-core] Anyone interested in implementing Etc > module for Mono? > > > > If no one has done this by the time I'm moved and have a machine again, > I'll be happy to do it. > > > Ryan Riley > > Email: ryan.riley at panesofglass.org > LinkedIn: http://www.linkedin.com/in/ryanriley > Blog: http://wizardsofsmart.net/ > Twitter: @panesofglass > Website: http://panesofglass.org/ > > On Wed, Feb 24, 2010 at 2:20 PM, Shri Borde > wrote: > > http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3543 blocks > using RubyGems on *nix. It should be fairly easy to implement Etc.rb as pure > Ruby code using the File functionality. The spec for Etc is at > http://www.ruby-doc.org/stdlib/libdoc/etc/rdoc/classes/Etc.html. RubyGems > just seems to need Etc.getpwuid. > > > > Anyone interested in tackling this problem? > > > > Shri > > > _______________________________________________ > 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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryan.riley at panesofglass.org Fri Feb 26 09:07:55 2010 From: ryan.riley at panesofglass.org (Ryan Riley) Date: Fri, 26 Feb 2010 08:07:55 -0600 Subject: [Ironruby-core] Anyone interested in implementing Etc module for Mono? In-Reply-To: References: <6459203F8B1AF641995AE49D47FA51A70523D7@TK5EX14MBXC134.redmond.corp.microsoft.com> <6459203F8B1AF641995AE49D47FA51A7053DA9@TK5EX14MBXC134.redmond.corp.microsoft.com> <6459203F8B1AF641995AE49D47FA51A7053FCF@TK5EX14MBXC134.redmond.corp.microsoft.com> <31BD916A7536A242870B0B4E3F9068D71C5BEC@TK5EX14MBXC136.redmond.corp.microsoft.com> <4B342496A3EFEB48839E10BB4BF5964C3EC8C6E8@TK5EX14MBXC131.redmond.corp.microsoft.com> Message-ID: Awesome! Thanks for the tips! I should have my env set up early next week and will give it a go. Regards, Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Twitter: @panesofglass Website: http://panesofglass.org/ On Fri, Feb 26, 2010 at 6:38 AM, Ivan Porto Carrero < ivan at whiterabbitconsulting.eu> wrote: > You can also look at the Mono.Native and Mono.Posix > It's all in there already > > > On Thu, Feb 25, 2010 at 10:48 PM, Tomas Matousek < > Tomas.Matousek at microsoft.com> wrote: > >> It would actually be better *not* to use FFI whenever possible. Native >> code interop is platform specific and thus would require us to maintain >> multiple implementations. If there is a managed API in Mono that does what >> we need we should use it. >> >> >> >> Tomas >> >> >> >> *From:* ironruby-core-bounces at rubyforge.org [mailto: >> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Jim Deville >> *Sent:* Thursday, February 25, 2010 1:34 PM >> >> *To:* ironruby-core at rubyforge.org >> *Subject:* Re: [Ironruby-core] Anyone interested in implementing Etc >> module for Mono? >> >> >> >> I don?t think we have time to do FFI for our 1.0, but it would be useful >> to have it implemented soon after J >> >> >> >> JD >> >> >> >> *From:* ironruby-core-bounces at rubyforge.org [mailto: >> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ryan Riley >> *Sent:* Thursday, February 25, 2010 1:28 PM >> *To:* ironruby-core at rubyforge.org >> *Subject:* Re: [Ironruby-core] Anyone interested in implementing Etc >> module for Mono? >> >> >> >> I can try it next week once I have my machine set up again. I'm unable to >> try it until then, unfortunately. Also, I noticed that JRuby is sharing the >> same implementation (or similar), but both are based on FFI, not straight up >> Ruby. >> >> >> >> Has anyone started working on an IronRuby FFI impl? If not, would it be >> better to start working on this and get Etc working with FFI? >> >> >> Ryan Riley >> >> Email: ryan.riley at panesofglass.org >> LinkedIn: http://www.linkedin.com/in/ryanriley >> Blog: http://wizardsofsmart.net/ >> Twitter: @panesofglass >> Website: http://panesofglass.org/ >> >> On Thu, Feb 25, 2010 at 2:42 PM, Shri Borde >> wrote: >> >> I think we should be able to use it. I shall double-check and let you >> know. >> >> >> >> In the meantime, would it be possible to manually copy the file into the >> lib folder try to run igem on *nix to see if there are other blocking >> issues? >> >> >> >> *From:* ironruby-core-bounces at rubyforge.org [mailto: >> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ryan Riley >> *Sent:* Thursday, February 25, 2010 12:29 PM >> >> >> *To:* ironruby-core at rubyforge.org >> *Subject:* Re: [Ironruby-core] Anyone interested in implementing Etc >> module for Mono? >> >> >> >> Sorry, link: >> http://github.com/evanphx/rubinius/blob/master/lib/etc.rb.ffi >> >> >> Ryan Riley >> >> Email: ryan.riley at panesofglass.org >> LinkedIn: http://www.linkedin.com/in/ryanriley >> Blog: http://wizardsofsmart.net/ >> Twitter: @panesofglass >> Website: http://panesofglass.org/ >> >> On Thu, Feb 25, 2010 at 2:28 PM, Ryan Riley >> wrote: >> >> Looks like Rubinius already has a Ruby impl. of Etc for FFI. It's licensed >> with BSD. Is that problematic? If so, I'll start from the specs. >> >> >> Ryan Riley >> >> Email: ryan.riley at panesofglass.org >> LinkedIn: http://www.linkedin.com/in/ryanriley >> Blog: http://wizardsofsmart.net/ >> Twitter: @panesofglass >> Website: http://panesofglass.org/ >> >> On Thu, Feb 25, 2010 at 12:26 PM, Shri Borde >> wrote: >> >> Cool! Let us know if you have any questions. >> >> >> >> *From:* ironruby-core-bounces at rubyforge.org [mailto: >> ironruby-core-bounces at rubyforge.org] *On Behalf Of *Ryan Riley >> *Sent:* Thursday, February 25, 2010 8:27 AM >> *To:* ironruby-core at rubyforge.org >> *Subject:* Re: [Ironruby-core] Anyone interested in implementing Etc >> module for Mono? >> >> >> >> If no one has done this by the time I'm moved and have a machine again, >> I'll be happy to do it. >> >> >> Ryan Riley >> >> Email: ryan.riley at panesofglass.org >> LinkedIn: http://www.linkedin.com/in/ryanriley >> Blog: http://wizardsofsmart.net/ >> Twitter: @panesofglass >> Website: http://panesofglass.org/ >> >> On Wed, Feb 24, 2010 at 2:20 PM, Shri Borde >> wrote: >> >> http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=3543 blocks >> using RubyGems on *nix. It should be fairly easy to implement Etc.rb as pure >> Ruby code using the File functionality. The spec for Etc is at >> http://www.ruby-doc.org/stdlib/libdoc/etc/rdoc/classes/Etc.html. RubyGems >> just seems to need Etc.getpwuid. >> >> >> >> Anyone interested in tackling this problem? >> >> >> >> Shri >> >> >> _______________________________________________ >> 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 >> >> > > _______________________________________________ > 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 Feb 26 19:02:42 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 27 Feb 2010 00:02:42 +0000 Subject: [Ironruby-core] Code Review: stack traces Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3EC8E0B4@TK5EX14MBXC131.redmond.corp.microsoft.com> tpft review /shelveset:STraces2;tomat DLR interpreter: Inlines RunInstructions into Run to reduce stack consumption. The interpreter saves interpreted stack trace when it catches an exception. The stack trace is stored in Exception.Data and can be inspected later by code that builds stack traces. Fixes synchronous compilation to run the compiled code immediately. Ruby: Factors stack building logic out of RubyExceptionData into RubyStackTraceBuilder. Adds /sync0, /sync1, /debug and /debug /partial to irtest.rb to cover more cases. Fixes: http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=4010 http://ironruby.codeplex.com/WorkItem/View.aspx?WorkItemId=1979 Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: STrace2.diff Type: application/octet-stream Size: 40762 bytes Desc: STrace2.diff URL: From Tomas.Matousek at microsoft.com Fri Feb 26 21:25:49 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 27 Feb 2010 02:25:49 +0000 Subject: [Ironruby-core] Code Review: RbHAPI Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3EC8E142@TK5EX14MBXC131.redmond.corp.microsoft.com> tfpt review "/shelveset:RbHAPI;REDMOND\tomat" Comment : Polishes Ruby Hosting APIs: - Removes Ruby.GetExecutionContext - Changes RequireFile to be an extension method on ScriptEngine. - Adds missing comments. Removes unnecessary frozen flag checks. Adds flags to Hash. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: RbHAPI.diff Type: application/octet-stream Size: 42619 bytes Desc: RbHAPI.diff URL: From Tomas.Matousek at microsoft.com Fri Feb 26 23:14:43 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Sat, 27 Feb 2010 04:14:43 +0000 Subject: [Ironruby-core] Code Review: ComConversions Message-ID: <4B342496A3EFEB48839E10BB4BF5964C3EC8E1AF@TK5EX14MBXC131.redmond.corp.microsoft.com> tfpt review "/shelveset:ComConversions;REDMOND\tomat" Comment : Implements implicit conversions to COM types when binding to COM objects. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: ComConversions.diff Type: application/octet-stream Size: 8795 bytes Desc: ComConversions.diff URL: From will at hotgazpacho.org Fri Feb 26 23:15:07 2010 From: will at hotgazpacho.org (Will Green) Date: Fri, 26 Feb 2010 23:15:07 -0500 Subject: [Ironruby-core] iron-term-ansicolor 0.0.2 Released Message-ID: <398d3e0e1002262015ka471910r81d53c0117b1cc8@mail.gmail.com> Tonight, I released an update to iron-term-ansicolor, a library for IronRuby that provides console colors for apps like RSpec and Cucumber (Cucumber already makes use of this, and I bet it would not be too much trouble to add to RSpec). http://rubygems.org/gems/iron-term-ansicolor igem install iron-term-ansicolor The source is available on github: http://github.com/hotgazpacho/iron-term-ansicolor Big thanks to Danny Coates for devising a much better way to parse the ANSI control codes! -- Will Green http://hotgazpacho.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ruby-forum.com Sat Feb 27 02:02:11 2010 From: lists at ruby-forum.com (Andrew Warner) Date: Sat, 27 Feb 2010 08:02:11 +0100 Subject: [Ironruby-core] problem setting .NET member variables Message-ID: Hello, can anyone help me with this issue? I have the following code running in C#: ScriptRuntime runtime = Ruby.CreateRuntime(); ScriptEngine engine = Ruby.GetEngine(runtime); ScriptScope scope = runtime.CreateScope(); scope.SetVariable("model", model); StreamReader sr = new StreamReader(ConfigurationManager.AppSettings["RubyFlagsPath"] + flagName + ".rb"); string rubyScript = sr.ReadToEnd(); engine.Execute(rubyScript, scope); which runs this Ruby code in part: model.Transaction.Runs[0].RunLoan.RunBorrowers[2].RunLoan.RunFlagTestResults[0].Passed = false model.Transaction.Runs[0].RunLoan.RunBorrowers[3].RunLoan.RunFlagTestResults[0].Passed = true f.syswrite("passed3 #{model.Transaction.Runs[0].RunLoan.RunBorrowers[2].RunLoan.RunFlagTestResults[0].Passed} \n") f.syswrite("passed4 #{model.Transaction.Runs[0].RunLoan.RunBorrowers[3].RunLoan.RunFlagTestResults[0].Passed} \n") The output I get is the following: true true Obviously something is not quite right, the results should have been false, true. Now, I've tried this with up to four borrowers and each time the consistent pattern I'm seeing is that whatever I set the last passed status to is set for ALL the borrowers. Somehow Ruby is setting the passed status for all borrowers at once with each call, even though they are in completely different objects. -- Posted via http://www.ruby-forum.com/. From lists at ruby-forum.com Sun Feb 28 20:21:33 2010 From: lists at ruby-forum.com (Mohammad Azam) Date: Mon, 1 Mar 2010 02:21:33 +0100 Subject: [Ironruby-core] Open-Uri Path in App.Config Message-ID: <5fb12fb09403a715cd7f12b2898eabda@ruby-forum.com> I completely forgot the paths that I need to setup to use open-uri in IronRuby when using with C#. I need to put those paths in my App.config to work with open-uri. Can anyone please paste those sections here? I keep forgetting those sections that I need to include in my App.config. -- Posted via http://www.ruby-forum.com/.