From nospam at lunacymaze.org Thu Dec 1 01:53:54 2005 From: nospam at lunacymaze.org (Ghislain Mary) Date: Thu, 01 Dec 2005 07:53:54 +0100 Subject: [Nitro] http://nitrohq.com => Error 404 In-Reply-To: <200512010136.19366.m.fellinger@gmail.com> References: <3ff63f9b0511301338j16ba2906s@mail.gmail.com> <3ff63f9b0511301614p41325502w@mail.gmail.com> <200512010136.19366.m.fellinger@gmail.com> Message-ID: <1133420034.28271.0.camel@localhost.localdomain> You can take a look at http://no-www.org/ Regards, Ghislain Le jeudi 01 d?cembre 2005 ? 01:36 +0100, Michael Fellinger a ?crit : > Hey, > > Well, i pointed the same out a couple of times but somehow there was never > happening anything. > AFAIK george has some browser/whatever-plugin that appends the www. and so is > never forced to enter it... but i'm quite annoyed by this easy-to-fix > problem. (not to mention the times where i pointed people to the page and i > had to explain them that the official page of a web-framework doesn't get the > address right [right as in "as the user expects"]) > > well, didn't know about this historical piece of fact - but it only underlines > the need :) > > This should nonetheless only be a reminder - i want this topic to become large > enough to see it fixed soon... > but i know george is busy all day, so don't hurry - i give you another week ;) > > Sincerily > Michael > > Am Donnerstag, 1. Dezember 2005 01:14 schrieb zimba-tm: > > Hello, > > > > I know that this domain works when you append www. in front of it. I > > also tend to write a bit in the wiki when i can. > > > > Subdomains where initially created to point at various computers. In > > the "old age", the services like ftp, smtp, pop and http would all > > have their own machines, so it maked sense to use www. Because every > > subdomain would represent a computer. > > > > In the actual world, where reverse-proxy is the king, where http is > > the most common used protocol and subdomains are hijacked to represent > > different web-services, I think it makes sense to espect that a domain > > returns a valid http service. > > > > That's why i'm pointing this issue out. Do you type > > http://nitro.rubyforge.org or http://www.nitro.rubyforge.org ? If you > > look at microsoft ads, they tell you to go to microsoft.com, not > > www.microsoft.com. It's the same for nitrohq. > > > > Hmm, maybe this sounds too harsh. In any case, i'm just trying to give > > my opinion. > > > > Peace and long live nitro :-) > > > > On 01/12/05, Jeff Wood wrote: > > > ... the appropriate url is : http://www.nitrohq.com > > > > > > j. > > > > > > On 11/30/05, Lou Vanek wrote: > > > > try http://www.nitrohq.com/ > > > > > > > > zimba-tm wrote: > > > > > Hi George, > > > > > > > > > > I know i'm repeating myself a lot on this particular case. Sorry if > > > > > you find it annoying but I find it quite important. > > > > > > > > > > http://nitrohq.com/ still gives an error 404. > > > > > > > > > > -- > > > > > Cheers, > > > > > zimba > > > > > > > > > > http://zimba.oree.ch > > > > > > > > _______________________________________________ > > > > Nitro-general mailing list > > > > Nitro-general at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > -- > > > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > > > > > Jeff Wood > > > _______________________________________________ > > > Nitro-general mailing list > > > Nitro-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > -- > > Cheers, > > zimba > > > > http://zimba.oree.ch > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From george.moschovitis at gmail.com Thu Dec 1 03:14:52 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 1 Dec 2005 10:14:52 +0200 Subject: [Nitro] http://nitrohq.com => Error 404 In-Reply-To: <200512010136.19366.m.fellinger@gmail.com> References: <3ff63f9b0511301338j16ba2906s@mail.gmail.com> <3ff63f9b0511301614p41325502w@mail.gmail.com> <200512010136.19366.m.fellinger@gmail.com> Message-ID: The fact is that I always write www.xxxxxx.com Anyway, I fixed it so stop complaining ;-) regards, George. On 12/1/05, Michael Fellinger wrote: > Hey, > > Well, i pointed the same out a couple of times but somehow there was never > happening anything. > AFAIK george has some browser/whatever-plugin that appends the www. and so is > never forced to enter it... but i'm quite annoyed by this easy-to-fix > problem. (not to mention the times where i pointed people to the page and i > had to explain them that the official page of a web-framework doesn't get the > address right [right as in "as the user expects"]) > > well, didn't know about this historical piece of fact - but it only underlines > the need :) > > This should nonetheless only be a reminder - i want this topic to become large > enough to see it fixed soon... > but i know george is busy all day, so don't hurry - i give you another week ;) > > Sincerily > Michael > > Am Donnerstag, 1. Dezember 2005 01:14 schrieb zimba-tm: > > Hello, > > > > I know that this domain works when you append www. in front of it. I > > also tend to write a bit in the wiki when i can. > > > > Subdomains where initially created to point at various computers. In > > the "old age", the services like ftp, smtp, pop and http would all > > have their own machines, so it maked sense to use www. Because every > > subdomain would represent a computer. > > > > In the actual world, where reverse-proxy is the king, where http is > > the most common used protocol and subdomains are hijacked to represent > > different web-services, I think it makes sense to espect that a domain > > returns a valid http service. > > > > That's why i'm pointing this issue out. Do you type > > http://nitro.rubyforge.org or http://www.nitro.rubyforge.org ? If you > > look at microsoft ads, they tell you to go to microsoft.com, not > > www.microsoft.com. It's the same for nitrohq. > > > > Hmm, maybe this sounds too harsh. In any case, i'm just trying to give > > my opinion. > > > > Peace and long live nitro :-) > > > > On 01/12/05, Jeff Wood wrote: > > > ... the appropriate url is : http://www.nitrohq.com > > > > > > j. > > > > > > On 11/30/05, Lou Vanek wrote: > > > > try http://www.nitrohq.com/ > > > > > > > > zimba-tm wrote: > > > > > Hi George, > > > > > > > > > > I know i'm repeating myself a lot on this particular case. Sorry if > > > > > you find it annoying but I find it quite important. > > > > > > > > > > http://nitrohq.com/ still gives an error 404. > > > > > > > > > > -- > > > > > Cheers, > > > > > zimba > > > > > > > > > > http://zimba.oree.ch > > > > > > > > _______________________________________________ > > > > Nitro-general mailing list > > > > Nitro-general at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > -- > > > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > > > > > Jeff Wood > > > _______________________________________________ > > > Nitro-general mailing list > > > Nitro-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > -- > > Cheers, > > zimba > > > > http://zimba.oree.ch > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From zimba.tm at gmail.com Thu Dec 1 07:01:13 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Thu, 1 Dec 2005 13:01:13 +0100 Subject: [Nitro] http://nitrohq.com => Error 404 In-Reply-To: References: <3ff63f9b0511301338j16ba2906s@mail.gmail.com> <3ff63f9b0511301614p41325502w@mail.gmail.com> <200512010136.19366.m.fellinger@gmail.com> Message-ID: <3ff63f9b0512010401t24aaac3dj@mail.gmail.com> Wohoo, George capitulated :-) Thanks a lot George :-) On 01/12/05, George Moschovitis wrote: > The fact is that I always write www.xxxxxx.com > Anyway, I fixed it so stop complaining ;-) > > regards, > George. > > On 12/1/05, Michael Fellinger wrote: > > Hey, > > > > Well, i pointed the same out a couple of times but somehow there was never > > happening anything. > > AFAIK george has some browser/whatever-plugin that appends the www. and so is > > never forced to enter it... but i'm quite annoyed by this easy-to-fix > > problem. (not to mention the times where i pointed people to the page and i > > had to explain them that the official page of a web-framework doesn't get the > > address right [right as in "as the user expects"]) > > > > well, didn't know about this historical piece of fact - but it only underlines > > the need :) > > > > This should nonetheless only be a reminder - i want this topic to become large > > enough to see it fixed soon... > > but i know george is busy all day, so don't hurry - i give you another week ;) > > > > Sincerily > > Michael > > > > Am Donnerstag, 1. Dezember 2005 01:14 schrieb zimba-tm: > > > Hello, > > > > > > I know that this domain works when you append www. in front of it. I > > > also tend to write a bit in the wiki when i can. > > > > > > Subdomains where initially created to point at various computers. In > > > the "old age", the services like ftp, smtp, pop and http would all > > > have their own machines, so it maked sense to use www. Because every > > > subdomain would represent a computer. > > > > > > In the actual world, where reverse-proxy is the king, where http is > > > the most common used protocol and subdomains are hijacked to represent > > > different web-services, I think it makes sense to espect that a domain > > > returns a valid http service. > > > > > > That's why i'm pointing this issue out. Do you type > > > http://nitro.rubyforge.org or http://www.nitro.rubyforge.org ? If you > > > look at microsoft ads, they tell you to go to microsoft.com, not > > > www.microsoft.com. It's the same for nitrohq. > > > > > > Hmm, maybe this sounds too harsh. In any case, i'm just trying to give > > > my opinion. > > > > > > Peace and long live nitro :-) > > > > > > On 01/12/05, Jeff Wood wrote: > > > > ... the appropriate url is : http://www.nitrohq.com > > > > > > > > j. > > > > > > > > On 11/30/05, Lou Vanek wrote: > > > > > try http://www.nitrohq.com/ > > > > > > > > > > zimba-tm wrote: > > > > > > Hi George, > > > > > > > > > > > > I know i'm repeating myself a lot on this particular case. Sorry if > > > > > > you find it annoying but I find it quite important. > > > > > > > > > > > > http://nitrohq.com/ still gives an error 404. > > > > > > > > > > > > -- > > > > > > Cheers, > > > > > > zimba > > > > > > > > > > > > http://zimba.oree.ch > > > > > > > > > > _______________________________________________ > > > > > Nitro-general mailing list > > > > > Nitro-general at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > > > -- > > > > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > > > > > > > Jeff Wood > > > > _______________________________________________ > > > > Nitro-general mailing list > > > > Nitro-general at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > -- > > > Cheers, > > > zimba > > > > > > http://zimba.oree.ch > > > > > > _______________________________________________ > > > Nitro-general mailing list > > > Nitro-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > > > > > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- Cheers, zimba http://zimba.oree.ch From chris at motionpath.com Thu Dec 1 07:11:30 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Thu, 1 Dec 2005 12:11:30 +0000 Subject: [Nitro] http://nitrohq.com => Error 404 In-Reply-To: <3ff63f9b0512010401t24aaac3dj@mail.gmail.com> References: <3ff63f9b0511301338j16ba2906s@mail.gmail.com> <3ff63f9b0511301614p41325502w@mail.gmail.com> <200512010136.19366.m.fellinger@gmail.com> <3ff63f9b0512010401t24aaac3dj@mail.gmail.com> Message-ID: <4CB1413B-4370-4C41-92AE-693D83B3FF8D@motionpath.com> hehee, that was a big thread! ... with all the characters used in these emails we could have typed www. www. all year! ;-) /me secretly pleased I always lose the www subdomain Chris Farmiloe Design & Development. Motionpath Digital Media Ltd. St Georges road, Brighton, BN2 1ED. Office: 01273 608708 | Mobile: 07791 179481 On 1 Dec 2005, at 12:01, zimba-tm wrote: > Wohoo, George capitulated :-) > > Thanks a lot George :-) > > On 01/12/05, George Moschovitis wrote: >> The fact is that I always write www.xxxxxx.com >> Anyway, I fixed it so stop complaining ;-) >> >> regards, >> George. >> >> On 12/1/05, Michael Fellinger wrote: >>> Hey, >>> >>> Well, i pointed the same out a couple of times but somehow there >>> was never >>> happening anything. >>> AFAIK george has some browser/whatever-plugin that appends the >>> www. and so is >>> never forced to enter it... but i'm quite annoyed by this easy-to- >>> fix >>> problem. (not to mention the times where i pointed people to the >>> page and i >>> had to explain them that the official page of a web-framework >>> doesn't get the >>> address right [right as in "as the user expects"]) >>> >>> well, didn't know about this historical piece of fact - but it >>> only underlines >>> the need :) >>> >>> This should nonetheless only be a reminder - i want this topic to >>> become large >>> enough to see it fixed soon... >>> but i know george is busy all day, so don't hurry - i give you >>> another week ;) >>> >>> Sincerily >>> Michael >>> >>> Am Donnerstag, 1. Dezember 2005 01:14 schrieb zimba-tm: >>>> Hello, >>>> >>>> I know that this domain works when you append www. in front of >>>> it. I >>>> also tend to write a bit in the wiki when i can. >>>> >>>> Subdomains where initially created to point at various >>>> computers. In >>>> the "old age", the services like ftp, smtp, pop and http would all >>>> have their own machines, so it maked sense to use www. Because >>>> every >>>> subdomain would represent a computer. >>>> >>>> In the actual world, where reverse-proxy is the king, where http is >>>> the most common used protocol and subdomains are hijacked to >>>> represent >>>> different web-services, I think it makes sense to espect that a >>>> domain >>>> returns a valid http service. >>>> >>>> That's why i'm pointing this issue out. Do you type >>>> http://nitro.rubyforge.org or http://www.nitro.rubyforge.org ? >>>> If you >>>> look at microsoft ads, they tell you to go to microsoft.com, not >>>> www.microsoft.com. It's the same for nitrohq. >>>> >>>> Hmm, maybe this sounds too harsh. In any case, i'm just trying >>>> to give >>>> my opinion. >>>> >>>> Peace and long live nitro :-) >>>> >>>> On 01/12/05, Jeff Wood wrote: >>>>> ... the appropriate url is : http://www.nitrohq.com >>>>> >>>>> j. >>>>> >>>>> On 11/30/05, Lou Vanek wrote: >>>>>> try http://www.nitrohq.com/ >>>>>> >>>>>> zimba-tm wrote: >>>>>>> Hi George, >>>>>>> >>>>>>> I know i'm repeating myself a lot on this particular case. >>>>>>> Sorry if >>>>>>> you find it annoying but I find it quite important. >>>>>>> >>>>>>> http://nitrohq.com/ still gives an error 404. >>>>>>> >>>>>>> -- >>>>>>> Cheers, >>>>>>> zimba >>>>>>> >>>>>>> http://zimba.oree.ch >>>>>> >>>>>> _______________________________________________ >>>>>> Nitro-general mailing list >>>>>> Nitro-general at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/nitro-general >>>>> >>>>> -- >>>>> "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" >>>>> >>>>> Jeff Wood >>>>> _______________________________________________ >>>>> Nitro-general mailing list >>>>> Nitro-general at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/nitro-general >>>> >>>> -- >>>> Cheers, >>>> zimba >>>> >>>> http://zimba.oree.ch >>>> >>>> _______________________________________________ >>>> Nitro-general mailing list >>>> Nitro-general at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/nitro-general >>> >>> >>> _______________________________________________ >>> Nitro-general mailing list >>> Nitro-general at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/nitro-general >>> >>> >>> >>> >> >> >> -- >> http://www.gmosx.com >> http://www.navel.gr >> http://www.nitrohq.com >> >> _______________________________________________ >> Nitro-general mailing list >> Nitro-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/nitro-general >> > > > -- > Cheers, > zimba > > http://zimba.oree.ch > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051201/37256ebb/attachment.html From george.moschovitis at gmail.com Thu Dec 1 11:17:10 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 1 Dec 2005 18:17:10 +0200 Subject: [Nitro] Scaffolding / Admin Message-ID: If anyone has any nice suggestions about scaffolding and the admin part, now is the time to let me know ;-) I am redesigning both to make them more useful for my company's projects but a lot of people will like the new code too :) -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From zimba.tm at gmail.com Thu Dec 1 13:44:14 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Thu, 1 Dec 2005 19:44:14 +0100 Subject: [Nitro] Scaffolding / Admin In-Reply-To: References: Message-ID: <3ff63f9b0512011044q7880c80at@mail.gmail.com> Hi George, I effectively have some observations about the datatype conversions. Actually, if I understand well, a datatype is described by the ClassName passed in the property method. For example, class Item property :name, String property :price, Float property :data, File end There is one part in Og to map Ruby <-> SQL types. There are generic transformers in sql.rb for date, integer, etc... Then, those transformers can be overridden for the specific storages (sqlite, mysql, ...) On the other hand, the form helper will do the Ruby <-> Html conversion. I haven't looked into this really yet so I don't know how it works exactly. Finally, scaffolding makes use of the FormHelper in combination to the Og Entity you want to scaffold (with some magic inside). It take the files in public/scaffolding for the external design. This is what I understood by looking a little bit in the code. I did this, because I wanted to add new data types like File and URI. What i would like, is to be able to define a new class and it's different transformers easily. I'm also currently developping a javascript library that could take advantage of input's class names to automatically bind validation methods on client-side. Example html :
Example javascript : Element.add({ 'FORM' => Library.Form.Validating, 'FORM .email' => Library.Form.Email }) My Element library does a kind of mixin with an object and an html-node. It uses css-like queries to determine what node should be mixed with what. For example, 'FORM .email' looks for every element in that page with the class 'email' and which has a parentNode's type FORM. Defining an element's behavior is a simple as Library.Form.Validating = function() {} Library.Form.Validating.prototype = { onsubmit: function() { var elements = this.find('INPUT') var message = '' for(element is elements) { if (!element.is_valid()) { message += element.name + " is not valid \n" } } if (message.length > 0) { alert(message) return false } } } The javascript part is more or less working already. It's much lighter than the "prototype" js-lib. I already have dragging elements and various fancy stuff. I'm actually working on the "Ajax" part. It would be great if Nitro could take advantage of that library by mapping Ruby <-> Javascript data types in scaffolding. Finally, I wonder if we could also map Ruby <-> Request parameters. On 01/12/05, George Moschovitis wrote: > If anyone has any nice suggestions about scaffolding and the admin part, > now is the time to let me know ;-) I am redesigning both to make them > more useful > for my company's projects but a lot of people will like the new code too :) > > -g. > > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- Cheers, zimba http://zimba.oree.ch From transfire at gmail.com Thu Dec 1 22:25:32 2005 From: transfire at gmail.com (TRANS) Date: Thu, 1 Dec 2005 22:25:32 -0500 Subject: [Nitro] help with og! In-Reply-To: <3ff63f9b0511280448p1a3fc14ds@mail.gmail.com> References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> <3ff63f9b0511250057j17197f5n@mail.gmail.com> <4b6f054f0511250906oa84b154rd06c01e96d2fc0bf@mail.gmail.com> <3ff63f9b0511270251v469462c5o@mail.gmail.com> <3ff63f9b0511280448p1a3fc14ds@mail.gmail.com> Message-ID: <4b6f054f0512011925p575c4bf1yd5ebccd34b458896@mail.gmail.com> On 11/28/05, zimba-tm wrote: > The disadvantage I see to use attr, is that you can't specify the data > types. It would then be necessary to describe it somewhere else, like > in the constructor. Altrough, if a blank object can't be instanciated > without default parameters, then this cannot be done also. > > Any other ideas on this ? #attr can be overriden to allow for the annotations, in fact you may not realize it but they already are in Nitro/Og. The only difference between #property and #attr is that #property informs Og that the attribute exists for ORM-ing while #attr does not. The distinction is good in a way, in that a class can have an attribute that is not neccessariy mashalled to the database. Presently you can actually create a class in the normal Ruby way and then come back later and mixin the property information. This makes for nice SOC (seperation of concerns). If the other approach was taken, using just #attr methods, it would be neccessay to have a variant way to inform Og which instance varaibles should be, or at least should not be, mapped to the database. If you've ever used much YAML you'll know how it does this via the to_yaml_properties method --you'll need something like that. Given that most Og classes have all their instance vars mapped to the DB, it might actually be workable if there was just a simple way to _exclude_ instance vars if need be. That might be a simple as attr :x, :exclude => true or something. But since using #property is generally how the class gets "enchanted" an alternate way to do that would be needed as well, but it seems like the main idea of this in the first place is not to have to do anything special to the class, like 'include Enchanted' or something. T. From rainhead at gmail.com Fri Dec 2 05:22:12 2005 From: rainhead at gmail.com (Peter Abrahamsen) Date: Fri, 2 Dec 2005 02:22:12 -0800 Subject: [Nitro] Kirby unit test "already has index record" error Message-ID: <3E913801-3247-467C-9D87-A36FD6C0529D@gmail.com> Hi all, I'm learning to program by writing unit tests first. After a few stumbling blocks, I got it to work. Now, however, running the test throws a RuntimeError. I really can't find what I've changed since it was working. I'm using KirbyBase, and destruction is enabled. Below is the error and stack trace, followed by the test case. Any light would be greatly appreciated. Cheers, P >>> Loaded suite test/tc_model Started ./usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sql.rb:302: warning: already initialized constant OGTABLE E Finished in 0.233755 seconds. 1) Error: test_insertion(TestModel): RuntimeError: Table already has index record for recno: 1 /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/vendor/kirbybase.rb: 2670:in `add_index_rec' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/vendor/kirbybase.rb: 529:in `add_to_indexes' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/vendor/kirbybase.rb: 895:in `insert_record' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/vendor/kirbybase.rb: 1218:in `with_write_locked_table' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/vendor/kirbybase.rb: 882:in `insert_record' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/vendor/kirbybase.rb: 1631:in `insert' (eval):5:in `og_insert' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store.rb:100:in `save' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:14:in `save' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/test/testcase.rb: 46:in `og_fixture' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/test/testcase.rb: 45:in `og_fixture' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/test/testcase.rb: 42:in `og_fixture' test/tc_model.rb:15:in `setup' <<< >>> test/tc_model.rb require 'test/unit' require 'glue/fixture' require 'og/test' require 'src/model' class TestModel < Test::Unit::TestCase def setup @og = Og.setup( :destroy => true, :store => :kirby ) og_fixture Event end def test_all test_insertion end def test_insertion assert_equal 'Event Zero', @simple.title assert_equal 'The First Event', @simple.desc # Is this subject to locale changes? assert_equal Date.new(2005,12,24), @simple.date end end <<< -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2410 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051202/4688be31/attachment.bin From zimba.tm at gmail.com Fri Dec 2 05:40:00 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Fri, 2 Dec 2005 11:40:00 +0100 Subject: [Nitro] help with og! In-Reply-To: <4b6f054f0512011925p575c4bf1yd5ebccd34b458896@mail.gmail.com> References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> <3ff63f9b0511250057j17197f5n@mail.gmail.com> <4b6f054f0511250906oa84b154rd06c01e96d2fc0bf@mail.gmail.com> <3ff63f9b0511270251v469462c5o@mail.gmail.com> <3ff63f9b0511280448p1a3fc14ds@mail.gmail.com> <4b6f054f0512011925p575c4bf1yd5ebccd34b458896@mail.gmail.com> Message-ID: <3ff63f9b0512020240u7485b18cy@mail.gmail.com> On 02/12/05, TRANS wrote: > On 11/28/05, zimba-tm wrote: > > The disadvantage I see to use attr, is that you can't specify the data > > types. It would then be necessary to describe it somewhere else, like > > in the constructor. Altrough, if a blank object can't be instanciated > > without default parameters, then this cannot be done also. > > > > Any other ideas on this ? > > #attr can be overriden to allow for the annotations, in fact you may > not realize it but they already are in Nitro/Og. The only difference > between #property and #attr is that #property informs Og that the > attribute exists for ORM-ing while #attr does not. The distinction is > good in a way, in that a class can have an attribute that is not > neccessariy mashalled to the database. Do you have real-world examples that show it's really needed to have unstored attributes of an objet ? I think KirbyBase will store them all, but I might be wrong. > Presently you can actually create a class in the normal Ruby way and > then come back later and mixin the property information. This makes > for nice SOC (seperation of concerns). Yes this is pretty. I was thinking about another approach, where you tell Og store X to manage class XY or every class in a module. So all that would be needed is to give a module name to Og.setup. > If the other approach was taken, using just #attr methods, it would be > neccessay to have a variant way to inform Og which instance varaibles > should be, or at least should not be, mapped to the database. If > you've ever used much YAML you'll know how it does this via the > to_yaml_properties method --you'll need something like that. Given > that most Og classes have all their instance vars mapped to the DB, it > might actually be workable if there was just a simple way to _exclude_ > instance vars if need be. That might be a simple as > > attr :x, :exclude => true > > or something. But since using #property is generally how the class > gets "enchanted" an alternate way to do that would be needed as well, > but it seems like the main idea of this in the first place is not to > have to do anything special to the class, like 'include Enchanted' or > something. If "attr" would be used, it's better to not extend it. After all, the goal is to create classes that are not dependent of the ORM and if we need to extend attr, then there is no reason not to use "property". An alternative would be to rely on the constructor. I think an object should be instanciable with only default parameters. Maybe it's doesn't validate, but it should be instanciable. It's also usefull to create "empty" objects that can be stored in the sessions and filled by multiple form pages (using continuation?) unless they are valid and can be transferred in the database. So Og can create an empty object, and detect the attribute's types. What do you think of that idea ? -- Cheers, zimba http://zimba.oree.ch From rob at motionpath.com Fri Dec 2 12:33:05 2005 From: rob at motionpath.com (Rob Pitt) Date: Fri, 02 Dec 2005 17:33:05 +0000 Subject: [Nitro] OG automatically adding Foreign Key constraints In-Reply-To: <438DC7FA.80200@motionpath.com> References: <1133232446.6654.6.camel@helium.chiptech.local> <20051129144349.GF4547@localhost> <20051129144729.GG4547@localhost> <1133295301.6650.4.camel@helium.chiptech.local> <438DC7FA.80200@motionpath.com> Message-ID: <43908551.9010103@motionpath.com> The problem was that the old patch never added constraints to anything except join tables. Not only does this new patch do that, it is much simpler and if you have :evolve_schema_cautious set to false, it will automatically set values that are corrupt and prevent the constraints being added (left around from old deleted objects) to NULL. I have changed the naming scheme somewhat for the constraints. Since this is only really going to effect a few people and is unlikely to happen again I have not bloated Og out with code to clean this up. Instead, here is a script I knocked together (very quickly, I know it's horrible :)) that will strip a PostgreSQL database (or all PostgreSQL databases) on a system of foreign key constraints, then when you next re-launch Og it will re-add them. This will not change the data only constraints. I suggest anyone who uses Og with PostgreSQL runs this script on a database before using this new patch with it. Do not randomly run it on all databases unless you know what you are doing. It is safe to use with any Og only database store. It is interactive and will prompt you for which database to clean up. You need to fill out the options hash at the top of the script with the credentials for a database to connect to. Once connected, it will get a list of database available. This is *not* the database it will strip of constraints, the database here will not be changed. You will need to Rob Pitt wrote: >Please send me the smallest amount of code possible to reproduce this >problem (as a complete runnable nitro project) and I will fix it. > >Isaac Devine wrote: > > > >>On Tue, 2005-11-29 at 14:47 +0000, Tim Larson wrote: >> >> >> >> >>>On Tue, Nov 29, 2005 at 02:43:49PM +0000, Tim Larson wrote: >>> >>> >>> >>> >>>>On Tue, Nov 29, 2005 at 03:47:26PM +1300, Isaac Devine wrote: >>>> >>>> >>>> >>>> >>>>>When using belongs_to and has_many Og isn't generating Foreign Key >>>>>Constraints : >>>>> >>>>>class Example1 >>>>>property :name, String >>>>>has_many :children, Example2 >>>>>end >>>>> >>>>>class Example2 >>>>>property :address, String >>>>>belongs_to :parent, Example1 >>>>>end >>>>> >>>>>What am I doing wrong? >>>>>Failing that is there a way I specify the constraints? >>>>> >>>>> >>>>> >>>>> >>>>Because the relation name ":children" does not match the name of >>>>the related class "Example2" Og is getting lost...change your >>>>"has_many" line like this to give it the clue it needs: >>>> has_many :children, Example2, :foreign_name => :parent >>>> >>>> >>>> >>>> >>>I think my explanation was wrong...the problem is because the name of >>>relation ":children" does not match the name used in the belongs_to >>>relation ":parent", but you probably figured that out from the example >>>has_many line above. >>> >>> >>> >>> >>> >>Still doesn't work. FWIW I am using postgres and the Debug output is as >>follows (added a line to output the generated sql in psql.rb): >> >>D, [2005-11-30T08:46:30.383009 #6720] DEBUG -- : Og manageable classes: >>[Example2, Example1] >>D, [2005-11-30T08:46:30.408267 #6720] DEBUG -- : Generated sql: >>CREATE TABLE ogexample2 (parent_oid integer, address text, oid serial >>PRIMARY KEY) WITHOUT OIDS; >>NOTICE: CREATE TABLE will create implicit sequence "ogexample2_oid_seq" >>for "serial" column "ogexample2.oid" >>NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index >>"ogexample2_pkey" for table "ogexample2" >>I, [2005-11-30T08:46:30.456938 #6720] INFO -- : Created table >>'ogexample2'. >>D, [2005-11-30T08:46:30.479274 #6720] DEBUG -- : Generated sql: >>CREATE TABLE ogexample1 (name text, oid serial PRIMARY KEY) WITHOUT >>OIDS; >>NOTICE: CREATE TABLE will create implicit sequence "ogexample1_oid_seq" >>for "serial" column "ogexample1.oid" >>NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index >>"ogexample1_pkey" for table "ogexample1" >>I, [2005-11-30T08:46:30.493831 #6720] INFO -- : Created table >>'ogexample1'. >> >>thanks, >>Isaac >> >>_______________________________________________ >>Nitro-general mailing list >>Nitro-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/nitro-general >> >> >> >> > >_______________________________________________ >Nitro-general mailing list >Nitro-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/nitro-general > > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: kill-constraints.rb Url: http://rubyforge.org/pipermail/nitro-general/attachments/20051202/43a141a6/attachment.pl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: nitro.patch Url: http://rubyforge.org/pipermail/nitro-general/attachments/20051202/43a141a6/attachment-0001.pl From rob at motionpath.com Fri Dec 2 13:38:27 2005 From: rob at motionpath.com (rob) Date: Fri, 2 Dec 2005 18:38:27 +0000 Subject: [Nitro] OG automatically adding Foreign Key constraints In-Reply-To: <43908551.9010103@motionpath.com> References: <1133232446.6654.6.camel@helium.chiptech.local> <20051129144349.GF4547@localhost> <20051129144729.GG4547@localhost> <1133295301.6650.4.camel@helium.chiptech.local> <438DC7FA.80200@motionpath.com> <43908551.9010103@motionpath.com> Message-ID: On 2 Dec 2005, at 17:33, Rob Pitt wrote: > The problem was that the old patch never added constraints to > anything except join tables. Not only does this new patch do that, > it is much simpler and if you have :evolve_schema_cautious set to > false, it will automatically set values that are corrupt and > prevent the constraints being added (left around from old deleted > objects) to NULL. > > I have changed the naming scheme somewhat for the constraints. > Since this is only really going to effect a few people and is > unlikely to happen again I have not bloated Og out with code to > clean this up. Instead, here is a script I knocked together (very > quickly, I know it's horrible :)) that will strip a PostgreSQL > database (or all PostgreSQL databases) on a system of foreign key > constraints, then when you next re-launch Og it will re-add them. > > This will not change the data only constraints. I suggest anyone > who uses Og with PostgreSQL runs this script on a database before > using this new patch with it. Do not randomly run it on all > databases unless you know what you are doing. It is safe to use > with any Og only database store. > > It is interactive and will prompt you for which database to clean > up. You need to fill out the options hash at the top of the script > with the credentials for a database to connect to. Once connected, > it will get a list of database available. This is *not* the > database it will strip of constraints, the database here will not > be changed. > > I just looked at this from home on my apple mac and instead of attaching the attachments as attachments it appeared to have put them in the mail as text. I am not sure if this was the doing of Apple Mail (what I use at home) or Thunderbird (what I use at work). Would someone be so kind as to tell me if these attachments worked ok? From rob at motionpath.com Fri Dec 2 13:48:48 2005 From: rob at motionpath.com (rob) Date: Fri, 2 Dec 2005 18:48:48 +0000 Subject: [Nitro] OG automatically adding Foreign Key constraints In-Reply-To: References: <1133232446.6654.6.camel@helium.chiptech.local> <20051129144349.GF4547@localhost> <20051129144729.GG4547@localhost> <1133295301.6650.4.camel@helium.chiptech.local> <438DC7FA.80200@motionpath.com> <43908551.9010103@motionpath.com> Message-ID: <7A34D72F-7833-487B-8BC4-5E4077713086@motionpath.com> I just noticed a typo in one of the information messages (the second Logger.error is missing the word relations). I do not think this is worth re-sending the patch for (but will do if so requested) it should be changed if this is put into glycerin though. From dcorbin at machturtle.com Sat Dec 3 07:41:54 2005 From: dcorbin at machturtle.com (David Corbin) Date: Sat, 3 Dec 2005 07:41:54 -0500 Subject: [Nitro] help with og! In-Reply-To: <3ff63f9b0512020240u7485b18cy@mail.gmail.com> References: <4b6f054f0512011925p575c4bf1yd5ebccd34b458896@mail.gmail.com> <3ff63f9b0512020240u7485b18cy@mail.gmail.com> Message-ID: <200512030741.55027.dcorbin@machturtle.com> On Friday 02 December 2005 05:40 am, zimba-tm wrote: > On 02/12/05, TRANS wrote: > > On 11/28/05, zimba-tm wrote: > > > The disadvantage I see to use attr, is that you can't specify the data > > > types. It would then be necessary to describe it somewhere else, like > > > in the constructor. Altrough, if a blank object can't be instanciated > > > without default parameters, then this cannot be done also. > > > > > > Any other ideas on this ? > > > > #attr can be overriden to allow for the annotations, in fact you may > > not realize it but they already are in Nitro/Og. The only difference > > between #property and #attr is that #property informs Og that the > > attribute exists for ORM-ing while #attr does not. The distinction is > > good in a way, in that a class can have an attribute that is not > > neccessariy mashalled to the database. > > Do you have real-world examples that show it's really needed to have > unstored attributes of an objet ? I think KirbyBase will store them > all, but I might be wrong. Well, real world experience. We do it all the time where I work. It's a common optimization technique. Say a model object is responsible for generating a bitmap. You might want to only generate it once, on demand. > > > If the other approach was taken, using just #attr methods, it would be > > neccessay to have a variant way to inform Og which instance varaibles > > should be, or at least should not be, mapped to the database. If > > you've ever used much YAML you'll know how it does this via the > > to_yaml_properties method --you'll need something like that. Given > > that most Og classes have all their instance vars mapped to the DB, it > > might actually be workable if there was just a simple way to _exclude_ > > instance vars if need be. That might be a simple as > > > > attr :x, :exclude => true > > > > or something. But since using #property is generally how the class > > gets "enchanted" an alternate way to do that would be needed as well, > > but it seems like the main idea of this in the first place is not to > > have to do anything special to the class, like 'include Enchanted' or > > something. > > If "attr" would be used, it's better to not extend it. After all, the > goal is to create classes that are not dependent of the ORM and if we > need to extend attr, then there is no reason not to use "property". > > An alternative would be to rely on the constructor. I think an object > should be instanciable with only default parameters. Maybe it's > doesn't validate, but it should be instanciable. It's also usefull to > create "empty" objects that can be stored in the sessions and filled > by multiple form pages (using continuation?) unless they are valid and > can be transferred in the database. In an ideal world, it would be impossible to construct an invalid object. Some objects have no concept of 'default' parameters. It just doesn't make sense. From rob at motionpath.com Sat Dec 3 08:41:00 2005 From: rob at motionpath.com (rob) Date: Sat, 3 Dec 2005 13:41:00 +0000 Subject: [Nitro] help with og! In-Reply-To: <200512030741.55027.dcorbin@machturtle.com> References: <4b6f054f0512011925p575c4bf1yd5ebccd34b458896@mail.gmail.com> <3ff63f9b0512020240u7485b18cy@mail.gmail.com> <200512030741.55027.dcorbin@machturtle.com> Message-ID: <7CABC0EA-9966-460B-9767-8F6336FB4074@motionpath.com> I also make use of transient unstored attributes on objects and would be disappointed if this facility was not available. On 3 Dec 2005, at 12:41, David Corbin wrote: > On Friday 02 December 2005 05:40 am, zimba-tm wrote: >> On 02/12/05, TRANS wrote: >>> On 11/28/05, zimba-tm wrote: >>>> The disadvantage I see to use attr, is that you can't specify >>>> the data >>>> types. It would then be necessary to describe it somewhere else, >>>> like >>>> in the constructor. Altrough, if a blank object can't be >>>> instanciated >>>> without default parameters, then this cannot be done also. >>>> >>>> Any other ideas on this ? >>> >>> #attr can be overriden to allow for the annotations, in fact you may >>> not realize it but they already are in Nitro/Og. The only difference >>> between #property and #attr is that #property informs Og that the >>> attribute exists for ORM-ing while #attr does not. The >>> distinction is >>> good in a way, in that a class can have an attribute that is not >>> neccessariy mashalled to the database. >> >> Do you have real-world examples that show it's really needed to have >> unstored attributes of an objet ? I think KirbyBase will store them >> all, but I might be wrong. > > Well, real world experience. We do it all the time where I work. > It's a > common optimization technique. Say a model object is responsible for > generating a bitmap. You might want to only generate it once, on > demand. > >> >>> If the other approach was taken, using just #attr methods, it >>> would be >>> neccessay to have a variant way to inform Og which instance >>> varaibles >>> should be, or at least should not be, mapped to the database. If >>> you've ever used much YAML you'll know how it does this via the >>> to_yaml_properties method --you'll need something like that. Given >>> that most Og classes have all their instance vars mapped to the >>> DB, it >>> might actually be workable if there was just a simple way to >>> _exclude_ >>> instance vars if need be. That might be a simple as >>> >>> attr :x, :exclude => true >>> >>> or something. But since using #property is generally how the class >>> gets "enchanted" an alternate way to do that would be needed as >>> well, >>> but it seems like the main idea of this in the first place is not to >>> have to do anything special to the class, like 'include >>> Enchanted' or >>> something. >> >> If "attr" would be used, it's better to not extend it. After all, the >> goal is to create classes that are not dependent of the ORM and if we >> need to extend attr, then there is no reason not to use "property". >> >> An alternative would be to rely on the constructor. I think an object >> should be instanciable with only default parameters. Maybe it's >> doesn't validate, but it should be instanciable. It's also usefull to >> create "empty" objects that can be stored in the sessions and filled >> by multiple form pages (using continuation?) unless they are valid >> and >> can be transferred in the database. > > In an ideal world, it would be impossible to construct an invalid > object. Some > objects have no concept of 'default' parameters. It just doesn't > make sense. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From zimba.tm at gmail.com Sat Dec 3 13:52:45 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Sat, 3 Dec 2005 19:52:45 +0100 Subject: [Nitro] help with og! In-Reply-To: <200512030741.55027.dcorbin@machturtle.com> References: <4b6f054f0512011925p575c4bf1yd5ebccd34b458896@mail.gmail.com> <3ff63f9b0512020240u7485b18cy@mail.gmail.com> <200512030741.55027.dcorbin@machturtle.com> Message-ID: <3ff63f9b0512031052n195aad51q@mail.gmail.com> On 03/12/05, David Corbin wrote: > On Friday 02 December 2005 05:40 am, zimba-tm wrote: > > On 02/12/05, TRANS wrote: > > > On 11/28/05, zimba-tm wrote: > > Do you have real-world examples that show it's really needed to have > > unstored attributes of an objet ? I think KirbyBase will store them > > all, but I might be wrong. > > Well, real world experience. We do it all the time where I work. It's a > common optimization technique. Say a model object is responsible for > generating a bitmap. You might want to only generate it once, on demand. Ok, I think it's a valid point. > > An alternative would be to rely on the constructor. I think an object > > should be instanciable with only default parameters. Maybe it's > > doesn't validate, but it should be instanciable. It's also usefull to > > create "empty" objects that can be stored in the sessions and filled > > by multiple form pages (using continuation?) unless they are valid and > > can be transferred in the database. > > In an ideal world, it would be impossible to construct an invalid object. Some > objects have no concept of 'default' parameters. It just doesn't make sense. I don't agree with you. In a real world, defect objects are created and it doens't necessarily matter until you can't detect that they aren't In an ideal world, ruby would provide the facilities to specify an attribute's type instead of using property. So your classes are specifically built anyway. What difference between that and using 'default' parameters, except that the latter is at a language level ? -- Cheers, zimba http://zimba.oree.ch From dcorbin at machturtle.com Sat Dec 3 21:59:00 2005 From: dcorbin at machturtle.com (David Corbin) Date: Sat, 3 Dec 2005 21:59:00 -0500 Subject: [Nitro] help with og! In-Reply-To: <3ff63f9b0512031052n195aad51q@mail.gmail.com> References: <200512030741.55027.dcorbin@machturtle.com> <3ff63f9b0512031052n195aad51q@mail.gmail.com> Message-ID: <200512032159.00227.dcorbin@machturtle.com> On Saturday 03 December 2005 01:52 pm, zimba-tm wrote: > > In an ideal world, it would be impossible to construct an invalid object. > > Some objects have no concept of 'default' parameters. It just doesn't > > make sense. > > I don't agree with you. In a real world, defect objects are created > and it doens't necessarily matter until you can't detect that they > aren't I'm not 100% sure I understand you, and of course you're entitled to your view. But I think it is an important part of encapsulation for a given class to to be the only one that knows what has to be done to be 'valid'. If I have to do something after instantiating an object, than something else presumable knows what has to be done. > In an ideal world, ruby would provide the facilities to specify > an attribute's type instead of using property. Not in my ideal world. That would make things couple way too tightly. I don't want static typing. > So your classes are > specifically built anyway. What difference between that and using > 'default' parameters, except that the latter is at a language level ? As I said above, encapsulation. > > -- > Cheers, > zimba > > http://zimba.oree.ch > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From george.moschovitis at gmail.com Sun Dec 4 05:17:34 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 4 Dec 2005 12:17:34 +0200 Subject: [Nitro] OG automatically adding Foreign Key constraints In-Reply-To: <7A34D72F-7833-487B-8BC4-5E4077713086@motionpath.com> References: <1133232446.6654.6.camel@helium.chiptech.local> <20051129144349.GF4547@localhost> <20051129144729.GG4547@localhost> <1133295301.6650.4.camel@helium.chiptech.local> <438DC7FA.80200@motionpath.com> <43908551.9010103@motionpath.com> <7A34D72F-7833-487B-8BC4-5E4077713086@motionpath.com> Message-ID: Rob, can you please resend teh patch as a zipped bundle against the current glycerin? thanks in advance, -g. On 12/2/05, rob wrote: > I just noticed a typo in one of the information messages (the second > Logger.error is missing the word relations). I do not think this is > worth re-sending the patch for (but will do if so requested) it > should be changed if this is put into glycerin though. > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From rob at motionpath.com Mon Dec 5 04:45:09 2005 From: rob at motionpath.com (Rob Pitt) Date: Mon, 05 Dec 2005 09:45:09 +0000 Subject: [Nitro] OG automatically adding Foreign Key constraints In-Reply-To: References: <1133232446.6654.6.camel@helium.chiptech.local> <20051129144349.GF4547@localhost> <20051129144729.GG4547@localhost> <1133295301.6650.4.camel@helium.chiptech.local> <438DC7FA.80200@motionpath.com> <43908551.9010103@motionpath.com> <7A34D72F-7833-487B-8BC4-5E4077713086@motionpath.com> Message-ID: <43940C25.2000607@motionpath.com> Attached. George Moschovitis wrote: >Rob, > >can you please resend teh patch as a zipped bundle against the current glycerin? > >thanks in advance, >-g. > > > >On 12/2/05, rob wrote: > > >>I just noticed a typo in one of the information messages (the second >>Logger.error is missing the word relations). I do not think this is >>worth re-sending the patch for (but will do if so requested) it >>should be changed if this is put into glycerin though. >>_______________________________________________ >>Nitro-general mailing list >>Nitro-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/nitro-general >> >> >> > > >-- >http://www.gmosx.com >http://www.navel.gr >http://www.nitrohq.com > >_______________________________________________ >Nitro-general mailing list >Nitro-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/nitro-general > > -------------- next part -------------- A non-text attachment was scrubbed... Name: postgresql-patch.zip Type: application/octet-stream Size: 28923 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051205/005e2022/attachment.obj From tim at keow.org Mon Dec 5 09:48:08 2005 From: tim at keow.org (Tim Larson) Date: Mon, 5 Dec 2005 14:48:08 +0000 Subject: [Nitro] ajax update idea Message-ID: <20051205144808.GA4064@localhost> There is an idea from cocoon forms that you might want to consider: When they want to update one or more parts of a page at once using ajax, they have the ajax-updateable parts of the page pre-marked with id's so they can send an xml doc via ajax containing a list of chunks of html code wrapped in tags, and then they have a javascript library in the page that splashes each of these changes into place. Very handy, much easier and faster than having to do separate updates to change several areas of a page at the same time. --Tim Larson From transfire at gmail.com Mon Dec 5 11:07:13 2005 From: transfire at gmail.com (TRANS) Date: Mon, 5 Dec 2005 11:07:13 -0500 Subject: [Nitro] help with og! In-Reply-To: <3ff63f9b0512020240u7485b18cy@mail.gmail.com> References: <3ff63f9b0511250057j17197f5n@mail.gmail.com> <4b6f054f0511250906oa84b154rd06c01e96d2fc0bf@mail.gmail.com> <3ff63f9b0511270251v469462c5o@mail.gmail.com> <3ff63f9b0511280448p1a3fc14ds@mail.gmail.com> <4b6f054f0512011925p575c4bf1yd5ebccd34b458896@mail.gmail.com> <3ff63f9b0512020240u7485b18cy@mail.gmail.com> Message-ID: <4b6f054f0512050807h38b99171gab5824ebfcba0dd9@mail.gmail.com> > So Og can create an empty object, and detect the attribute's types. > What do you think of that idea ? If I understand what you're proposing... It's tricky. You still need a way to exclude/include attributes and if you depend soley on the type of the attribute itself what happens if its not the same type as the field in the DB? --which can happen if another object of same class had a different type of value for an attribute previously. T. From rob at motionpath.com Mon Dec 5 11:39:48 2005 From: rob at motionpath.com (Rob Pitt) Date: Mon, 05 Dec 2005 16:39:48 +0000 Subject: [Nitro] Patch to irb so Nitro::Element doesn't cause irb to crash Message-ID: <43946D54.2000104@motionpath.com> Tab-complete often causes irb to crash within Nitro projects as irb assumes that name will respond with the name of the class and Nitro::Element redefines it and changes it's expected parameters. The problem is more irb's fault as it should not assume name hasn't been modified. This patch will fix it. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: irb.patch Url: http://rubyforge.org/pipermail/nitro-general/attachments/20051205/b9d713b4/attachment.pl From zimba.tm at gmail.com Mon Dec 5 15:13:48 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Mon, 5 Dec 2005 21:13:48 +0100 Subject: [Nitro] help with og! In-Reply-To: <4b6f054f0512050807h38b99171gab5824ebfcba0dd9@mail.gmail.com> References: <3ff63f9b0511250057j17197f5n@mail.gmail.com> <4b6f054f0511250906oa84b154rd06c01e96d2fc0bf@mail.gmail.com> <3ff63f9b0511270251v469462c5o@mail.gmail.com> <3ff63f9b0511280448p1a3fc14ds@mail.gmail.com> <4b6f054f0512011925p575c4bf1yd5ebccd34b458896@mail.gmail.com> <3ff63f9b0512020240u7485b18cy@mail.gmail.com> <4b6f054f0512050807h38b99171gab5824ebfcba0dd9@mail.gmail.com> Message-ID: <3ff63f9b0512051213y2ef6bd31x@mail.gmail.com> On 05/12/05, TRANS wrote: > > So Og can create an empty object, and detect the attribute's types. > > What do you think of that idea ? > > If I understand what you're proposing... > > It's tricky. You still need a way to exclude/include attributes and if > you depend soley on the type of the attribute itself what happens if > its not the same type as the field in the DB? --which can happen if > another object of same class had a different type of value for an > attribute previously. Ok, you understood what I meant. I'm not sure it's an ideal solution, but I'm here to talk about it. Basically, here is how my idea would look like : class Item def initialize(*args) # or ( name='', price = 0.00, once = Type::Ignore ) @name = '' # or Type::String @price = 0.00 # or Type::Float @once = Type::Ignore end end Finally, what happens in the actual Og implementation when a data type given is not compatible with the database field format ? I see three possibilities : 1) Define transformations to the desired storage format 2) Dump the invalid data 3) Add a dump field to put the invalid data inside Cheers, zimba From humberaquino at gmail.com Wed Dec 7 11:42:05 2005 From: humberaquino at gmail.com (Humber Aquino) Date: Wed, 7 Dec 2005 13:42:05 -0300 Subject: [Nitro] Reference Documentation not working Message-ID: <37fd0c50512070842k5489eb53n1431de90d92772dd@mail.gmail.com> Hi everyone! >From the Reference documentation page I got an error page when any of this links are requested Nitro http://www.nitrohq.com/rdoc/nitro/index.html Og http://www.nitrohq.com/rdoc/og/index.html Glue http://www.nitrohq.com/rdoc/glue/index.html Gen http://www.nitrohq.com/rdoc/gen/index.html Regards :D Goku2 From jos at catnook.com Wed Dec 7 15:08:34 2005 From: jos at catnook.com (Jos Backus) Date: Wed, 7 Dec 2005 12:08:34 -0800 Subject: [Nitro] Og deep copy? Message-ID: <20051207200856.GA92416@lizzy.catnook.local> Say I have an application with order, order_line and item. order has one or more order_lines, and each order_line has one item. order_line refers to order and item, and is a dependent of order and item. Now say I have this requirement where I want to be able to create a new order with all its order_lines based on an existing order, where the existing order functions as a template. In this case I would want to copy the order plus all its dependents (and their dependents, if any). Since order_lines are dependents of orders I'd want to copy them, but not their associated items since order_lines are dependents of items, not the other way around. /--------\ | order1 | \--------/ /------\ \ | item | \ \------/ \ / \ 1:n / \ \ 1:1 | \ / | v v | /-------------\ | | order_line1 |\ | \-------------/| | \-------------/ | | | | copy -> | | V | | /--------\ | | order2 | / \--------/ / \ / \ / \ / 1:n / \ 1:1 \ / v v /-------------\ | order_line1 |\ \-------------/| \-------------/ Iow, I'm looking for a general way to do this type of selective deep copy using Og, exploiting Og's knowledge of the relationships between the objects. How would one go about doing this? -- Jos Backus jos at catnook.com From george.moschovitis at gmail.com Thu Dec 8 03:39:47 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 8 Dec 2005 10:39:47 +0200 Subject: [Nitro] Reference Documentation not working In-Reply-To: <37fd0c50512070842k5489eb53n1431de90d92772dd@mail.gmail.com> References: <37fd0c50512070842k5489eb53n1431de90d92772dd@mail.gmail.com> Message-ID: will be fixed... On 12/7/05, Humber Aquino wrote: > Hi everyone! > >From the Reference documentation page I got an error page when any of > this links are requested > > Nitro http://www.nitrohq.com/rdoc/nitro/index.html > Og http://www.nitrohq.com/rdoc/og/index.html > Glue http://www.nitrohq.com/rdoc/glue/index.html > Gen http://www.nitrohq.com/rdoc/gen/index.html > > Regards :D > > Goku2 > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From zimba.tm at gmail.com Thu Dec 8 04:31:07 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Thu, 8 Dec 2005 10:31:07 +0100 Subject: [Nitro] [bug] part/admin disappears Message-ID: <3ff63f9b0512080131h6ecc78e1t@mail.gmail.com> Hello, I'm playing with latest glycerin and encounter a mysterious problem. I run webrick, go to the admin page (I have included part/admin inrub.rb). Then I go to the root. Now if I want to go back to the admin,it has disappeared. The main page in rendered in it's place. --Cheers, zimba http://zimba.oree.ch From zimba.tm at gmail.com Thu Dec 8 06:14:32 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Thu, 8 Dec 2005 12:14:32 +0100 Subject: [Nitro] [bug] part/admin disappears In-Reply-To: <3ff63f9b0512080131h6ecc78e1t@mail.gmail.com> References: <3ff63f9b0512080131h6ecc78e1t@mail.gmail.com> Message-ID: <3ff63f9b0512080314x2025d905o@mail.gmail.com> Some precision... it only happens if you don't set Nitro::Server.map On 08/12/05, zimba-tm wrote:> Hello,>> I'm playing with latest glycerin and encounter a mysterious problem.>> I run webrick, go to the admin page (I have included part/admin in> rub.rb). Then I go to the root. Now if I want to go back to the admin,> it has disappeared. The main page in rendered in it's place.>> --> Cheers,> zimba>> http://zimba.oree.ch> --Cheers, zimba http://zimba.oree.ch From zimba.tm at gmail.com Thu Dec 8 08:54:39 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Thu, 8 Dec 2005 14:54:39 +0100 Subject: [Nitro] [bug glycerin] part/admin doesn't work with classes in modules Message-ID: <3ff63f9b0512080554p3a573ddcx@mail.gmail.com> Hello, the current scaffolding code doesn't work with classes in modules. Example : module Securitity class User property :name, String endend Scaffolding will generate an /admin/security::user/list url, which isnot available to the controller. I guess it's because he's looking ata method with the same name. --Cheers, zimba http://zimba.oree.ch From george.moschovitis at gmail.com Thu Dec 8 08:58:29 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 8 Dec 2005 15:58:29 +0200 Subject: [Nitro] [bug glycerin] part/admin doesn't work with classes in modules In-Reply-To: <3ff63f9b0512080554p3a573ddcx@mail.gmail.com> References: <3ff63f9b0512080554p3a573ddcx@mail.gmail.com> Message-ID: Can you prepare a test case for this? Please send test cases for reported bugs so when we fixe them we are sure they will not come back. -g. On 12/8/05, zimba-tm wrote: > Hello, > the current scaffolding code doesn't work with classes in modules. > Example : > module Securitity class User property :name, String endend > Scaffolding will generate an /admin/security::user/list url, which isnot available to the controller. I guess it's because he's looking ata method with the same name. > > --Cheers, zimba > http://zimba.oree.ch > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From james_b at neurogami.com Thu Dec 8 14:32:30 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 08 Dec 2005 12:32:30 -0700 Subject: [Nitro] Saprk with User Passwords Message-ID: <43988A4E.2090809@neurogami.com> I setting up a local group wiki and have Spark installed. I want to be able to restrict access to people who have a user name and password, and I believe Spark can do this, but I don't know what I need to configure. Am I correct? Does Spark let you restrict all editing access to only those people who have been given a user name and password? Any instructions on how to do this? Thanks, James Britt -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From george.moschovitis at gmail.com Fri Dec 9 03:59:32 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 9 Dec 2005 10:59:32 +0200 Subject: [Nitro] Saprk with User Passwords In-Reply-To: <43988A4E.2090809@neurogami.com> References: <43988A4E.2090809@neurogami.com> Message-ID: At the moment you can restrict some pages with a password. you can login: http://my.wiki.com/login and then you can set the read/write permissions on the wiki. It is extremely easy to add better support for authentication. I may add it in the near future, but you can try yourself ;-) -g. On 12/8/05, James Britt wrote: > I setting up a local group wiki and have Spark installed. I want to be > able to restrict access to people who have a user name and password, and > I believe Spark can do this, but I don't know what I need to configure. > > Am I correct? Does Spark let you restrict all editing access to only > those people who have been given a user name and password? Any > instructions on how to do this? > > > > Thanks, > > > > James Britt > > > -- > > http://www.ruby-doc.org - Ruby Help & Documentation > http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted > http://www.rubystuff.com - The Ruby Store for Ruby Stuff > http://www.jamesbritt.com - Playing with Better Toys > http://www.30secondrule.com - Building Better Tools > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From james_b at neurogami.com Fri Dec 9 11:24:52 2005 From: james_b at neurogami.com (James Britt) Date: Fri, 09 Dec 2005 09:24:52 -0700 Subject: [Nitro] Saprk with User Passwords In-Reply-To: References: <43988A4E.2090809@neurogami.com> Message-ID: <4399AFD4.8020702@neurogami.com> George Moschovitis wrote: > At the moment you can restrict some pages with a password. > you can login: > > http://my.wiki.com/login > > and then you can set the read/write permissions on the wiki. Interesting. After login, I just get sent to the Home page. If I go to the admin page, I see assorted info, but on way to edit anything. > > > It is extremely easy to add better support for authentication. I may > add it in the near future, but you can try yourself ;-) I may. I don't have much time to spend on this, and mainly need to get a wiki up fairly quick, with per-user passwords so I can keep tabs . Thanks, James -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From m.fellinger at gmail.com Sat Dec 10 11:06:34 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sat, 10 Dec 2005 17:06:34 +0100 Subject: [Nitro] RDOG - reloaded Message-ID: <200512101706.39527.m.fellinger@gmail.com> Hey List. After some tinkering i finally got around setting up rdog again on my server, using the latest release of spark and the documentation of glycerin. i'll add a auto-updating-script later on, so that all documentation is generated daily from the latest glycerin, i think this is the best method of providing our documentation and providing the people who write code-comments additional feedback. you can find it at http://rdog.manveru.net - there are lots of bugs still showing up, but i will try to fix them as soon as i find more time. ATM i'm glad that RDOG is up'n'running again since quite some people wanted to use it and provide additional doku. I'm not sure if we can integrate this concept into nitrohq at some point - but i definitly keep this option open - spark needs some minor changes to provide the functionality of rdog, but i find it definitly something we should think about. so far, RDOG provides all rdoc of the darcs-repo - including the examples and some things that maybe shouldn't find their way on the page... but on the other hand i like this approach since it gives you some information you wouldn't find otherwise (when you're searching for it) Also i intend to provide RDOG itself... i will upload it in the next time to rubyforge (the project for it exists already) together with NIXEL, that will become pretty mature when the new nitro-version is out (especially with new scaffolding) so... have fun playing with it :) manveru -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051210/87e5d4b2/attachment.bin From george.moschovitis at gmail.com Sun Dec 11 03:13:13 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 11 Dec 2005 10:13:13 +0200 Subject: [Nitro] RDOG - reloaded In-Reply-To: <200512101706.39527.m.fellinger@gmail.com> References: <200512101706.39527.m.fellinger@gmail.com> Message-ID: Michael, thanks for your efforts ;-) cant wait toseenixelon the rubyforge. -g. On 12/10/05, Michael Fellinger wrote: > Hey List. > > After some tinkering i finally got around setting up rdog again on my server, > using the latest release of spark and the documentation of glycerin. > i'll add a auto-updating-script later on, so that all documentation is > generated daily from the latest glycerin, i think this is the best method of > providing our documentation and providing the people who write code-comments > additional feedback. > you can find it at http://rdog.manveru.net - there are lots of bugs still > showing up, but i will try to fix them as soon as i find more time. ATM i'm > glad that RDOG is up'n'running again since quite some people wanted to use it > and provide additional doku. > > I'm not sure if we can integrate this concept into nitrohq at some point - but > i definitly keep this option open - spark needs some minor changes to provide > the functionality of rdog, but i find it definitly something we should think > about. > > so far, RDOG provides all rdoc of the darcs-repo - including the examples and > some things that maybe shouldn't find their way on the page... but on the > other hand i like this approach since it gives you some information you > wouldn't find otherwise (when you're searching for it) > > Also i intend to provide RDOG itself... i will upload it in the next time to > rubyforge (the project for it exists already) together with NIXEL, that will > become pretty mature when the new nitro-version is out (especially with new > scaffolding) > > so... have fun playing with it :) > manveru > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From ff1571 at gmail.com Sun Dec 11 13:49:59 2005 From: ff1571 at gmail.com (f f) Date: Sun, 11 Dec 2005 12:49:59 -0600 Subject: [Nitro] Problem running tutorial example Message-ID: <2a46192f0512111049s48d56d3ehe6d7b04d47a19ea3@mail.gmail.com> I'm trying to go through the Nitro In Flamestutorial. But when I try the example, I get this todo $ ./run.rb D, [2005-12-11T12:45:07.970550 #11898] DEBUG -- : Table for 'Item' already exists! D, [2005-12-11T12:45:07.995750 #11898] DEBUG -- : Table for 'TodoList' already exists! /usr/lib/ruby/gems/1.8/gems/nitro-0.25.0/lib/../src/part/admin/controller.rb:38:in `add_security': uninitialized constant Class::Runner (NameError) from /usr/lib/ruby/gems/1.8/gems/nitro-0.25.0/lib/../src/part/admin/controller.rb:28:in `mounted' from /usr/lib/ruby/gems/1.8/gems/nitro-0.25.0/lib/nitro/dispatcher.rb:93:in `mount' from /usr/lib/ruby/gems/1.8/gems/nitro-0.25.0/lib/nitro/dispatcher.rb:83:in `each' from /usr/lib/ruby/gems/1.8/gems/nitro-0.25.0/lib/nitro/dispatcher.rb:83:in `mount' from /usr/lib/ruby/gems/1.8/gems/nitro-0.25.0/lib/nitro/dispatcher.rb:57:in `initialize' from /usr/lib/ruby/gems/1.8/gems/nitro-0.25.0/lib/nitro/server.rb:89:in `new' from /usr/lib/ruby/gems/1.8/gems/nitro-0.25.0/lib/nitro/server.rb:89:in `start' from /usr/lib/ruby/gems/1.8/gems/nitro-0.25.0/lib/nitro/server.rb:121:in `run' from /usr/lib/ruby/gems/1.8/gems/nitro-0.25.0/lib/nitro.rb:68:in `run' from ./run.rb:13 I looked at the controller.rb file but it didn't have any information that would help me fix this. Fred -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051211/34c274cc/attachment.html From zimba.tm at gmail.com Sun Dec 11 17:57:06 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Sun, 11 Dec 2005 23:57:06 +0100 Subject: [Nitro] RDOG - reloaded In-Reply-To: <200512101706.39527.m.fellinger@gmail.com> References: <200512101706.39527.m.fellinger@gmail.com> Message-ID: <3ff63f9b0512111457v29e410cai@mail.gmail.com> Congratulations manveru ! I'm very happy you managed to bring rdog back :-) --Cheers, zimba http://zimba.oree.ch From transfire at gmail.com Sun Dec 11 19:12:15 2005 From: transfire at gmail.com (TRANS) Date: Sun, 11 Dec 2005 19:12:15 -0500 Subject: [Nitro] help with og! In-Reply-To: <3ff63f9b0512051213y2ef6bd31x@mail.gmail.com> References: <4b6f054f0511250906oa84b154rd06c01e96d2fc0bf@mail.gmail.com> <3ff63f9b0511270251v469462c5o@mail.gmail.com> <3ff63f9b0511280448p1a3fc14ds@mail.gmail.com> <4b6f054f0512011925p575c4bf1yd5ebccd34b458896@mail.gmail.com> <3ff63f9b0512020240u7485b18cy@mail.gmail.com> <4b6f054f0512050807h38b99171gab5824ebfcba0dd9@mail.gmail.com> <3ff63f9b0512051213y2ef6bd31x@mail.gmail.com> Message-ID: <4b6f054f0512111612k276b1c81p6332401b74345500@mail.gmail.com> On 12/5/05, zimba-tm wrote: > On 05/12/05, TRANS wrote: > > > So Og can create an empty object, and detect the attribute's types. > > > What do you think of that idea ? > > > > If I understand what you're proposing... > > > > It's tricky. You still need a way to exclude/include attributes and if > > you depend soley on the type of the attribute itself what happens if > > its not the same type as the field in the DB? --which can happen if > > another object of same class had a different type of value for an > > attribute previously. > > Ok, you understood what I meant. I'm not sure it's an ideal solution, > but I'm here to talk about it. > > Basically, here is how my idea would look like : > > class Item > def initialize(*args) # or ( name='', price = 0.00, once = Type::Ignore ) > @name = '' # or Type::String > @price = 0.00 # or Type::Float > @once = Type::Ignore > end > end Well, the Type::Ignore won't do. But you could still use an annotation. ann "@once", :og_ignore => true The annotations systems used by Og is completely free form, so attributes can be annotated just as easily as methods. And recall there's other info related to SQL that has to be given at times too, like default values, or if a field is indexed, etc. > Finally, what happens in the actual Og implementation when a data type > given is not compatible with the database field format ? I see three > possibilities : > > 1) Define transformations to the desired storage format That's reasonable, but can't count for every possibility. > 2) Dump the invalid data > 3) Add a dump field to put the invalid data inside These is too relaxed. I think if #1 fails it should rollback and raise an error. It's an interesting approach and yes, I think it could work. But details would have to be worked out. Yet it's quite different from how Og works now. So the other question to ask, is such a change warranted? From transfire at gmail.com Sun Dec 11 19:13:32 2005 From: transfire at gmail.com (TRANS) Date: Sun, 11 Dec 2005 19:13:32 -0500 Subject: [Nitro] ORM perspectives In-Reply-To: <4b6f054f0512111601y51fe104bx488d940787d56b87@mail.gmail.com> References: <4b6f054f0512111601y51fe104bx488d940787d56b87@mail.gmail.com> Message-ID: <4b6f054f0512111613s57154c65v8d391cbb0f47413d@mail.gmail.com> Might be interested in this: http://www.onjava.com/pub/a/onjava/2005/12/07/relational-object-mapping.html T. From zimba.tm at gmail.com Mon Dec 12 08:01:41 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Mon, 12 Dec 2005 14:01:41 +0100 Subject: [Nitro] help with og! In-Reply-To: <4b6f054f0512111612k276b1c81p6332401b74345500@mail.gmail.com> References: <4b6f054f0511250906oa84b154rd06c01e96d2fc0bf@mail.gmail.com> <3ff63f9b0511270251v469462c5o@mail.gmail.com> <3ff63f9b0511280448p1a3fc14ds@mail.gmail.com> <4b6f054f0512011925p575c4bf1yd5ebccd34b458896@mail.gmail.com> <3ff63f9b0512020240u7485b18cy@mail.gmail.com> <4b6f054f0512050807h38b99171gab5824ebfcba0dd9@mail.gmail.com> <3ff63f9b0512051213y2ef6bd31x@mail.gmail.com> <4b6f054f0512111612k276b1c81p6332401b74345500@mail.gmail.com> Message-ID: <3ff63f9b0512120501i2dda1a53h@mail.gmail.com> Thanks for your feedback TRANS, you've raised interesting points IMHO. In general, I think the idea is to avoid the "definition" step otherframeworks have. Like Hibernate with it's XML data. To do this, werely on the native ruby language. With smart defaults and good fallbacks like you mentioned, using thelanguage to define the objects, it's possible to avoid most cases. Andwith ruby's class reopening feature, it's possible to define them inanother file. Also, the glue/nano/facets framework is a nice idea, because it's notdependent of Og. So any other ORM that use them, can implement Ogobjects. In that sense, using "ann" is a good idea I think. I see thatas an extension to the language that is necessary for that particularcase. On 12/12/05, TRANS wrote:> It's an interesting approach and yes, I think it could work. But> details would have to be worked out. Yet it's quite different from how> Og works now. So the other question to ask, is such a change> warranted? Did you mean "wanted" instead of "warranted" ? In any cases, I proposeto start a wiki page with some mockups. I'm also starting tounderstand the framework better so it becomes easier for me toimplement an Og2 or something. --Cheers, zimba http://zimba.oree.ch From transfire at gmail.com Mon Dec 12 09:23:09 2005 From: transfire at gmail.com (TRANS) Date: Mon, 12 Dec 2005 09:23:09 -0500 Subject: [Nitro] help with og! In-Reply-To: <3ff63f9b0512120501i2dda1a53h@mail.gmail.com> References: <3ff63f9b0511270251v469462c5o@mail.gmail.com> <3ff63f9b0511280448p1a3fc14ds@mail.gmail.com> <4b6f054f0512011925p575c4bf1yd5ebccd34b458896@mail.gmail.com> <3ff63f9b0512020240u7485b18cy@mail.gmail.com> <4b6f054f0512050807h38b99171gab5824ebfcba0dd9@mail.gmail.com> <3ff63f9b0512051213y2ef6bd31x@mail.gmail.com> <4b6f054f0512111612k276b1c81p6332401b74345500@mail.gmail.com> <3ff63f9b0512120501i2dda1a53h@mail.gmail.com> Message-ID: <4b6f054f0512120623j734df3f4ke520f8bd6e0b6e4f@mail.gmail.com> > In any cases, I proposeto start a wiki page with some mockups. I'm also starting > tounderstand the framework better so it becomes easier for me toimplement an > Og2 or something. That's an excellent idea! Keep me posted. Thanks, T. From george.moschovitis at gmail.com Mon Dec 12 09:34:00 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 12 Dec 2005 16:34:00 +0200 Subject: [Nitro] help with og! In-Reply-To: <4b6f054f0512120623j734df3f4ke520f8bd6e0b6e4f@mail.gmail.com> References: <3ff63f9b0511280448p1a3fc14ds@mail.gmail.com> <4b6f054f0512011925p575c4bf1yd5ebccd34b458896@mail.gmail.com> <3ff63f9b0512020240u7485b18cy@mail.gmail.com> <4b6f054f0512050807h38b99171gab5824ebfcba0dd9@mail.gmail.com> <3ff63f9b0512051213y2ef6bd31x@mail.gmail.com> <4b6f054f0512111612k276b1c81p6332401b74345500@mail.gmail.com> <3ff63f9b0512120501i2dda1a53h@mail.gmail.com> <4b6f054f0512120623j734df3f4ke520f8bd6e0b6e4f@mail.gmail.com> Message-ID: Zimba, can you please repeat clearly what exactly you are proposing? I haven't followed this thread, and i would really appreciatedon small, clear paragraph that explains your idea. thanks in advance, George. On 12/12/05, TRANS wrote: > > In any cases, I proposeto start a wiki page with some mockups. I'm also starting > tounderstand the framework better so it becomes easier for me toimplement an > Og2 or something. > > That's an excellent idea! Keep me posted. > > Thanks, > T. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From zimba.tm at gmail.com Mon Dec 12 11:30:14 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Mon, 12 Dec 2005 17:30:14 +0100 Subject: [Nitro] help with og! In-Reply-To: References: <3ff63f9b0511280448p1a3fc14ds@mail.gmail.com> <4b6f054f0512011925p575c4bf1yd5ebccd34b458896@mail.gmail.com> <3ff63f9b0512020240u7485b18cy@mail.gmail.com> <4b6f054f0512050807h38b99171gab5824ebfcba0dd9@mail.gmail.com> <3ff63f9b0512051213y2ef6bd31x@mail.gmail.com> <4b6f054f0512111612k276b1c81p6332401b74345500@mail.gmail.com> <3ff63f9b0512120501i2dda1a53h@mail.gmail.com> <4b6f054f0512120623j734df3f4ke520f8bd6e0b6e4f@mail.gmail.com> Message-ID: <3ff63f9b0512120830x2d3cff36n@mail.gmail.com> Hi George, like I said, I'm going to build a wiki page to enlighten/specify the idea.I hope to have time tonight, otherwise tomorrow.I'll post on this thread to let you know when it's done. On 12/12/05, George Moschovitis wrote:> Zimba,>> can you please repeat clearly what exactly you are proposing? I> haven't followed this thread, and i would really appreciatedon small,> clear paragraph that explains your idea.>> thanks in advance,> George.>> On 12/12/05, TRANS wrote:> > > In any cases, I proposeto start a wiki page with some mockups. I'm also starting > tounderstand the framework better so it becomes easier for me toimplement an > Og2 or something.> >> > That's an excellent idea! Keep me posted.> >> > Thanks,> > T.> >> > _______________________________________________> > Nitro-general mailing list> > Nitro-general at rubyforge.org> > http://rubyforge.org/mailman/listinfo/nitro-general> >>>> --> http://www.gmosx.com> http://www.navel.gr> http://www.nitrohq.com>> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general> --Cheers, zimba http://zimba.oree.ch From chris at motionpath.com Mon Dec 12 11:41:52 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Mon, 12 Dec 2005 16:41:52 +0000 Subject: [Nitro] help with og! In-Reply-To: References: <3ff63f9b0511280448p1a3fc14ds@mail.gmail.com> <4b6f054f0512011925p575c4bf1yd5ebccd34b458896@mail.gmail.com> <3ff63f9b0512020240u7485b18cy@mail.gmail.com> <4b6f054f0512050807h38b99171gab5824ebfcba0dd9@mail.gmail.com> <3ff63f9b0512051213y2ef6bd31x@mail.gmail.com> <4b6f054f0512111612k276b1c81p6332401b74345500@mail.gmail.com> <3ff63f9b0512120501i2dda1a53h@mail.gmail.com> <4b6f054f0512120623j734df3f4ke520f8bd6e0b6e4f@mail.gmail.com> Message-ID: > ... i would really appreciatedon small, > clear paragraph that explains your idea. Me3... looking forward to wiki page From zimba.tm at gmail.com Mon Dec 12 11:44:32 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Mon, 12 Dec 2005 17:44:32 +0100 Subject: [Nitro] ORM perspectives In-Reply-To: <4b6f054f0512111613s57154c65v8d391cbb0f47413d@mail.gmail.com> References: <4b6f054f0512111601y51fe104bx488d940787d56b87@mail.gmail.com> <4b6f054f0512111613s57154c65v8d391cbb0f47413d@mail.gmail.com> Message-ID: <3ff63f9b0512120844k3dc20610o@mail.gmail.com> This article talks about Amber. It looks like they took the sameapproach as rail's ActiveRecord for Java. On 12/12/05, TRANS wrote:> Might be interested in this:>> http://www.onjava.com/pub/a/onjava/2005/12/07/relational-object-mapping.html>> T.>> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general> --Cheers, zimba http://zimba.oree.ch From riku.raisanen at walkingwoods.com Mon Dec 12 12:09:33 2005 From: riku.raisanen at walkingwoods.com (Riku =?iso-8859-1?q?R=E4is=E4nen?=) Date: Mon, 12 Dec 2005 19:09:33 +0200 Subject: [Nitro] I got rid of deadlocks Message-ID: <200512121909.34099.riku.raisanen@walkingwoods.com> I was plagued by deadlocks while using the sqlite store untill today. Just a little google magic and found the reason and the fix, see http://www.nitrohq.com/view/Stores/Og Only thing that bothers me is that it was found on the Rails site ;< From zimba.tm at gmail.com Mon Dec 12 13:06:41 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Mon, 12 Dec 2005 19:06:41 +0100 Subject: [Nitro] [bug glycerin] part/admin doesn't work with classes in modules In-Reply-To: References: <3ff63f9b0512080554p3a573ddcx@mail.gmail.com> Message-ID: <3ff63f9b0512121006r67a5e971q@mail.gmail.com> Hi George, sorry it took so long to answer. I have tried to build a test case, but I encountered various problems. First of all, the tests didn't work at all (I think it's because of my environment) Also, I don't know how to simulate the Nitro.run. I have seen that you use a Dispatch object somewhere else, but I'm not sure how to reproduce this. I have joined the incomplete test case to this e-mail. I have stipped to the bare minimum my application to reproduce the problem. The test-case should be showing it. Hope this helps at least a little On 08/12/05, George Moschovitis wrote: > Can you prepare a test case for this? > Please send test cases for reported bugs so when we fixe them we are > sure they will not come back. > > > -g. > > On 12/8/05, zimba-tm wrote: > > Hello, > > the current scaffolding code doesn't work with classes in modules. > > Example : > > module Securitity class User property :name, String endend > > Scaffolding will generate an /admin/security::user/list url, which isnot available to the controller. I guess it's because he's looking ata method with the same name. > > > > --Cheers, zimba > > http://zimba.oree.ch > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- Cheers, zimba http://zimba.oree.ch -------------- next part -------------- A non-text attachment was scrubbed... Name: tc_admin.rb Type: application/x-ruby Size: 494 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051212/bd026692/attachment.bin From tim at keow.org Mon Dec 12 14:47:46 2005 From: tim at keow.org (Tim Larson) Date: Mon, 12 Dec 2005 19:47:46 +0000 Subject: [Nitro] transform_template -> block Message-ID: <20051212194746.GE25600@localhost> Is there something like Nitro::Compiler.new.transform_template that instead of producing a textual chunk of code produces a block/lambda/whatever that can accept parameters? --Tim Larson From tim at keow.org Mon Dec 12 16:18:19 2005 From: tim at keow.org (Tim Larson) Date: Mon, 12 Dec 2005 21:18:19 +0000 Subject: [Nitro] transform_template -> block In-Reply-To: <20051212194746.GE25600@localhost> References: <20051212194746.GE25600@localhost> Message-ID: <20051212211819.GF25600@localhost> On Mon, Dec 12, 2005 at 07:47:46PM +0000, Tim Larson wrote: > Is there something like Nitro::Compiler.new.transform_template > that instead of producing a textual chunk of code produces a > block/lambda/whatever that can accept parameters? Not perfect (note '@out ||='', etc.), but I have this so far: @@some_name = instance_eval( "lambda do |param1, param2|; @out ||= '';" + Nitro::Compiler.new.transform_template(%{ blah, blah, blah... }) + ";@out end" ...used later with: #{@@some_name.call('foo', 'bar')} --Tim Larson From zimba.tm at gmail.com Mon Dec 12 17:54:11 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Mon, 12 Dec 2005 23:54:11 +0100 Subject: [Nitro] help with og! In-Reply-To: References: <4b6f054f0512011925p575c4bf1yd5ebccd34b458896@mail.gmail.com> <3ff63f9b0512020240u7485b18cy@mail.gmail.com> <4b6f054f0512050807h38b99171gab5824ebfcba0dd9@mail.gmail.com> <3ff63f9b0512051213y2ef6bd31x@mail.gmail.com> <4b6f054f0512111612k276b1c81p6332401b74345500@mail.gmail.com> <3ff63f9b0512120501i2dda1a53h@mail.gmail.com> <4b6f054f0512120623j734df3f4ke520f8bd6e0b6e4f@mail.gmail.com> Message-ID: <3ff63f9b0512121454v36ef9c78m@mail.gmail.com> Ok, everybody wants a wiki page so instead of doing the work I shouldhave done, here it is : http://www.nitrohq.com/view/OgRevisited I'm still not sure it's a good idea, but I think there are interestingthings in it. Because I'm not very good in English, I used a lot ofexample code. It makes things also more concrete. Finally, let's take this discussion on another thread. I'll call itOgRevisited like my page. On 12/12/05, Chris Farmiloe wrote:> > ... i would really appreciatedon small,> > clear paragraph that explains your idea.>> Me3... looking forward to wiki page> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general> --Cheers, zimba http://zimba.oree.ch From zimba.tm at gmail.com Mon Dec 12 17:59:11 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Mon, 12 Dec 2005 23:59:11 +0100 Subject: [Nitro] OgRevisited Message-ID: <3ff63f9b0512121459m6e3d55f4q@mail.gmail.com> http://www.nitrohq.com/view/OgRevisited This page summarizes some ideas I had about Og while looking troughthe code and thinking. I'm not sure it's the right way to go. My approach it to describe theusage of that library and go step by step deeper until we have animplementation. This gives a very pragmatic view of the thing aschoices are not dictated by the implementation. If you want to play with me, come on and join the wiki page :-) --Cheers, zimba http://zimba.oree.ch From epiperak at softlab.ece.ntua.gr Tue Dec 13 01:10:46 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 13 Dec 2005 08:10:46 +0200 (EET) Subject: [Nitro] in... vain... Message-ID: Dear list, I have posted the same problem in the past, and I have been reassured that in 0.25 it would be fixed... here is a bit of code that illustrates the problem... 1 require 'rubygems' 2 require 'og' 3 4 # Model 5 class Foo 6 property :name, String 7 has_many Bar 8 end 9 10 class Bar 11 property :name, String 12 belongs_to Foo 13 has_many Foobar 14 end 15 16 class Foobar 17 property :name, String 18 belongs_to Bar 19 end 20 21 # Init 22 Og.setup( 23 :destroy => true, 24 :store => :sqlite, 25 :name => 'test' 26 ) 27 28 # preparing Tests 29 30 2.times{|i| 31 foo = Foo.new 32 foo.name = "foo #{i}" 33 foo.save 34 } 35 Foo.all.length 36 37 3.times{|i| 38 bar = Bar.new 39 bar.name = "bar #{i}" 40 bar.save 41 } 42 Bar.all.length 43 44 6.times{|i| 45 foobar = Foobar.new 46 foobar.name = "foobar #{i}" 47 foobar.save 48 } 49 Foobar.all.length 50 51 foo1 = Foo[1] 52 bar1 = Bar[1] 53 bar1.add_foobar Foobar[1] 54 bar1.add_foobar Foobar[2] 55 bar1.add_foobar Foobar[3] 56 bar1.save 57 foo1.add_bar bar1 58 foo1.save 59 60 foo2 = Foo[2] 61 bar2 = Bar[2] 62 bar3 = Bar[3] 63 bar2.add_foobar Foobar[4] 64 bar3.add_foobar Foobar[5] 65 bar3.add_foobar Foobar[6] 66 bar2.save 67 bar3.save 68 foo2.add_bar bar2 69 foo2.add_bar bar3 70 foo2.save 71 72 # this work... 73 ar = Array.new 74 foo1.bars.each {|ii| 75 ar.push(ii.foobars) 76 } 77 78 ar.flatten! 79 ar.size 80 81 # next line should work, but it does not 82 foo_foobars = foo1.bars.foobars 83 foo_foobars.class even though foo1.bars is a collection foo1.bars.foobars does not work, nor foo1.bars.find_foobars G? Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From george.moschovitis at gmail.com Tue Dec 13 04:51:15 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 13 Dec 2005 11:51:15 +0200 Subject: [Nitro] OgRevisited In-Reply-To: <3ff63f9b0512121459m6e3d55f4q@mail.gmail.com> References: <3ff63f9b0512121459m6e3d55f4q@mail.gmail.com> Message-ID: looks interesting... -g. On 12/13/05, zimba-tm wrote: > http://www.nitrohq.com/view/OgRevisited > This page summarizes some ideas I had about Og while looking troughthe code and thinking. > I'm not sure it's the right way to go. My approach it to describe theusage of that library and go step by step deeper until we have animplementation. This gives a very pragmatic view of the thing aschoices are not dictated by the implementation. > If you want to play with me, come on and join the wiki page :-) > --Cheers, zimba > http://zimba.oree.ch > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From tim at keow.org Tue Dec 13 10:40:30 2005 From: tim at keow.org (Tim Larson) Date: Tue, 13 Dec 2005 15:40:30 +0000 Subject: [Nitro] transform_template -> block In-Reply-To: <20051212211819.GF25600@localhost> References: <20051212194746.GE25600@localhost> <20051212211819.GF25600@localhost> Message-ID: <20051213154029.GG25600@localhost> On Mon, Dec 12, 2005 at 09:18:19PM +0000, Tim Larson wrote: > On Mon, Dec 12, 2005 at 07:47:46PM +0000, Tim Larson wrote: > > Is there something like Nitro::Compiler.new.transform_template > > that instead of producing a textual chunk of code produces a > > block/lambda/whatever that can accept parameters? Refined the solution a bit, got rid of the trouble with a shared @out by using nil.instance_eval: def self.template(params, str) nil.instance_eval %{ lambda do |#{params}| @out='' #{Nitro::Compiler.new.transform_template(str)} @out end } end #Define a template piece: @@some_name = template 'param1, param2', %{ Hello, World! I was passed \#{param2}. } #Use it within another template piece: #{@@some_name.call 2, 'foo'} It will be compiled only when the source file is touched, and run as full speed ruby code when it is invoked. The next question is if it is better to make lambdas or methods...opinions? --Tim Larson From tim at keow.org Tue Dec 13 15:47:15 2005 From: tim at keow.org (Tim Larson) Date: Tue, 13 Dec 2005 20:47:15 +0000 Subject: [Nitro] transform_template -> block In-Reply-To: <20051213154029.GG25600@localhost> References: <20051212194746.GE25600@localhost> <20051212211819.GF25600@localhost> <20051213154029.GG25600@localhost> Message-ID: <20051213204715.GH25600@localhost> On Tue, Dec 13, 2005 at 03:40:30PM +0000, Tim Larson wrote: > ...The next question is if it is better > to make lambdas or methods...opinions? Here is the method version: # Note: Do not pass a name ending in '_action' or '_template' # as such methods get automatically deleted on a regular basis. def self.temp(name, parameters, body) class_eval %{ private def #{name}(#{parameters}) out, @out = @out, '' #{Nitro::Compiler.new.transform_template(body)} out, @out = @out, out out end } end #Define a template piece: temp 'some_name', 'param1, param2', %{ Hello, World! I was passed \#{param2}. } #Use it within another template piece: #{some_name 2, 'foo'} --Tim Larson From george.moschovitis at gmail.com Wed Dec 14 07:09:05 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 14 Dec 2005 14:09:05 +0200 Subject: [Nitro] 0.26.0 preview Message-ID: Dear devs, I would like to ask you to grab the latest version from the repository and report any bugs, or problems. I would like to release 0.26.0 later today or tommorow. thanks in advance, -g. PS: especially test with psql and mysql. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From james_b at neurogami.com Wed Dec 14 16:06:12 2005 From: james_b at neurogami.com (James Britt) Date: Wed, 14 Dec 2005 14:06:12 -0700 Subject: [Nitro] 0.26.0 preview In-Reply-To: References: Message-ID: <43A08944.9050806@neurogami.com> George Moschovitis wrote: > Dear devs, > > I would like to ask you to grab the latest version from the repository > and report any bugs, or problems. I would like to release 0.26.0 later > today or tommorow. > Is there a beta gem repository I can fetch from? Thanks, James -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From bryan.a.soto at gmail.com Wed Dec 14 18:15:37 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 14 Dec 2005 15:15:37 -0800 Subject: [Nitro] 0.26.0 preview In-Reply-To: References: Message-ID: Using scaffolding without 'part/admin' doesn't work. The generated pages all depend on SystemPage (nitro/src/part/admin/skin.rb) and SystemPage depends on AdminPart (nitro/src/part/admin.rb) because of the inline_css setting. I'm assuming that scaffolding should be usable without part/admin. Of course, with gen form, maybe that's deprecated? I use Mysql so I can report on how that goes. bryan On 12/14/05, George Moschovitis wrote: > > Dear devs, > > I would like to ask you to grab the latest version from the repository > and report any bugs, or problems. I would like to release 0.26.0 later > today or tommorow. > > thanks in advance, > -g. > > PS: especially test with psql and mysql. > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051214/3dfea35a/attachment.html From bryan.a.soto at gmail.com Wed Dec 14 18:26:18 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 14 Dec 2005 15:26:18 -0800 Subject: [Nitro] 0.26.0 preview In-Reply-To: References: Message-ID: $ RUBYOPT=-rubygems /usr/local/bin/ruby -I ~/nitro/lib -I /home/bryan/checkout/darcs/clean-nitro/nitro/src -I ~/glue/lib -I ~/og/lib -I ~/gen/lib run.rb I, [2005-12-14T15:23:32.317063 #17988] INFO -- : Og uses the Mysql store. E, [2005-12-14T15:23:32.321434 #17988] ERROR -- : Ruby-Mysql bindings are not installed! E, [2005-12-14T15:23:32.321548 #17988] ERROR -- : Trying to use the pure-Ruby binding included in Og E, [2005-12-14T15:23:33.095453 #17988] ERROR -- : Og.setup had problems: undefined method `[]' for nil:NilClass I'll let you know what I figure out. bryan On 12/14/05, George Moschovitis wrote: > > Dear devs, > > I would like to ask you to grab the latest version from the repository > and report any bugs, or problems. I would like to release 0.26.0 later > today or tommorow. > > thanks in advance, > -g. > > PS: especially test with psql and mysql. > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051214/6ecf42bd/attachment.html From bryan.a.soto at gmail.com Wed Dec 14 18:39:29 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 14 Dec 2005 15:39:29 -0800 Subject: [Nitro] 0.26.0 preview In-Reply-To: References: Message-ID: Please disregard. I was trying to use the bindings supplied with og with Mysql 4.1.14. Using the native C version works fine. On 12/14/05, Bryan Soto wrote: > > $ RUBYOPT=-rubygems /usr/local/bin/ruby -I ~/nitro/lib -I > /home/bryan/checkout/darcs/clean-nitro/nitro/src -I ~/glue/lib -I ~/og/lib > -I ~/gen/lib run.rb > I, [2005-12-14T15:23:32.317063 #17988] INFO -- : Og uses the Mysql store. > E, [2005-12-14T15:23:32.321434 #17988] ERROR -- : Ruby-Mysql bindings are > not installed! > E, [2005-12-14T15:23:32.321548 #17988] ERROR -- : Trying to use the > pure-Ruby binding included in Og > E, [2005-12-14T15:23:33.095453 #17988] ERROR -- : Og.setup had problems: > undefined method `[]' for nil:NilClass > > I'll let you know what I figure out. > > bryan > > > On 12/14/05, George Moschovitis wrote: > > > > Dear devs, > > > > I would like to ask you to grab the latest version from the repository > > and report any bugs, or problems. I would like to release 0.26.0 later > > today or tommorow. > > > > thanks in advance, > > -g. > > > > PS: especially test with psql and mysql. > > > > -- > > http://www.gmosx.com > > http://www.navel.gr > > http://www.nitrohq.com > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051214/9c6e4aa1/attachment.html From bryan.a.soto at gmail.com Wed Dec 14 18:56:57 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 14 Dec 2005 15:56:57 -0800 Subject: [Nitro] 0.26.0 preview In-Reply-To: References: Message-ID: I don't know if it's a big deal, but validation code appears to be added everytime a file is loaded. Given, class User property :username property :password validate_unique :username validate_value :password end Everytime the file is reloaded, the validations are added to validations array so that they're run multiple times. On 12/14/05, George Moschovitis wrote: > > Dear devs, > > I would like to ask you to grab the latest version from the repository > and report any bugs, or problems. I would like to release 0.26.0 later > today or tommorow. > > thanks in advance, > -g. > > PS: especially test with psql and mysql. > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051214/95a53c8a/attachment.html From bryan.a.soto at gmail.com Wed Dec 14 20:57:07 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 14 Dec 2005 17:57:07 -0800 Subject: [Nitro] 0.26.0 preview In-Reply-To: References: Message-ID: Mysql and Mysql schema evolution both seem to work fine. Only other thing I've found is you might get some missing components, i.e. sidebar, if you used Compiler.setup_template_transform to control the transformations. Deleting that and use the default pipeline renders pages as expected. Probably just me using it incorrectly, but maybe someone else will remember this and delete it as well. Everything else seems to be okay. Looking forward to the new release. bryan On 12/14/05, George Moschovitis wrote: > > Dear devs, > > I would like to ask you to grab the latest version from the repository > and report any bugs, or problems. I would like to release 0.26.0 later > today or tommorow. > > thanks in advance, > -g. > > PS: especially test with psql and mysql. > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051214/00089243/attachment.html From epiperak at softlab.ece.ntua.gr Wed Dec 14 21:26:01 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Thu, 15 Dec 2005 04:26:01 +0200 (EET) Subject: [Nitro] 0.26.0 preview In-Reply-To: References: Message-ID: > Dear devs, > > I would like to ask you to grab the latest version from the repository > and report any bugs, or problems. I would like to release 0.26.0 later > today or tommorow. Did you have a chance to fix/add the DOT stuff? Project has_many Group Group has_many User project.groups.users ??? Also, Project has_many Group Project has_many Investment investment.project.groups ??? group.project.investments ??? Thank you. Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From brian at xsi-design.com Wed Dec 14 23:30:02 2005 From: brian at xsi-design.com (Brian Bugh) Date: Wed, 14 Dec 2005 22:30:02 -0600 Subject: [Nitro] 0.26.0 preview In-Reply-To: References: Message-ID: <1134621002.9681.36.camel@localhost.localdomain> Hi, I did the new validation code. I am confused about your statement 'every time a file is loaded.' Do you mean every time the file containing the User classes is loaded? Or any file? Could you give me a simple example that exhibits this behavior? Validations are added to the validation group each time they are declared. If you re-declare a validation, like this: class User property :username property :password validate_unique :username validate_value :password validate_unique :username end Then the username would have a duplicate validation check. Perhaps that is the behavior you are experiencing? I decided to see how the 'other guys' handled validation to see if there was a similar issue. Ironically, it's pretty similar. If you specify something like validates_presence_of twice, it behaves the same way Glue/Og does, and validates twice. If this is determined to be a problem, one way to solve it is to declare the validation type when creating the validation error, in order to test for uniqueness. However, you might have to make a special case for validates_length since a lot of times you want to check for a min and a max. Arguably, you could force the user to use :range for both, but I don't like the idea of artificial limitations. Unless there is a bigger issue here, my suggestion is that the behavior be documented and put under 'least surprise'. If I declared a validation twice, I would expect that it did that validation twice. I have an idea about another way to handle validation, but I have not fleshed it out enough to attempt it. I will keep this issue in consideration while pondering it. Brian B. On Wed, 2005-12-14 at 15:56 -0800, Bryan Soto wrote: > I don't know if it's a big deal, but validation code appears to be > added everytime a file is loaded. Given, > > class User > property :username > property :password > > validate_unique :username > validate_value :password > end > > Everytime the file is reloaded, the validations are added to > validations array so that they're run multiple times. > > On 12/14/05, George Moschovitis < george.moschovitis at gmail.com> wrote: > Dear devs, > > I would like to ask you to grab the latest version from the > repository > and report any bugs, or problems. I would like to release > 0.26.0 later > today or tommorow. > > thanks in advance, > -g. > > PS: especially test with psql and mysql. > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From bryan.a.soto at gmail.com Thu Dec 15 01:06:43 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 14 Dec 2005 22:06:43 -0800 Subject: [Nitro] 0.26.0 preview In-Reply-To: <1134621002.9681.36.camel@localhost.localdomain> References: <1134621002.9681.36.camel@localhost.localdomain> Message-ID: Sorry if I wasn't clear. In debug mode, i.e. webrick, files are automatically reloaded on change. I noticed after adding and removing a field to test Mysql evolution that my validations had increased. Something along the lines of: # user.rb class User property :username property :password validate_unique :username validate_value :password end User.validations.size # => 2 # touch user.rb User.validations.size # => 4 assuming user.rb is a model class in a Nitro application. Basically, after the touch is performed, the file is reloaded and the validations are added anew to the already existing validations array (speculation on my part as to your implementation) in the already existing User class. As I said, it's not that a big a deal. A stop and restart of the webrick server clears it up. I just happended to notice twice as many error messages as I expected from a form. Just make sure your production apps aren't in debug mode. bryan On 12/14/05, Brian Bugh wrote: > > Hi, > > I did the new validation code. I am confused about your statement > 'every time a file is loaded.' Do you mean every time the file > containing the User classes is loaded? Or any file? Could you give me > a simple example that exhibits this behavior? > > Validations are added to the validation group each time they are > declared. If you re-declare a validation, like this: > > class User > property :username > property :password > > validate_unique :username > validate_value :password > validate_unique :username > end > > Then the username would have a duplicate validation check. Perhaps that > is the behavior you are experiencing? > > I decided to see how the 'other guys' handled validation to see if there > was a similar issue. Ironically, it's pretty similar. If you specify > something like validates_presence_of twice, it behaves the same way > Glue/Og does, and validates twice. > > If this is determined to be a problem, one way to solve it is to declare > the validation type when creating the validation error, in order to test > for uniqueness. However, you might have to make a special case for > validates_length since a lot of times you want to check for a min and a > max. Arguably, you could force the user to use :range for both, but I > don't like the idea of artificial limitations. > > Unless there is a bigger issue here, my suggestion is that the behavior > be documented and put under 'least surprise'. If I declared a > validation twice, I would expect that it did that validation twice. > > I have an idea about another way to handle validation, but I have not > fleshed it out enough to attempt it. I will keep this issue in > consideration while pondering it. > > Brian B. > > > On Wed, 2005-12-14 at 15:56 -0800, Bryan Soto wrote: > > I don't know if it's a big deal, but validation code appears to be > > added everytime a file is loaded. Given, > > > > class User > > property :username > > property :password > > > > validate_unique :username > > validate_value :password > > end > > > > Everytime the file is reloaded, the validations are added to > > validations array so that they're run multiple times. > > > > On 12/14/05, George Moschovitis < george.moschovitis at gmail.com> wrote: > > Dear devs, > > > > I would like to ask you to grab the latest version from the > > repository > > and report any bugs, or problems. I would like to release > > 0.26.0 later > > today or tommorow. > > > > thanks in advance, > > -g. > > > > PS: especially test with psql and mysql. > > > > -- > > http://www.gmosx.com > > http://www.navel.gr > > http://www.nitrohq.com > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051215/bb59f631/attachment.html From george.moschovitis at gmail.com Thu Dec 15 05:19:28 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 15 Dec 2005 12:19:28 +0200 Subject: [Nitro] 0.26.0 preview In-Reply-To: <1134621002.9681.36.camel@localhost.localdomain> References: <1134621002.9681.36.camel@localhost.localdomain> Message-ID: In debug mode, Nitro reloads many files every time you hit refresh (emulating something like cgi, only much faster). Can you fix your patch so that when the file is reload no duplicate validations are generated? thanks, George. On 12/15/05, Brian Bugh wrote: > Hi, > > I did the new validation code. I am confused about your statement > 'every time a file is loaded.' Do you mean every time the file > containing the User classes is loaded? Or any file? Could you give me > a simple example that exhibits this behavior? > > Validations are added to the validation group each time they are > declared. If you re-declare a validation, like this: > > class User > property :username > property :password > > validate_unique :username > validate_value :password > validate_unique :username > end > > Then the username would have a duplicate validation check. Perhaps that > is the behavior you are experiencing? > > I decided to see how the 'other guys' handled validation to see if there > was a similar issue. Ironically, it's pretty similar. If you specify > something like validates_presence_of twice, it behaves the same way > Glue/Og does, and validates twice. > > If this is determined to be a problem, one way to solve it is to declare > the validation type when creating the validation error, in order to test > for uniqueness. However, you might have to make a special case for > validates_length since a lot of times you want to check for a min and a > max. Arguably, you could force the user to use :range for both, but I > don't like the idea of artificial limitations. > > Unless there is a bigger issue here, my suggestion is that the behavior > be documented and put under 'least surprise'. If I declared a > validation twice, I would expect that it did that validation twice. > > I have an idea about another way to handle validation, but I have not > fleshed it out enough to attempt it. I will keep this issue in > consideration while pondering it. > > Brian B. > > > On Wed, 2005-12-14 at 15:56 -0800, Bryan Soto wrote: > > I don't know if it's a big deal, but validation code appears to be > > added everytime a file is loaded. Given, > > > > class User > > property :username > > property :password > > > > validate_unique :username > > validate_value :password > > end > > > > Everytime the file is reloaded, the validations are added to > > validations array so that they're run multiple times. > > > > On 12/14/05, George Moschovitis < george.moschovitis at gmail.com> wrote: > > Dear devs, > > > > I would like to ask you to grab the latest version from the > > repository > > and report any bugs, or problems. I would like to release > > 0.26.0 later > > today or tommorow. > > > > thanks in advance, > > -g. > > > > PS: especially test with psql and mysql. > > > > -- > > http://www.gmosx.com > > http://www.navel.gr > > http://www.nitrohq.com > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu Dec 15 05:20:33 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 15 Dec 2005 12:20:33 +0200 Subject: [Nitro] 0.26.0 preview In-Reply-To: References: Message-ID: > I don't know if it's a big deal, but validation code appears to be added > everytime a file is loaded. Given, This is a big deal. The validation code has changed, would you be kinf enough to have a look at this and provide a fix? thanks, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu Dec 15 05:21:38 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 15 Dec 2005 12:21:38 +0200 Subject: [Nitro] 0.26.0 preview In-Reply-To: <43A08944.9050806@neurogami.com> References: <43A08944.9050806@neurogami.com> Message-ID: darcs get http://repo.nitrohq.com more instructions here: http://www.nitrohq.com/view/Darcs_repository regards, George. On 12/14/05, James Britt wrote: > George Moschovitis wrote: > > Dear devs, > > > > I would like to ask you to grab the latest version from the repository > > and report any bugs, or problems. I would like to release 0.26.0 later > > today or tommorow. > > > > Is there a beta gem repository I can fetch from? > > > > Thanks, > > > James > -- > > http://www.ruby-doc.org - Ruby Help & Documentation > http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted > http://www.rubystuff.com - The Ruby Store for Ruby Stuff > http://www.jamesbritt.com - Playing with Better Toys > http://www.30secondrule.com - Building Better Tools > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu Dec 15 10:05:39 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 15 Dec 2005 17:05:39 +0200 Subject: [Nitro] 0.26.0 preview In-Reply-To: References: Message-ID: > Project has_many Group > Group has_many User > > project.groups.users > ??? try this: project.groups.inject([]) { |acc, g| acc << g.users } perhaps Trans can add a facets enumerator helper like this: project.groups.injector.users regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu Dec 15 10:25:18 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 15 Dec 2005 17:25:18 +0200 Subject: [Nitro] 0.26.0 preview In-Reply-To: References: Message-ID: > perhaps Trans can add a facets enumerator helper like this: Well it is so easy so here you go: require 'mega/functor' module Enumerable # Project has_many Group # Group has_many User # projects.groups.accumulate.users #-- # gmosx: any idea for a better name? #++ def accumulate Functor.new do |op, *args| self.inject([]) { |a, x| a << x.send(op, *args) }.flatten end end alias_method :acc, :accumulate end project.groups.accumulate.users -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From m.fellinger at gmail.com Thu Dec 15 13:54:40 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Thu, 15 Dec 2005 19:54:40 +0100 Subject: [Nitro] 0.26.0 preview In-Reply-To: References: Message-ID: <200512151954.44791.m.fellinger@gmail.com> Hey George, I have a small patch attached for extension of cgi-headers (for the file-disposition header) I've got no idea if it really works everywhere as expected, but at least it shouldn't break anything :) also i recorded a simple patch for the
 color in spark wich annoyed me 
(and lots of others) for a long time now.
let me know what you think of it.

thx in prev.
manveru

Am Mittwoch, 14. Dezember 2005 13:09 schrieb George Moschovitis:
> Dear devs,
>
> I would like to ask you to grab the latest version from the repository
> and report any bugs, or problems. I would like to release 0.26.0 later
> today or tommorow.
>
> thanks in advance,
> -g.
>
> PS: especially test with psql and mysql.
>
> --
> http://www.gmosx.com
> http://www.navel.gr
> http://www.nitrohq.com
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bundle.tar.bz2
Type: application/x-tbz
Size: 8230 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051215/793d3f10/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051215/793d3f10/attachment-0001.bin 

From itsme213 at hotmail.com  Thu Dec 15 18:20:25 2005
From: itsme213 at hotmail.com (itsme213)
Date: Thu, 15 Dec 2005 17:20:25 -0600
Subject: [Nitro] 0.26.0 preview
References: 
	
Message-ID: 

> project.groups.users

Changes the Ruby meeting of "."  

class User; property :size, Integer; end

e.g. project.groups.size #=> which size?

> project.groups.inject([]) { |acc, g| acc << g.users }

A bit verbose.

> project.groups.injector.users

Does not read well.


What about something a bit like:

project.groups.all(:users)



From rainhead at gmail.com  Thu Dec 15 19:29:06 2005
From: rainhead at gmail.com (Peter Abrahamsen)
Date: Thu, 15 Dec 2005 16:29:06 -0800
Subject: [Nitro] 0.26.0 preview
In-Reply-To: <200512151954.44791.m.fellinger@gmail.com>
References: 
	<200512151954.44791.m.fellinger@gmail.com>
Message-ID: <955F2E11-503B-491C-90C3-E21309B3EEB9@gmail.com>

Hallelujah, thanks for doing this.

Eventually, I'd like to make Spark's text processing more robust and  
flexible (modular, using settings?). Also, AFAIK we still have the  
< problem.

On Dec 15, 2005, at 10:54 AM, Michael Fellinger wrote:

> also i recorded a simple patch for the 
 color in spark wich  
> annoyed me

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2410 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051215/a0227393/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051215/a0227393/attachment-0001.bin 

From brian at xsi-design.com  Thu Dec 15 23:24:23 2005
From: brian at xsi-design.com (Brian Bugh)
Date: Thu, 15 Dec 2005 22:24:23 -0600
Subject: [Nitro] 0.26.0 preview
In-Reply-To: <38558.63.98.174.176.1134681848.squirrel@webmail.xsi-design.com>
References: <38558.63.98.174.176.1134681848.squirrel@webmail.xsi-design.com>
Message-ID: <1134707063.12994.22.camel@localhost.localdomain>

Ah, I see.  The current release gem package does this as well, so it's a
general issue with the way validations are handled.  I'm innocent! ;)

I've tested with extend_object and append_features methods and the
on_included block, and I can't seem to find a reliable way to check if
the file is being loaded/extended again.  The problem is that when it is
reloaded, the class is just reopened and declared the same way it was
before.

Any logic I can think of to add to validations for uniqueness checking
will have a performance penalty in production, even though production
doesn't have the reload issue.  

I will spend more time on this tomorrow to see if I can find a
easy/quick solution for your upcoming release.

Brian B.


On Thu, 2005-12-15 at 13:24 -0800, Bryan Soto wrote:
> Sorry if I wasn't clear. In debug mode, i.e. webrick, files are
> automatically reloaded on change. I noticed after adding and removing a
> field to test Mysql evolution that my validations had increased. Something
> along the lines of:
> 
> # user.rb
> class User
>   property :username
>   property :password
> 
>   validate_unique :username
>   validate_value :password
> end
> 
> User.validations.size   #  => 2
> 
> # touch user.rb
> 
> User.validations.size   #  => 4
> 
> assuming user.rb is a model class in a Nitro application. Basically, after
> the touch is performed, the file is reloaded and the validations are added
> anew to the already existing validations array (speculation on my part as to
> your implementation) in the already existing User class.
> 
> As I said, it's not that a big a deal. A stop and restart of the webrick
> server clears it up. I just happended to notice twice as many error messages
> as I expected from a form. Just make sure your production apps aren't in
> debug mode.
> 
> bryan
> 
> On 12/14/05, Brian Bugh  wrote:
> >
> > Hi,
> >
> > I did the new validation code.  I am confused about your statement
> > 'every time a file is loaded.'  Do you mean every time the file
> > containing the User classes is loaded?  Or any file?  Could you give me
> > a simple example that exhibits this behavior?
> >
> > Validations are added to the validation group each time they are
> > declared.  If you re-declare a validation, like this:
> >
> >   class User
> >     property :username
> >     property :password
> >
> >     validate_unique :username
> >     validate_value :password
> >     validate_unique :username
> >   end
> >
> > Then the username would have a duplicate validation check.  Perhaps that
> > is the behavior you are experiencing?
> >
> > I decided to see how the 'other guys' handled validation to see if there
> > was a similar issue.  Ironically, it's pretty similar.  If you specify
> > something like validates_presence_of twice, it behaves the same way
> > Glue/Og does, and validates twice.
> >
> > If this is determined to be a problem, one way to solve it is to declare
> > the validation type when creating the validation error, in order to test
> > for uniqueness.  However, you might have to make a special case for
> > validates_length since a lot of times you want to check for a min and a
> > max.  Arguably, you could force the user to use :range for both, but I
> > don't like the idea of artificial limitations.
> >
> > Unless there is a bigger issue here, my suggestion is that the behavior
> > be documented and put under 'least surprise'.  If I declared a
> > validation twice, I would expect that it did that validation twice.
> >
> > I have an idea about another way to handle validation, but I have not
> > fleshed it out enough to attempt it.  I will keep this issue in
> > consideration while pondering it.
> >
> > Brian B.
> >
> >
> > On Wed, 2005-12-14 at 15:56 -0800, Bryan Soto wrote:
> > > I don't know if it's a big deal, but validation code appears to be
> > > added everytime a file is loaded. Given,
> > >
> > > class User
> > >   property :username
> > >   property :password
> > >
> > >   validate_unique :username
> > >   validate_value :password
> > > end
> > >
> > > Everytime the file is reloaded, the validations are added to
> > > validations array so that they're run multiple times.



From james_b at neurogami.com  Fri Dec 16 00:56:53 2005
From: james_b at neurogami.com (James Britt)
Date: Thu, 15 Dec 2005 22:56:53 -0700
Subject: [Nitro] 0.26.0 preview
In-Reply-To: 
References: 	<43A08944.9050806@neurogami.com>
	
Message-ID: <43A25725.1040505@neurogami.com>

George Moschovitis wrote:
> darcs get http://repo.nitrohq.com
> 
> more instructions here:
> 
> http://www.nitrohq.com/view/Darcs_repository
> 

build.rb does not play well on Windows.

I fixed the call to mkdir, but what's 'reap'?

Thanks,


James
-- 

http://www.ruby-doc.org       - Ruby Help & Documentation
http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted
http://www.rubystuff.com      - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com     - Playing with Better Toys
http://www.30secondrule.com   - Building Better Tools


From bryan.a.soto at gmail.com  Fri Dec 16 02:20:13 2005
From: bryan.a.soto at gmail.com (Bryan Soto)
Date: Thu, 15 Dec 2005 23:20:13 -0800
Subject: [Nitro] Validations, was re: 0.26.0 preview
Message-ID: 

Interesting... I guess noone ever noticed since the code was eval'd on the
first call made to #valid? in the previous implementation. The array was
only iterated through when defining validate(). Now it's being iterated
through on every call.

Perhaps if, instead of an array, validations were stored in a hash with the
key consisting of the validation type and field name, it would avoid the
duplication and performance hit? It might make application level validations
a bit more complicated, though I'm not sure if anyone actually uses them.
Does anyone?

On 12/15/05, Brian Bugh  wrote:
>
> Ah, I see.  The current release gem package does this as well, so it's a
> general issue with the way validations are handled.  I'm innocent! ;)
>
> I've tested with extend_object and append_features methods and the
> on_included block, and I can't seem to find a reliable way to check if
> the file is being loaded/extended again.  The problem is that when it is
> reloaded, the class is just reopened and declared the same way it was
> before.
>
> Any logic I can think of to add to validations for uniqueness checking
> will have a performance penalty in production, even though production
> doesn't have the reload issue.
>
> I will spend more time on this tomorrow to see if I can find a
> easy/quick solution for your upcoming release.
>
> Brian B.
>
>
> On Thu, 2005-12-15 at 13:24 -0800, Bryan Soto wrote:
> > Sorry if I wasn't clear. In debug mode, i.e. webrick, files are
> > automatically reloaded on change. I noticed after adding and removing a
> > field to test Mysql evolution that my validations had increased.
> Something
> > along the lines of:
> >
> > # user.rb
> > class User
> >   property :username
> >   property :password
> >
> >   validate_unique :username
> >   validate_value :password
> > end
> >
> > User.validations.size   #  => 2
> >
> > # touch user.rb
> >
> > User.validations.size   #  => 4
> >
> > assuming user.rb is a model class in a Nitro application. Basically,
> after
> > the touch is performed, the file is reloaded and the validations are
> added
> > anew to the already existing validations array (speculation on my part
> as to
> > your implementation) in the already existing User class.
> >
> > As I said, it's not that a big a deal. A stop and restart of the webrick
> > server clears it up. I just happended to notice twice as many error
> messages
> > as I expected from a form. Just make sure your production apps aren't in
> > debug mode.
> >
> > bryan
> >
> > On 12/14/05, Brian Bugh  wrote:
> > >
> > > Hi,
> > >
> > > I did the new validation code.  I am confused about your statement
> > > 'every time a file is loaded.'  Do you mean every time the file
> > > containing the User classes is loaded?  Or any file?  Could you give
> me
> > > a simple example that exhibits this behavior?
> > >
> > > Validations are added to the validation group each time they are
> > > declared.  If you re-declare a validation, like this:
> > >
> > >   class User
> > >     property :username
> > >     property :password
> > >
> > >     validate_unique :username
> > >     validate_value :password
> > >     validate_unique :username
> > >   end
> > >
> > > Then the username would have a duplicate validation check.  Perhaps
> that
> > > is the behavior you are experiencing?
> > >
> > > I decided to see how the 'other guys' handled validation to see if
> there
> > > was a similar issue.  Ironically, it's pretty similar.  If you specify
> > > something like validates_presence_of twice, it behaves the same way
> > > Glue/Og does, and validates twice.
> > >
> > > If this is determined to be a problem, one way to solve it is to
> declare
> > > the validation type when creating the validation error, in order to
> test
> > > for uniqueness.  However, you might have to make a special case for
> > > validates_length since a lot of times you want to check for a min and
> a
> > > max.  Arguably, you could force the user to use :range for both, but I
> > > don't like the idea of artificial limitations.
> > >
> > > Unless there is a bigger issue here, my suggestion is that the
> behavior
> > > be documented and put under 'least surprise'.  If I declared a
> > > validation twice, I would expect that it did that validation twice.
> > >
> > > I have an idea about another way to handle validation, but I have not
> > > fleshed it out enough to attempt it.  I will keep this issue in
> > > consideration while pondering it.
> > >
> > > Brian B.
> > >
> > >
> > > On Wed, 2005-12-14 at 15:56 -0800, Bryan Soto wrote:
> > > > I don't know if it's a big deal, but validation code appears to be
> > > > added everytime a file is loaded. Given,
> > > >
> > > > class User
> > > >   property :username
> > > >   property :password
> > > >
> > > >   validate_unique :username
> > > >   validate_value :password
> > > > end
> > > >
> > > > Everytime the file is reloaded, the validations are added to
> > > > validations array so that they're run multiple times.
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051216/b80d2ce9/attachment.html 

From brian at xsi-design.com  Fri Dec 16 08:50:23 2005
From: brian at xsi-design.com (Brian Bugh)
Date: Fri, 16 Dec 2005 07:50:23 -0600
Subject: [Nitro] Validations, was re: 0.26.0 preview
In-Reply-To: 
References: 
Message-ID: <1134741023.12994.52.camel@localhost.localdomain>

I'm not sure I understand what you mean.  The new code is functionally
identical to the old way, only it's using blocks and Proc objects
instead of using eval. Try this simple Nitro app with both the old and
new code:

  require 'nitro'
  require 'og'
  require 'user'
  
  Og.setup

  class ValidationTest
    def index
      "The number of validations for User is
#{User.validations.length}."
    end
  end

  Nitro.run ValidationTest

Check it in the browser, and it will say 2, then touch user.rb and it
will say 4.  The old way basically copy and pasted code into a function,
whereas now that code is a list of anonymous methods in an array that is
iterated.  That array is only iterated when validate or valid? is called
- the same times as the long function was called before.  Hopefully that
helps clarify the issue for you.

--

I have thought about your suggestion, and I think it is a possibility.
Do you mean only store the validation list and each field like this:

  {:validate_unique => [:username], :validate_value => [:password]}

If so, how would we determine what a validation code block was?   One
option is to have a list of private instance methods (like
validate_values) that check the fields in question, but I am not sure if
having one function to declare it and one function to check it is ideal.
The names could be confusing because of their similarity.  Using a
hashed set like that could possibly move the validation logic solely to
when valid? is called, rather than when the validation is first
declared.  I like the idea and will try to think of some solutions.

By the way, what are application level validations?  Nitro application
or Og/Glue?  I am not familiar at all with Nitro, because the project
I'm doing that got me interested in Og in the first place doesn't use
anything else.

Brian B.


On Thu, 2005-12-15 at 23:20 -0800, Bryan Soto wrote:
> Interesting... I guess noone ever noticed since the code was eval'd on
> the first call made to #valid? in the previous implementation. The
> array was only iterated through when defining validate(). Now it's
> being iterated through on every call. 
> 
> Perhaps if, instead of an array, validations were stored in a hash
> with the key consisting of the validation type and field name, it
> would avoid the duplication and performance hit? It might make
> application level validations a bit more complicated, though I'm not
> sure if anyone actually uses them. Does anyone? 
> 
> On 12/15/05, Brian Bugh  wrote:
>         Ah, I see.  The current release gem package does this as well,
>         so it's a
>         general issue with the way validations are handled.  I'm
>         innocent! ;)
>         
>         I've tested with extend_object and append_features methods and
>         the
>         on_included block, and I can't seem to find a reliable way to
>         check if
>         the file is being loaded/extended again.  The problem is that
>         when it is
>         reloaded, the class is just reopened and declared the same way
>         it was
>         before.
>         
>         Any logic I can think of to add to validations for uniqueness
>         checking
>         will have a performance penalty in production, even though
>         production
>         doesn't have the reload issue.
>         
>         I will spend more time on this tomorrow to see if I can find
>         a 
>         easy/quick solution for your upcoming release.
>         
>         Brian B.
>         
>         
>         On Thu, 2005-12-15 at 13:24 -0800, Bryan Soto wrote:
>         > Sorry if I wasn't clear. In debug mode, i.e. webrick, files
>         are
>         > automatically reloaded on change. I noticed after adding and
>         removing a 
>         > field to test Mysql evolution that my validations had
>         increased. Something
>         > along the lines of:
>         >
>         > # user.rb
>         > class User
>         >   property :username
>         >   property :password
>         > 
>         >   validate_unique :username
>         >   validate_value :password
>         > end
>         >
>         > User.validations.size   #  => 2
>         >
>         > # touch user.rb
>         >
>         > User.validations.size   #  => 4
>         >
>         > assuming user.rb is a model class in a Nitro application.
>         Basically, after
>         > the touch is performed, the file is reloaded and the
>         validations are added
>         > anew to the already existing validations array (speculation
>         on my part as to 
>         > your implementation) in the already existing User class.
>         >
>         > As I said, it's not that a big a deal. A stop and restart of
>         the webrick
>         > server clears it up. I just happended to notice twice as
>         many error messages 
>         > as I expected from a form. Just make sure your production
>         apps aren't in
>         > debug mode.
>         >
>         > bryan
>         >




From james_b at neurogami.com  Fri Dec 16 10:35:38 2005
From: james_b at neurogami.com (James Britt)
Date: Fri, 16 Dec 2005 08:35:38 -0700
Subject: [Nitro] 0.26.0 preview
In-Reply-To: 
References: 
	<43A08944.9050806@neurogami.com>
	
	<43A25725.1040505@neurogami.com>
	
Message-ID: <43A2DECA.6070908@neurogami.com>

K Aleksi Niemela wrote:
> James Britt writes:
> 
>> George Moschovitis wrote:
>>
>>> darcs get http://repo.nitrohq.com
>>> more instructions here:
>>> http://www.nitrohq.com/view/Darcs_repository
>>
>>
>> build.rb does not play well on Windows.
>> I fixed the call to mkdir, but what's 'reap'?
> 
> 
> I have no idea what's the correct answer, but at least this is first hit 
> for ruby and reap from google.
>  http://reap.rubyforge.org/


That appears to be it, though build.rb still fails to create gems for me.

A suggestion for George: Please make beta gems available.  I have nitro 
+ friends installed via gems.  If I now install a version using cp or 
install.rb or something, then I end up with stray files that I have to 
remove by hand or else the conflict with gem loading.


> James, do you have otherwise working production quality setup on 
> Windows? I'd be interested in hearing all the details: webserver, 
> configurations, ruby, libs, database and versions of everything with 
> installation instructions.

I have Apache2 running on WinXP SP2, plus MySQL 3.23.58 (I was running 
MySQL 4.01, but my production server is running 3.23, and the 
differences between 3.x and 4+ are enough that I'm better off just using 
the older version so that I know my SQL will run.  Upgrading MySQL on a 
Red Hat Enterprise box is a task I've been dreading.)

The installation of Apache2 was done using a Windows binary from Apache. 
    Same for MySQL; I just used their binaries.  I've not gotten fastcgi 
running on Windows (nor, for that matter, with Apache 2 on the Linux 
server).

I had been running Nitro apps under CGI, both on Windos and Lnux, which 
has been fast enough for me, but that broke with Nitro  0.25. :(

I have some test apps running with fcgi + lighttpd on the linux box, but 
have not gotten lighttpd running on WinXP.

(I run Rails apps locally using scgi + Apache2.)

> I'm not sure if Rails has decent docs for this already, perhaps I should 
> take a glance on that land.

I've used the Rails docs for general server setups; they're OK, but 
often platform-focused.  Telling me to run "apt-get" is not telling me 
much.  But installation itself is usually not the issue,  it's 
configuration that trips me up, and trial-and-error is the big winner 
for me.

Even when I find nice examples (such as the lighttpd + fcgi example on 
nitrohq) there seems to be something else I want to add, and that's when 
stuff falls apart on me.

The biggest gripes are the near-useless error messages I get from apache 
or fastcgi or lighttpd or whatever.  They basically say, "Shit don't 
work.  Go figure it out."

James

-- 

http://www.ruby-doc.org       - Ruby Help & Documentation
http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted
http://www.rubystuff.com      - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com     - Playing with Better Toys
http://www.30secondrule.com   - Building Better Tools


From george.moschovitis at gmail.com  Fri Dec 16 11:42:48 2005
From: george.moschovitis at gmail.com (George Moschovitis)
Date: Fri, 16 Dec 2005 18:42:48 +0200
Subject: [Nitro] 0.26.0 preview
In-Reply-To: <43A2DECA.6070908@neurogami.com>
References: 
	<43A08944.9050806@neurogami.com>
	
	<43A25725.1040505@neurogami.com>
	
	<43A2DECA.6070908@neurogami.com>
Message-ID: 

> That appears to be it, though build.rb still fails to create gems for me.

build.rb and all .rb files on the top level are for me ;-) ignore them...

> A suggestion for George: Please make beta gems available.  I have nitro
> + friends installed via gems.  If I now install a version using cp or
> install.rb or something, then I end up with stray files that I have to
> remove by hand or else the conflict with gem loading.

will try for the next version. Right now I am using ruby 1.8.3 and
gems/yaml are truly fucked up!


regards,
George.


--
http://www.gmosx.com
http://www.navel.gr
http://www.nitrohq.com



From bryan.a.soto at gmail.com  Fri Dec 16 18:46:45 2005
From: bryan.a.soto at gmail.com (Bryan Soto)
Date: Fri, 16 Dec 2005 15:46:45 -0800
Subject: [Nitro] Validations, was re: 0.26.0 preview
In-Reply-To: <1134741023.12994.52.camel@localhost.localdomain>
References: 
	<1134741023.12994.52.camel@localhost.localdomain>
Message-ID: 



require 'nitro'
require 'og'
require 'user'

require 'dev-utils/debug'

Og.setup

class ValidationTest
  def index
    out = "The number of validations for User is #{User.validations.length}.
" u = User.new u.username = 'bryan' u.password = 'bryan' if u.valid? u.save else out << "
#{u.errors.errors.inspect}
" end out end end Nitro.run ValidationTest
Run against gems and dev version. Touch user.rb. Await reload message on console, then refresh browser. Notice how in gem version, the number of validations increases, but the number of errors remains unchanged. Repeat using dev version. Notice that the number of validations increases as well as the number of error message entries. Basically, the gem version evals the code _once_ in eval_validate (glue/lib/validations.rb) the first time #valid? is called, so it ignores the repeated validations. Hope this clears things up as too what I'm talking about. I need to brush up on my communication skills. It all made sense to me every single time I wrote 8^). -- As too future design, I was thinking something more like: class ValidationKey attr_reader :validation attr_reader :field_name def initialize(val, field) @validation, @field_name = val.to_s, field.to_s end def hash "#{@validation}-#{@field_name}".hash end def ==(other) self.validation == other.validation and self.field_name == other.field_name end end vk = ValidationKey.new(:validate_unique, :username) validations[vk] = validate_unique_proc_goes_here as the key and the proc as the value in the hash. Then the new key would just overwrite the old. No more duplicate entries. And as for application level validations, I was thinking someone with a shopping cart might have written their own validate_credit_card_number. Or validate_password, where password requires at least one number. Basically, some sort of validation that only makes sense in their particular application. Though I suppose most people just use aspects for that. bryan On 12/16/05, Brian Bugh wrote: > > I'm not sure I understand what you mean. The new code is functionally > identical to the old way, only it's using blocks and Proc objects > instead of using eval. Try this simple Nitro app with both the old and > new code: > > require 'nitro' > require 'og' > require 'user' > > Og.setup > > class ValidationTest > def index > "The number of validations for User is > #{User.validations.length}." > end > end > > Nitro.run ValidationTest > > Check it in the browser, and it will say 2, then touch user.rb and it > will say 4. The old way basically copy and pasted code into a function, > whereas now that code is a list of anonymous methods in an array that is > iterated. That array is only iterated when validate or valid? is called > - the same times as the long function was called before. Hopefully that > helps clarify the issue for you. > > -- > > I have thought about your suggestion, and I think it is a possibility. > Do you mean only store the validation list and each field like this: > > {:validate_unique => [:username], :validate_value => [:password]} > > If so, how would we determine what a validation code block was? One > option is to have a list of private instance methods (like > validate_values) that check the fields in question, but I am not sure if > having one function to declare it and one function to check it is ideal. > The names could be confusing because of their similarity. Using a > hashed set like that could possibly move the validation logic solely to > when valid? is called, rather than when the validation is first > declared. I like the idea and will try to think of some solutions. > > By the way, what are application level validations? Nitro application > or Og/Glue? I am not familiar at all with Nitro, because the project > I'm doing that got me interested in Og in the first place doesn't use > anything else. > > Brian B. > > > On Thu, 2005-12-15 at 23:20 -0800, Bryan Soto wrote: > > Interesting... I guess noone ever noticed since the code was eval'd on > > the first call made to #valid? in the previous implementation. The > > array was only iterated through when defining validate(). Now it's > > being iterated through on every call. > > > > Perhaps if, instead of an array, validations were stored in a hash > > with the key consisting of the validation type and field name, it > > would avoid the duplication and performance hit? It might make > > application level validations a bit more complicated, though I'm not > > sure if anyone actually uses them. Does anyone? > > > > On 12/15/05, Brian Bugh wrote: > > Ah, I see. The current release gem package does this as well, > > so it's a > > general issue with the way validations are handled. I'm > > innocent! ;) > > > > I've tested with extend_object and append_features methods and > > the > > on_included block, and I can't seem to find a reliable way to > > check if > > the file is being loaded/extended again. The problem is that > > when it is > > reloaded, the class is just reopened and declared the same way > > it was > > before. > > > > Any logic I can think of to add to validations for uniqueness > > checking > > will have a performance penalty in production, even though > > production > > doesn't have the reload issue. > > > > I will spend more time on this tomorrow to see if I can find > > a > > easy/quick solution for your upcoming release. > > > > Brian B. > > > > > > On Thu, 2005-12-15 at 13:24 -0800, Bryan Soto wrote: > > > Sorry if I wasn't clear. In debug mode, i.e. webrick, files > > are > > > automatically reloaded on change. I noticed after adding and > > removing a > > > field to test Mysql evolution that my validations had > > increased. Something > > > along the lines of: > > > > > > # user.rb > > > class User > > > property :username > > > property :password > > > > > > validate_unique :username > > > validate_value :password > > > end > > > > > > User.validations.size # => 2 > > > > > > # touch user.rb > > > > > > User.validations.size # => 4 > > > > > > assuming user.rb is a model class in a Nitro application. > > Basically, after > > > the touch is performed, the file is reloaded and the > > validations are added > > > anew to the already existing validations array (speculation > > on my part as to > > > your implementation) in the already existing User class. > > > > > > As I said, it's not that a big a deal. A stop and restart of > > the webrick > > > server clears it up. I just happended to notice twice as > > many error messages > > > as I expected from a form. Just make sure your production > > apps aren't in > > > debug mode. > > > > > > bryan > > > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051216/40dbb6b2/attachment.html From bryan.a.soto at gmail.com Sun Dec 18 16:09:29 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Sun, 18 Dec 2005 13:09:29 -0800 Subject: [Nitro] Validations, was re: 0.26.0 preview In-Reply-To: References: <1134741023.12994.52.camel@localhost.localdomain> Message-ID: Hi, I had some time last night, so I came up with two options for pending release. Option 1, add_unique_error_msgs adds only unique error messages to the errors list for the field. Validations size still increases (in debug mode only due to auto-reload), but error messages list doesn't contain multiple copies of the same message. Option 2, validation_key converts validations list to a hash and creates a key object. Validations size doesn't increase but is a bit of a bigger change. Both pass unit tests (at least the ones that run. I'm not able to complete the one's for og). Anyone want to give them a try for testing purposes? bryan On 12/16/05, Bryan Soto wrote: > > > > require 'nitro' > require 'og' > require 'user' > > require 'dev-utils/debug' > > Og.setup > > class ValidationTest > def index > out = "The number of validations for User is #{User.validations.length}.
/>" > > u = User.new > u.username = 'bryan' > u.password = 'bryan' > if u.valid? > u.save > else > out << "
#{u.errors.errors.inspect}
" > end > out > end > end > > Nitro.run ValidationTest > >
> > Run against gems and dev version. > > Touch user.rb. Await reload message on console, then refresh browser. > > Notice how in gem version, the number of validations increases, but the > number of errors remains unchanged. > > Repeat using dev version. Notice that the number of validations increases > as well as the number of error message entries. > > Basically, the gem version evals the code _once_ in eval_validate > (glue/lib/validations.rb) the first time #valid? is called, so it ignores > the repeated validations. > > Hope this clears things up as too what I'm talking about. I need to brush > up on my communication skills. It all made sense to me every single time I > wrote 8^). > > -- > > As too future design, I was thinking something more like: > > > > class ValidationKey > attr_reader :validation > attr_reader :field_name > > def initialize(val, field) > @validation, @field_name = val.to_s, field.to_s > end > > def hash > "#{@validation}-#{@field_name}".hash > end > > def ==(other) > self.validation == other.validation and self.field_name == > other.field_name > end > end > > vk = ValidationKey.new(:validate_unique, :username) > > validations[vk] = validate_unique_proc_goes_here > > > > as the key and the proc as the value in the hash. Then the new key would > just overwrite the old. No more duplicate entries. > > And as for application level validations, I was thinking someone with a > shopping cart might have written their own validate_credit_card_number. Or > validate_password, where password requires at least one number. Basically, > some sort of validation that only makes sense in their particular > application. Though I suppose most people just use aspects for that. > > bryan > > On 12/16/05, Brian Bugh wrote: > > > > I'm not sure I understand what you mean. The new code is functionally > > identical to the old way, only it's using blocks and Proc objects > > instead of using eval. Try this simple Nitro app with both the old and > > new code: > > > > require 'nitro' > > require 'og' > > require 'user' > > > > Og.setup > > > > class ValidationTest > > def index > > "The number of validations for User is > > #{User.validations.length}." > > end > > end > > > > Nitro.run ValidationTest > > > > Check it in the browser, and it will say 2, then touch user.rb and it > > will say 4. The old way basically copy and pasted code into a function, > > whereas now that code is a list of anonymous methods in an array that is > > > > iterated. That array is only iterated when validate or valid? is called > > - the same times as the long function was called before. Hopefully that > > helps clarify the issue for you. > > > > -- > > > > I have thought about your suggestion, and I think it is a possibility. > > Do you mean only store the validation list and each field like this: > > > > {:validate_unique => [:username], :validate_value => [:password]} > > > > If so, how would we determine what a validation code block was? One > > option is to have a list of private instance methods (like > > validate_values) that check the fields in question, but I am not sure if > > having one function to declare it and one function to check it is ideal. > > The names could be confusing because of their similarity. Using a > > hashed set like that could possibly move the validation logic solely to > > when valid? is called, rather than when the validation is first > > declared. I like the idea and will try to think of some solutions. > > > > By the way, what are application level validations? Nitro application > > or Og/Glue? I am not familiar at all with Nitro, because the project > > I'm doing that got me interested in Og in the first place doesn't use > > anything else. > > > > Brian B. > > > > > > On Thu, 2005-12-15 at 23:20 -0800, Bryan Soto wrote: > > > Interesting... I guess noone ever noticed since the code was eval'd on > > > the first call made to #valid? in the previous implementation. The > > > array was only iterated through when defining validate(). Now it's > > > being iterated through on every call. > > > > > > Perhaps if, instead of an array, validations were stored in a hash > > > with the key consisting of the validation type and field name, it > > > would avoid the duplication and performance hit? It might make > > > application level validations a bit more complicated, though I'm not > > > sure if anyone actually uses them. Does anyone? > > > > > > On 12/15/05, Brian Bugh < brian at xsi-design.com> wrote: > > > Ah, I see. The current release gem package does this as well, > > > > > so it's a > > > general issue with the way validations are handled. I'm > > > innocent! ;) > > > > > > I've tested with extend_object and append_features methods and > > > the > > > on_included block, and I can't seem to find a reliable way to > > > check if > > > the file is being loaded/extended again. The problem is that > > > when it is > > > reloaded, the class is just reopened and declared the same way > > > it was > > > before. > > > > > > Any logic I can think of to add to validations for uniqueness > > > checking > > > will have a performance penalty in production, even though > > > production > > > doesn't have the reload issue. > > > > > > I will spend more time on this tomorrow to see if I can find > > > a > > > easy/quick solution for your upcoming release. > > > > > > Brian B. > > > > > > > > > On Thu, 2005-12-15 at 13:24 -0800, Bryan Soto wrote: > > > > Sorry if I wasn't clear. In debug mode, i.e. webrick, files > > > are > > > > automatically reloaded on change. I noticed after adding and > > > removing a > > > > field to test Mysql evolution that my validations had > > > increased. Something > > > > along the lines of: > > > > > > > > # user.rb > > > > class User > > > > property :username > > > > property :password > > > > > > > > validate_unique :username > > > > validate_value :password > > > > end > > > > > > > > User.validations.size # => 2 > > > > > > > > # touch user.rb > > > > > > > > User.validations.size # => 4 > > > > > > > > assuming user.rb is a model class in a Nitro application. > > > Basically, after > > > > the touch is performed, the file is reloaded and the > > > validations are added > > > > anew to the already existing validations array (speculation > > > on my part as to > > > > your implementation) in the already existing User class. > > > > > > > > As I said, it's not that a big a deal. A stop and restart of > > > the webrick > > > > server clears it up. I just happended to notice twice as > > > many error messages > > > > as I expected from a form. Just make sure your production > > > apps aren't in > > > > debug mode. > > > > > > > > bryan > > > > > > > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051218/6e2ecee8/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: add_unique_error_msgs Type: application/octet-stream Size: 28651 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051218/6e2ecee8/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: validation_key Type: application/octet-stream Size: 29751 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051218/6e2ecee8/attachment-0001.obj From george.moschovitis at gmail.com Mon Dec 19 03:20:17 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 19 Dec 2005 10:20:17 +0200 Subject: [Nitro] Validations, was re: 0.26.0 preview In-Reply-To: References: <1134741023.12994.52.camel@localhost.localdomain> Message-ID: thanks, I will have a look... -g. On 12/18/05, Bryan Soto wrote: > Hi, > > I had some time last night, so I came up with two options for pending > release. > > Option 1, add_unique_error_msgs adds only unique error messages to the > errors list for the field. Validations size still increases (in debug mode > only due to auto-reload), but error messages list doesn't contain multiple > copies of the same message. > > Option 2, validation_key converts validations list to a hash and creates a > key object. Validations size doesn't increase but is a bit of a bigger > change. > > Both pass unit tests (at least the ones that run. I'm not able to complete > the one's for og). > > Anyone want to give them a try for testing purposes? > > bryan > > > On 12/16/05, Bryan Soto < bryan.a.soto at gmail.com > wrote: > > > > > > require 'nitro' > > require 'og' > > require 'user' > > > > require 'dev-utils/debug' > > > > Og.setup > > > > class ValidationTest > > def index > > out = "The number of validations for User is > #{User.validations.length}.
" > > u = User.new > > u.username = 'bryan' > > u.password = 'bryan' > > if u.valid? > > u.save > > else > > out << "
#{u.errors.errors.inspect}
" > > end > > out > > end > > end > > > > Nitro.run ValidationTest > > > >
> > > > Run against gems and dev version. > > > > Touch user.rb. Await reload message on console, then refresh browser. > > > > Notice how in gem version, the number of validations increases, but the > number of errors remains unchanged. > > > > Repeat using dev version. Notice that the number of validations increases > as well as the number of error message entries. > > > > Basically, the gem version evals the code _once_ in eval_validate > (glue/lib/validations.rb) the first time #valid? is called, so it ignores > the repeated validations. > > > > Hope this clears things up as too what I'm talking about. I need to brush > up on my communication skills. It all made sense to me every single time I > wrote 8^). > > > > -- > > > > As too future design, I was thinking something more like: > > > > > > > > class ValidationKey > > attr_reader :validation > > attr_reader :field_name > > > > def initialize(val, field) > > @validation, @field_name = val.to_s, field.to_s > > end > > > > def hash > > "#{@validation}-#{@field_name}".hash > > end > > > > def ==(other) > > self.validation == other.validation and self.field_name == > other.field_name > > end > > end > > > > vk = ValidationKey.new(:validate_unique, :username) > > > > validations[vk] = validate_unique_proc_goes_here > > > > > > > > as the key and the proc as the value in the hash. Then the new key would > just overwrite the old. No more duplicate entries. > > > > And as for application level validations, I was thinking someone with a > shopping cart might have written their own validate_credit_card_number. Or > validate_password, where password requires at least one number. Basically, > some sort of validation that only makes sense in their particular > application. Though I suppose most people just use aspects for that. > > > > bryan > > > > > > > > On 12/16/05, Brian Bugh wrote: > > > I'm not sure I understand what you mean. The new code is functionally > > > identical to the old way, only it's using blocks and Proc objects > > > instead of using eval. Try this simple Nitro app with both the old and > > > new code: > > > > > > require 'nitro' > > > require 'og' > > > require 'user' > > > > > > Og.setup > > > > > > class ValidationTest > > > def index > > > "The number of validations for User is > > > #{User.validations.length}." > > > end > > > end > > > > > > Nitro.run ValidationTest > > > > > > Check it in the browser, and it will say 2, then touch user.rb and it > > > will say 4. The old way basically copy and pasted code into a function, > > > whereas now that code is a list of anonymous methods in an array that is > > > iterated. That array is only iterated when validate or valid? is called > > > - the same times as the long function was called before. Hopefully that > > > helps clarify the issue for you. > > > > > > -- > > > > > > I have thought about your suggestion, and I think it is a possibility. > > > Do you mean only store the validation list and each field like this: > > > > > > {:validate_unique => [:username], :validate_value => [:password]} > > > > > > If so, how would we determine what a validation code block was? One > > > option is to have a list of private instance methods (like > > > validate_values) that check the fields in question, but I am not sure if > > > having one function to declare it and one function to check it is ideal. > > > The names could be confusing because of their similarity. Using a > > > hashed set like that could possibly move the validation logic solely to > > > when valid? is called, rather than when the validation is first > > > declared. I like the idea and will try to think of some solutions. > > > > > > By the way, what are application level validations? Nitro application > > > or Og/Glue? I am not familiar at all with Nitro, because the project > > > I'm doing that got me interested in Og in the first place doesn't use > > > anything else. > > > > > > Brian B. > > > > > > > > > On Thu, 2005-12-15 at 23:20 -0800, Bryan Soto wrote: > > > > Interesting... I guess noone ever noticed since the code was eval'd on > > > > the first call made to #valid? in the previous implementation. The > > > > array was only iterated through when defining validate(). Now it's > > > > being iterated through on every call. > > > > > > > > Perhaps if, instead of an array, validations were stored in a hash > > > > with the key consisting of the validation type and field name, it > > > > would avoid the duplication and performance hit? It might make > > > > application level validations a bit more complicated, though I'm not > > > > sure if anyone actually uses them. Does anyone? > > > > > > > > On 12/15/05, Brian Bugh < brian at xsi-design.com> wrote: > > > > Ah, I see. The current release gem package does this as well, > > > > so it's a > > > > general issue with the way validations are handled. I'm > > > > innocent! ;) > > > > > > > > I've tested with extend_object and append_features methods and > > > > the > > > > on_included block, and I can't seem to find a reliable way to > > > > check if > > > > the file is being loaded/extended again. The problem is that > > > > when it is > > > > reloaded, the class is just reopened and declared the same way > > > > it was > > > > before. > > > > > > > > Any logic I can think of to add to validations for uniqueness > > > > checking > > > > will have a performance penalty in production, even though > > > > production > > > > doesn't have the reload issue. > > > > > > > > I will spend more time on this tomorrow to see if I can find > > > > a > > > > easy/quick solution for your upcoming release. > > > > > > > > Brian B. > > > > > > > > > > > > On Thu, 2005-12-15 at 13:24 -0800, Bryan Soto wrote: > > > > > Sorry if I wasn't clear. In debug mode, i.e. webrick, files > > > > are > > > > > automatically reloaded on change. I noticed after adding and > > > > removing a > > > > > field to test Mysql evolution that my validations had > > > > increased. Something > > > > > along the lines of: > > > > > > > > > > # user.rb > > > > > class User > > > > > property :username > > > > > property :password > > > > > > > > > > validate_unique :username > > > > > validate_value :password > > > > > end > > > > > > > > > > User.validations.size # => 2 > > > > > > > > > > # touch user.rb > > > > > > > > > > User.validations.size # => 4 > > > > > > > > > > assuming user.rb is a model class in a Nitro application. > > > > Basically, after > > > > > the touch is performed, the file is reloaded and the > > > > validations are added > > > > > anew to the already existing validations array (speculation > > > > on my part as to > > > > > your implementation) in the already existing User class. > > > > > > > > > > As I said, it's not that a big a deal. A stop and restart of > > > > the webrick > > > > > server clears it up. I just happended to notice twice as > > > > many error messages > > > > > as I expected from a form. Just make sure your production > > > > apps aren't in > > > > > debug mode. > > > > > > > > > > bryan > > > > > > > > > > > > > > _______________________________________________ > > > Nitro-general mailing list > > > Nitro-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Mon Dec 19 04:25:55 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 19 Dec 2005 11:25:55 +0200 Subject: [Nitro] Validations, was re: 0.26.0 preview In-Reply-To: References: <1134741023.12994.52.camel@localhost.localdomain> Message-ID: Bryan, seems you have attached the wrong patch (validation_key). Can you please resend? -g. On 12/18/05, Bryan Soto wrote: > Hi, > > I had some time last night, so I came up with two options for pending > release. > > Option 1, add_unique_error_msgs adds only unique error messages to the > errors list for the field. Validations size still increases (in debug mode > only due to auto-reload), but error messages list doesn't contain multiple > copies of the same message. > > Option 2, validation_key converts validations list to a hash and creates a > key object. Validations size doesn't increase but is a bit of a bigger > change. > > Both pass unit tests (at least the ones that run. I'm not able to complete > the one's for og). > > Anyone want to give them a try for testing purposes? > > bryan > > > On 12/16/05, Bryan Soto < bryan.a.soto at gmail.com > wrote: > > > > > > require 'nitro' > > require 'og' > > require 'user' > > > > require 'dev-utils/debug' > > > > Og.setup > > > > class ValidationTest > > def index > > out = "The number of validations for User is > #{User.validations.length}.
" > > u = User.new > > u.username = 'bryan' > > u.password = 'bryan' > > if u.valid? > > u.save > > else > > out << "
#{u.errors.errors.inspect}
" > > end > > out > > end > > end > > > > Nitro.run ValidationTest > > > >
> > > > Run against gems and dev version. > > > > Touch user.rb. Await reload message on console, then refresh browser. > > > > Notice how in gem version, the number of validations increases, but the > number of errors remains unchanged. > > > > Repeat using dev version. Notice that the number of validations increases > as well as the number of error message entries. > > > > Basically, the gem version evals the code _once_ in eval_validate > (glue/lib/validations.rb) the first time #valid? is called, so it ignores > the repeated validations. > > > > Hope this clears things up as too what I'm talking about. I need to brush > up on my communication skills. It all made sense to me every single time I > wrote 8^). > > > > -- > > > > As too future design, I was thinking something more like: > > > > > > > > class ValidationKey > > attr_reader :validation > > attr_reader :field_name > > > > def initialize(val, field) > > @validation, @field_name = val.to_s, field.to_s > > end > > > > def hash > > "#{@validation}-#{@field_name}".hash > > end > > > > def ==(other) > > self.validation == other.validation and self.field_name == > other.field_name > > end > > end > > > > vk = ValidationKey.new(:validate_unique, :username) > > > > validations[vk] = validate_unique_proc_goes_here > > > > > > > > as the key and the proc as the value in the hash. Then the new key would > just overwrite the old. No more duplicate entries. > > > > And as for application level validations, I was thinking someone with a > shopping cart might have written their own validate_credit_card_number. Or > validate_password, where password requires at least one number. Basically, > some sort of validation that only makes sense in their particular > application. Though I suppose most people just use aspects for that. > > > > bryan > > > > > > > > On 12/16/05, Brian Bugh wrote: > > > I'm not sure I understand what you mean. The new code is functionally > > > identical to the old way, only it's using blocks and Proc objects > > > instead of using eval. Try this simple Nitro app with both the old and > > > new code: > > > > > > require 'nitro' > > > require 'og' > > > require 'user' > > > > > > Og.setup > > > > > > class ValidationTest > > > def index > > > "The number of validations for User is > > > #{User.validations.length}." > > > end > > > end > > > > > > Nitro.run ValidationTest > > > > > > Check it in the browser, and it will say 2, then touch user.rb and it > > > will say 4. The old way basically copy and pasted code into a function, > > > whereas now that code is a list of anonymous methods in an array that is > > > iterated. That array is only iterated when validate or valid? is called > > > - the same times as the long function was called before. Hopefully that > > > helps clarify the issue for you. > > > > > > -- > > > > > > I have thought about your suggestion, and I think it is a possibility. > > > Do you mean only store the validation list and each field like this: > > > > > > {:validate_unique => [:username], :validate_value => [:password]} > > > > > > If so, how would we determine what a validation code block was? One > > > option is to have a list of private instance methods (like > > > validate_values) that check the fields in question, but I am not sure if > > > having one function to declare it and one function to check it is ideal. > > > The names could be confusing because of their similarity. Using a > > > hashed set like that could possibly move the validation logic solely to > > > when valid? is called, rather than when the validation is first > > > declared. I like the idea and will try to think of some solutions. > > > > > > By the way, what are application level validations? Nitro application > > > or Og/Glue? I am not familiar at all with Nitro, because the project > > > I'm doing that got me interested in Og in the first place doesn't use > > > anything else. > > > > > > Brian B. > > > > > > > > > On Thu, 2005-12-15 at 23:20 -0800, Bryan Soto wrote: > > > > Interesting... I guess noone ever noticed since the code was eval'd on > > > > the first call made to #valid? in the previous implementation. The > > > > array was only iterated through when defining validate(). Now it's > > > > being iterated through on every call. > > > > > > > > Perhaps if, instead of an array, validations were stored in a hash > > > > with the key consisting of the validation type and field name, it > > > > would avoid the duplication and performance hit? It might make > > > > application level validations a bit more complicated, though I'm not > > > > sure if anyone actually uses them. Does anyone? > > > > > > > > On 12/15/05, Brian Bugh < brian at xsi-design.com> wrote: > > > > Ah, I see. The current release gem package does this as well, > > > > so it's a > > > > general issue with the way validations are handled. I'm > > > > innocent! ;) > > > > > > > > I've tested with extend_object and append_features methods and > > > > the > > > > on_included block, and I can't seem to find a reliable way to > > > > check if > > > > the file is being loaded/extended again. The problem is that > > > > when it is > > > > reloaded, the class is just reopened and declared the same way > > > > it was > > > > before. > > > > > > > > Any logic I can think of to add to validations for uniqueness > > > > checking > > > > will have a performance penalty in production, even though > > > > production > > > > doesn't have the reload issue. > > > > > > > > I will spend more time on this tomorrow to see if I can find > > > > a > > > > easy/quick solution for your upcoming release. > > > > > > > > Brian B. > > > > > > > > > > > > On Thu, 2005-12-15 at 13:24 -0800, Bryan Soto wrote: > > > > > Sorry if I wasn't clear. In debug mode, i.e. webrick, files > > > > are > > > > > automatically reloaded on change. I noticed after adding and > > > > removing a > > > > > field to test Mysql evolution that my validations had > > > > increased. Something > > > > > along the lines of: > > > > > > > > > > # user.rb > > > > > class User > > > > > property :username > > > > > property :password > > > > > > > > > > validate_unique :username > > > > > validate_value :password > > > > > end > > > > > > > > > > User.validations.size # => 2 > > > > > > > > > > # touch user.rb > > > > > > > > > > User.validations.size # => 4 > > > > > > > > > > assuming user.rb is a model class in a Nitro application. > > > > Basically, after > > > > > the touch is performed, the file is reloaded and the > > > > validations are added > > > > > anew to the already existing validations array (speculation > > > > on my part as to > > > > > your implementation) in the already existing User class. > > > > > > > > > > As I said, it's not that a big a deal. A stop and restart of > > > > the webrick > > > > > server clears it up. I just happended to notice twice as > > > > many error messages > > > > > as I expected from a form. Just make sure your production > > > > apps aren't in > > > > > debug mode. > > > > > > > > > > bryan > > > > > > > > > > > > > > _______________________________________________ > > > Nitro-general mailing list > > > Nitro-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From rob at motionpath.com Mon Dec 19 10:46:00 2005 From: rob at motionpath.com (Rob Pitt) Date: Mon, 19 Dec 2005 15:46:00 +0000 Subject: [Nitro] Screw up by me In-Reply-To: References: Message-ID: <1135007161.21198.32.camel@robs-p4> Please don't release 0.26 until I have submitted the new constraints patch because while testing it I noticed I have deleted the join table creation routine from the pgsql adapter... Oops... sorry :) From george.moschovitis at gmail.com Mon Dec 19 10:56:28 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 19 Dec 2005 17:56:28 +0200 Subject: [Nitro] Screw up by me In-Reply-To: <1135007161.21198.32.camel@robs-p4> References: <1135007161.21198.32.camel@robs-p4> Message-ID: Ok, waiting for this ;-) On 12/19/05, Rob Pitt wrote: > Please don't release 0.26 until I have submitted the new constraints > patch because while testing it I noticed I have deleted the join table > creation routine from the pgsql adapter... > > Oops... sorry :) > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From humberaquino at gmail.com Mon Dec 19 15:45:33 2005 From: humberaquino at gmail.com (Humber Aquino) Date: Mon, 19 Dec 2005 17:45:33 -0300 Subject: [Nitro] Og fixtures for Time class Message-ID: <37fd0c50512191245r56e84d5fr59273d71aa500872@mail.gmail.com> Hi everyone! I'm having a little problem with the fixtures.. model.rb class SomeClass property :some_time, Time end some_class.yml something: some_time: 2005-12-19 09:00:00 # rails's fixture like tc_model.rb class TestModel < Test::Unit::TestCase def setup @og = Og.setup( :destroy => true, :store => :mysql, :name => 'test_db', :user => 'web_user', :password => '*******' ) og_fixture SomeClass end def test_all assert_equal Time.utc(2005,12,19,9,0,0) , @something.some_time end end When i run this test it saids that can't insert an string.. Glue doesn't parse the time an convert it to a Time object? How can i solve this? This is the output of the test: Loaded suite test/tc_model Started Database "test_db" dropped I, [2005-12-19T21:01:00.278501 #31274] INFO -- : Database 'test_db' not found! I, [2005-12-19T21:01:00.342666 #31274] INFO -- : Created table 'ogsomeclass'. E Finished in 0.211703 seconds. 1) Error: test_all(TestModel): NoMethodError: undefined method `strftime' for "2005-12-19 09:00:00":String /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sql.rb:24:in `timestamp' (eval):5:in `og_insert' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store.rb:100:in `save' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:14:in `save' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/test/testcase.rb:46:in `og_fixture' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/test/testcase.rb:45:in `og_fixture' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/test/testcase.rb:42:in `og_fixture' test/tc_model.rb:18:in `setup' 1 tests, 0 assertions, 0 failures, 1 errors Please help me :D Thanks in advance Humber From zimba.tm at gmail.com Mon Dec 19 16:38:10 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Mon, 19 Dec 2005 22:38:10 +0100 Subject: [Nitro] BUG: Using Nitro::Controller as main controller breaks template_root Message-ID: <3ff63f9b0512191338i40d557f7y@mail.gmail.com> Sorry I don't have the time to debug this right now but I still wantto report it. ========== test case ========= require 'nitro' class MainController < Nitro::Controllerend class ChildController < Nitro::Controllerend Nitro::Server.map = { '/child' => ChildController, '/' => MainController} Nitro.run ========================= === pulic folder ===index.xhtmlchild/ index.xhtml============ Replace MainController with Nitro::Controller in Server.map.Goto to http://localhost:9999/child with your browser. nitro will use public/index.xhtml instead of public/child/index.xhtml --Cheers, zimba http://zimba.oree.ch From chris at motionpath.com Mon Dec 19 16:58:11 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Mon, 19 Dec 2005 21:58:11 +0000 Subject: [Nitro] BUG: Using Nitro::Controller as main controller breaks template_root In-Reply-To: <3ff63f9b0512191338i40d557f7y@mail.gmail.com> References: <3ff63f9b0512191338i40d557f7y@mail.gmail.com> Message-ID: <457CF527-C861-4CB4-939D-4F4BE65BBEED@motionpath.com> Can't seem to replicate this zimba? I get taken to the correct xhtml. what version are you using? chrisfarms. On 19 Dec 2005, at 21:38, zimba-tm wrote: > Sorry I don't have the time to debug this right now but I still > wantto report it. > ========== test case ========= > require 'nitro' > class MainController < Nitro::Controllerend > class ChildController < Nitro::Controllerend > Nitro::Server.map = { '/child' => ChildController, '/' => > MainController} > Nitro.run > ========================= > === pulic folder ===index.xhtmlchild/ index.xhtml============ > Replace MainController with Nitro::Controller in Server.map.Goto to > http://localhost:9999/child with your browser. > nitro will use public/index.xhtml instead of public/child/index.xhtml > --Cheers, zimba > http://zimba.oree.ch > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051219/32a0a05b/attachment.html From epiperak at softlab.ece.ntua.gr Mon Dec 19 20:55:08 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 20 Dec 2005 03:55:08 +0200 (EET) Subject: [Nitro] Og fixtures for Time class In-Reply-To: <37fd0c50512191245r56e84d5fr59273d71aa500872@mail.gmail.com> References: <37fd0c50512191245r56e84d5fr59273d71aa500872@mail.gmail.com> Message-ID: Hi!, I had the same error some time ago, but not on an assert. I am not 100% sure how I resolved it, but first thing I would suggest is do not use Time.utc but Time.new, secondly create and save an object before testing it with assert (I can not see that in your code), try def test_all sc = SomeClass.create sc.some_time = tt = Time.now sc.save ss = SomeClass[1] # load it from the db assert_equal tt, ss.some_time end That would work (I guess) Emmanouil > Hi everyone! I'm having a little problem with the fixtures.. > > model.rb > class SomeClass > property :some_time, Time > end > > some_class.yml > something: > some_time: 2005-12-19 09:00:00 # rails's fixture like > > > tc_model.rb > class TestModel < Test::Unit::TestCase > > def setup > @og = Og.setup( > :destroy => true, > :store => :mysql, > :name => 'test_db', > :user => 'web_user', > :password => '*******' > ) > og_fixture SomeClass > end > > def test_all > assert_equal Time.utc(2005,12,19,9,0,0) , @something.some_time > end > end > > When i run this test it saids that can't insert an string.. Glue > doesn't parse the time an convert it to a Time object? How can i solve > this? > > This is the output of the test: > > Loaded suite test/tc_model > Started > Database "test_db" dropped > I, [2005-12-19T21:01:00.278501 #31274] INFO -- : Database 'test_db' not found! > I, [2005-12-19T21:01:00.342666 #31274] INFO -- : Created table 'ogsomeclass'. > E > Finished in 0.211703 seconds. > > 1) Error: > test_all(TestModel): > NoMethodError: undefined method `strftime' for "2005-12-19 09:00:00":String > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sql.rb:24:in `timestamp' > (eval):5:in `og_insert' > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store.rb:100:in `save' > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:14:in `save' > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/test/testcase.rb:46:in > `og_fixture' > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/test/testcase.rb:45:in > `og_fixture' > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/test/testcase.rb:42:in > `og_fixture' > test/tc_model.rb:18:in `setup' > > 1 tests, 0 assertions, 0 failures, 1 errors > > Please help me :D > > Thanks in advance > > Humber > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From george.moschovitis at gmail.com Tue Dec 20 04:06:47 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 20 Dec 2005 11:06:47 +0200 Subject: [Nitro] Validations, was re: 0.26.0 preview In-Reply-To: References: <1134741023.12994.52.camel@localhost.localdomain> Message-ID: Bryan, please resend me the patch with this implementation! regards, George. On 12/17/05, Bryan Soto wrote: > > > require 'nitro' > require 'og' > require 'user' > > require 'dev-utils/debug' > > Og.setup > > class ValidationTest > def index > out = "The number of validations for User is > #{User.validations.length}.
" > u = User.new > u.username = 'bryan' > u.password = 'bryan' > if u.valid? > u.save > else > out << "
#{u.errors.errors.inspect}
" > end > out > end > end > > Nitro.run ValidationTest > >
> > Run against gems and dev version. > > Touch user.rb. Await reload message on console, then refresh browser. > > Notice how in gem version, the number of validations increases, but the > number of errors remains unchanged. > > Repeat using dev version. Notice that the number of validations increases > as well as the number of error message entries. > > Basically, the gem version evals the code _once_ in eval_validate > (glue/lib/validations.rb) the first time #valid? is called, so it ignores > the repeated validations. > > Hope this clears things up as too what I'm talking about. I need to brush > up on my communication skills. It all made sense to me every single time I > wrote 8^). > > -- > > As too future design, I was thinking something more like: > > > > class ValidationKey > attr_reader :validation > attr_reader :field_name > > def initialize(val, field) > @validation, @field_name = val.to_s, field.to_s > end > > def hash > "#{@validation}-#{@field_name}".hash > end > > def ==(other) > self.validation == other.validation and self.field_name == > other.field_name > end > end > > vk = ValidationKey.new(:validate_unique, :username) > > validations[vk] = validate_unique_proc_goes_here > > > > as the key and the proc as the value in the hash. Then the new key would > just overwrite the old. No more duplicate entries. > > And as for application level validations, I was thinking someone with a > shopping cart might have written their own validate_credit_card_number. Or > validate_password, where password requires at least one number. Basically, > some sort of validation that only makes sense in their particular > application. Though I suppose most people just use aspects for that. > > bryan > > > On 12/16/05, Brian Bugh wrote: > > I'm not sure I understand what you mean. The new code is functionally > > identical to the old way, only it's using blocks and Proc objects > > instead of using eval. Try this simple Nitro app with both the old and > > new code: > > > > require 'nitro' > > require 'og' > > require 'user' > > > > Og.setup > > > > class ValidationTest > > def index > > "The number of validations for User is > > #{User.validations.length}." > > end > > end > > > > Nitro.run ValidationTest > > > > Check it in the browser, and it will say 2, then touch user.rb and it > > will say 4. The old way basically copy and pasted code into a function, > > whereas now that code is a list of anonymous methods in an array that is > > iterated. That array is only iterated when validate or valid? is called > > - the same times as the long function was called before. Hopefully that > > helps clarify the issue for you. > > > > -- > > > > I have thought about your suggestion, and I think it is a possibility. > > Do you mean only store the validation list and each field like this: > > > > {:validate_unique => [:username], :validate_value => [:password]} > > > > If so, how would we determine what a validation code block was? One > > option is to have a list of private instance methods (like > > validate_values) that check the fields in question, but I am not sure if > > having one function to declare it and one function to check it is ideal. > > The names could be confusing because of their similarity. Using a > > hashed set like that could possibly move the validation logic solely to > > when valid? is called, rather than when the validation is first > > declared. I like the idea and will try to think of some solutions. > > > > By the way, what are application level validations? Nitro application > > or Og/Glue? I am not familiar at all with Nitro, because the project > > I'm doing that got me interested in Og in the first place doesn't use > > anything else. > > > > Brian B. > > > > > > On Thu, 2005-12-15 at 23:20 -0800, Bryan Soto wrote: > > > Interesting... I guess noone ever noticed since the code was eval'd on > > > the first call made to #valid? in the previous implementation. The > > > array was only iterated through when defining validate(). Now it's > > > being iterated through on every call. > > > > > > Perhaps if, instead of an array, validations were stored in a hash > > > with the key consisting of the validation type and field name, it > > > would avoid the duplication and performance hit? It might make > > > application level validations a bit more complicated, though I'm not > > > sure if anyone actually uses them. Does anyone? > > > > > > On 12/15/05, Brian Bugh < brian at xsi-design.com> wrote: > > > Ah, I see. The current release gem package does this as well, > > > so it's a > > > general issue with the way validations are handled. I'm > > > innocent! ;) > > > > > > I've tested with extend_object and append_features methods and > > > the > > > on_included block, and I can't seem to find a reliable way to > > > check if > > > the file is being loaded/extended again. The problem is that > > > when it is > > > reloaded, the class is just reopened and declared the same way > > > it was > > > before. > > > > > > Any logic I can think of to add to validations for uniqueness > > > checking > > > will have a performance penalty in production, even though > > > production > > > doesn't have the reload issue. > > > > > > I will spend more time on this tomorrow to see if I can find > > > a > > > easy/quick solution for your upcoming release. > > > > > > Brian B. > > > > > > > > > On Thu, 2005-12-15 at 13:24 -0800, Bryan Soto wrote: > > > > Sorry if I wasn't clear. In debug mode, i.e. webrick, files > > > are > > > > automatically reloaded on change. I noticed after adding and > > > removing a > > > > field to test Mysql evolution that my validations had > > > increased. Something > > > > along the lines of: > > > > > > > > # user.rb > > > > class User > > > > property :username > > > > property :password > > > > > > > > validate_unique :username > > > > validate_value :password > > > > end > > > > > > > > User.validations.size # => 2 > > > > > > > > # touch user.rb > > > > > > > > User.validations.size # => 4 > > > > > > > > assuming user.rb is a model class in a Nitro application. > > > Basically, after > > > > the touch is performed, the file is reloaded and the > > > validations are added > > > > anew to the already existing validations array (speculation > > > on my part as to > > > > your implementation) in the already existing User class. > > > > > > > > As I said, it's not that a big a deal. A stop and restart of > > > the webrick > > > > server clears it up. I just happended to notice twice as > > > many error messages > > > > as I expected from a form. Just make sure your production > > > apps aren't in > > > > debug mode. > > > > > > > > bryan > > > > > > > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From zimba.tm at gmail.com Tue Dec 20 06:09:24 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Tue, 20 Dec 2005 12:09:24 +0100 Subject: [Nitro] BUG: Using Nitro::Controller as main controller breaks template_root In-Reply-To: <457CF527-C861-4CB4-939D-4F4BE65BBEED@motionpath.com> References: <3ff63f9b0512191338i40d557f7y@mail.gmail.com> <457CF527-C861-4CB4-939D-4F4BE65BBEED@motionpath.com> Message-ID: <3ff63f9b0512200309y16e5a36u@mail.gmail.com> Hi Chris, I'm using glycerin at the moment. But I didn't had time to really testthis behavior. I'll try to come up with a test case today. On 19/12/05, Chris Farmiloe wrote:>> Can't seem to replicate this zimba? I get taken to the correct xhtml.>> what version are you using?>>>> chrisfarms.>>>> On 19 Dec 2005, at 21:38, zimba-tm wrote:>> Sorry I don't have the time to debug this right now but I still wantto> report it.> ========== test case =========> require 'nitro'> class MainController < Nitro::Controllerend> class ChildController < Nitro::Controllerend> Nitro::Server.map = { '/child' => ChildController, '/' => MainController}> Nitro.run> =========================> === pulic folder ===index.xhtmlchild/ index.xhtml============> Replace MainController with Nitro::Controller in Server.map.Goto to> http://localhost:9999/child with your browser.> nitro will use public/index.xhtml instead of public/child/index.xhtml> --Cheers, zimba> http://zimba.oree.ch> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general>> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general>>> --Cheers, zimba http://zimba.oree.ch From zimba.tm at gmail.com Tue Dec 20 06:21:33 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Tue, 20 Dec 2005 12:21:33 +0100 Subject: [Nitro] help with og! In-Reply-To: <3ff63f9b0512121454v36ef9c78m@mail.gmail.com> References: <3ff63f9b0512020240u7485b18cy@mail.gmail.com> <4b6f054f0512050807h38b99171gab5824ebfcba0dd9@mail.gmail.com> <3ff63f9b0512051213y2ef6bd31x@mail.gmail.com> <4b6f054f0512111612k276b1c81p6332401b74345500@mail.gmail.com> <3ff63f9b0512120501i2dda1a53h@mail.gmail.com> <4b6f054f0512120623j734df3f4ke520f8bd6e0b6e4f@mail.gmail.com> <3ff63f9b0512121454v36ef9c78m@mail.gmail.com> Message-ID: <3ff63f9b0512200321i65f1918bh@mail.gmail.com> Hello, I didn't had much reaction on this topic. What do you think of thecontent of this page ? http://www.nitrohq.com/view/OgRevisited It's a number of ideas to implement Og differently. Some can be portedto Og directly, some would necessitate big changes. Much people here work a lot, but I would appreciate feedback. Just aword is enough :-) --Cheers, zimba http://zimba.oree.ch From george.moschovitis at gmail.com Tue Dec 20 06:31:17 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 20 Dec 2005 13:31:17 +0200 Subject: [Nitro] Nitro Screencasts Message-ID: Dear devs, while fixing the final issues for the 0.26.0 release I took some time to experiment with vnc2swf to create some screen casts for Nitro / Og. Nitro is a sophisticated Web2.0 framework that utilizes Ruby and Javascript and Og is an innovative, transparent and efficient ORM library. You can find the first two screen casts here: http://www.nitrohq.com/view/Videos These two videos are experimental and certainly don't demonstrate the full power of Nitro and Og (far from it). But I hope you will like them anyway ;-) Stay tuned for more impressive screen casts real soon! For more information on Nitro/Og surf www.nitrohq.com or install the gem: gem install nitro best regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From aglarond at gmail.com Tue Dec 20 07:50:56 2005 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Tue, 20 Dec 2005 13:50:56 +0100 Subject: [Nitro] Nitro Screencasts In-Reply-To: References: Message-ID: <55c107bf0512200450p72673d4bsc2ea6378f2ae0271@mail.gmail.com> Hi George, On 12/20/05, George Moschovitis wrote: > > > These two videos are experimental and certainly don't demonstrate the > full power of Nitro and > Og (far from it). But I hope you will like them anyway ;-) Stay tuned > for more impressive screen casts real soon! > > These look great! It's good to have a couple of demos like this to help people get off the ground with Nitro/Og. It's also good to see exactly where we need to go when something doesn't work right away. Great job! - Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051220/c4ec184d/attachment.html From chris at motionpath.com Tue Dec 20 07:57:44 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Tue, 20 Dec 2005 12:57:44 +0000 Subject: [Nitro] Nitro Screencasts In-Reply-To: <55c107bf0512200450p72673d4bsc2ea6378f2ae0271@mail.gmail.com> References: <55c107bf0512200450p72673d4bsc2ea6378f2ae0271@mail.gmail.com> Message-ID: <8C727AA5-0F7C-4333-9BEA-70C44F4C62D6@motionpath.com> yeah played, g. much better than TV chrisfarms. On 20 Dec 2005, at 12:50, Dimitri Aivaliotis wrote: > These look great! It's good to have a couple of demos like this to > help people get off the ground with Nitro/Og. It's also good to > see exactly where we need to go when something doesn't work right > away. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051220/2670b69d/attachment.html From zimba.tm at gmail.com Tue Dec 20 11:27:56 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Tue, 20 Dec 2005 17:27:56 +0100 Subject: [Nitro] BUG: Using Nitro::Controller as main controller breaks template_root In-Reply-To: <3ff63f9b0512200309y16e5a36u@mail.gmail.com> References: <3ff63f9b0512191338i40d557f7y@mail.gmail.com> <457CF527-C861-4CB4-939D-4F4BE65BBEED@motionpath.com> <3ff63f9b0512200309y16e5a36u@mail.gmail.com> Message-ID: <3ff63f9b0512200827t1caccc3ao@mail.gmail.com> Here are the files to reproduce the bug. Put index.xhtml in public/ and public/child/. On 20/12/05, zimba-tm wrote: > Hi Chris, > > I'm using glycerin at the moment. But I didn't had time to really test > this behavior. I'll try to come up with a test case today. > > > On 19/12/05, Chris Farmiloe wrote: > > > > Can't seem to replicate this zimba? I get taken to the correct xhtml. > > > > what version are you using? > > > > > > > > chrisfarms. > > > > > > > > On 19 Dec 2005, at 21:38, zimba-tm wrote: > > > > Sorry I don't have the time to debug this right now but I still wantto > > report it. > > ========== test case ========= > > require 'nitro' > > class MainController < Nitro::Controllerend > > class ChildController < Nitro::Controllerend > > Nitro::Server.map = { '/child' => ChildController, '/' => MainController} > > Nitro.run > > ========================= > > === pulic folder ===index.xhtmlchild/ index.xhtml============ > > Replace MainController with Nitro::Controller in Server.map.Goto to > > http://localhost:9999/child with your browser. > > nitro will use public/index.xhtml instead of public/child/index.xhtml > > --Cheers, zimba > > http://zimba.oree.ch > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > > > > -- > Cheers, > zimba > > http://zimba.oree.ch > -- Cheers, zimba http://zimba.oree.ch -------------- next part -------------- A non-text attachment was scrubbed... Name: run.rb Type: application/x-ruby Size: 264 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051220/b7854091/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: index.xhtml Type: application/xhtml+xml Size: 103 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051220/b7854091/attachment.xhtml From chris at motionpath.com Tue Dec 20 11:49:29 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Tue, 20 Dec 2005 16:49:29 +0000 Subject: [Nitro] BUG: Using Nitro::Controller as main controller breaks template_root In-Reply-To: <3ff63f9b0512200827t1caccc3ao@mail.gmail.com> References: <3ff63f9b0512191338i40d557f7y@mail.gmail.com> <457CF527-C861-4CB4-939D-4F4BE65BBEED@motionpath.com> <3ff63f9b0512200309y16e5a36u@mail.gmail.com> <3ff63f9b0512200827t1caccc3ao@mail.gmail.com> Message-ID: <10FA16C7-5D1A-4E26-9111-A10EDFC21D80@motionpath.com> sorry Zimba still cant find fault. I changed the index.xhtml file in the /child dir (so I could see which template it was using) and visiting /, /index, /child and /child/index all gave me the correct templates. removing the index.xhtml from public/child dir does make the template default back to the one in public. this behaviour is because if nitro failed to find a template in /child (ChildController's default template_root) it will look in it's parent's template_root. normally Nitro::Controller (ChildController's parent) wouldn't have a template_root... but dispatcher gave it one when it was Mounted directly. sorry I can't be of more help, can't replicate :( Chris Farmiloe On 20 Dec 2005, at 16:27, zimba-tm wrote: > Here are the files to reproduce the bug. > > Put index.xhtml in public/ and public/child/. > > On 20/12/05, zimba-tm wrote: >> Hi Chris, >> >> I'm using glycerin at the moment. But I didn't had time to really >> test >> this behavior. I'll try to come up with a test case today. >> >> >> On 19/12/05, Chris Farmiloe wrote: >>> >>> Can't seem to replicate this zimba? I get taken to the correct >>> xhtml. >>> >>> what version are you using? >>> >>> >>> >>> chrisfarms. >>> >>> >>> >>> On 19 Dec 2005, at 21:38, zimba-tm wrote: >>> >>> Sorry I don't have the time to debug this right now but I still >>> wantto >>> report it. >>> ========== test case ========= >>> require 'nitro' >>> class MainController < Nitro::Controllerend >>> class ChildController < Nitro::Controllerend >>> Nitro::Server.map = { '/child' => ChildController, '/' => >>> MainController} >>> Nitro.run >>> ========================= >>> === pulic folder ===index.xhtmlchild/ index.xhtml============ >>> Replace MainController with Nitro::Controller in Server.map.Goto to >>> http://localhost:9999/child with your browser. >>> nitro will use public/index.xhtml instead of public/child/ >>> index.xhtml >>> --Cheers, zimba >>> http://zimba.oree.ch >>> _______________________________________________ >>> Nitro-general mailing list >>> Nitro-general at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/nitro-general >>> >>> _______________________________________________ >>> Nitro-general mailing list >>> Nitro-general at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/nitro-general >>> >>> >>> >> >> >> -- >> Cheers, >> zimba >> >> http://zimba.oree.ch >> > > > -- > Cheers, > zimba > > http://zimba.oree.ch > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051220/3efce0da/attachment.html From tim at keow.org Tue Dec 20 13:13:52 2005 From: tim at keow.org (Tim Larson) Date: Tue, 20 Dec 2005 18:13:52 +0000 Subject: [Nitro] taggable demodulize Message-ID: <20051220181352.GL25600@localhost> In taggable.rb's method tag there needs to be a call to demodulize to strip any module name off of the field name to match how the rest of Og strips module names before creating or refering to field names. (Not sure if this is good, but at least it is consistent.) --Tim Larson From vanek at acd.net Tue Dec 20 13:28:05 2005 From: vanek at acd.net (Lou Vanek) Date: Tue, 20 Dec 2005 18:28:05 +0000 Subject: [Nitro] Nitro Screencasts In-Reply-To: References: Message-ID: and for those who prefer to have keyboard 'pause', 'back', and 'forward' control, you can download the flash file, curl http://www.nitrohq.com/videos/nitro.swf > nitro.swf and open it with Macromedia Flash Player. It's an impressive video. George Moschovitis wrote: > Dear devs, > > while fixing the final issues for the 0.26.0 release I took some time > to experiment with > vnc2swf to create some screen casts for Nitro / Og. Nitro is a > sophisticated Web2.0 framework that utilizes Ruby and Javascript and > Og is an innovative, transparent and efficient ORM library. > > You can find the first two screen casts here: > > http://www.nitrohq.com/view/Videos > > These two videos are experimental and certainly don't demonstrate the > full power of Nitro and > Og (far from it). But I hope you will like them anyway ;-) Stay tuned > for more impressive screen casts real soon! > > For more information on Nitro/Og surf www.nitrohq.com or install the gem: > > gem install nitro > > > best regards, > George. > > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com From epiperak at softlab.ece.ntua.gr Tue Dec 20 23:38:45 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Wed, 21 Dec 2005 06:38:45 +0200 (EET) Subject: [Nitro] Nitro Screencasts In-Reply-To: References: Message-ID: Good work G, That is an easy way for newbies to learn... E.P. > Dear devs, > > while fixing the final issues for the 0.26.0 release I took some time > to experiment with > vnc2swf to create some screen casts for Nitro / Og. Nitro is a > sophisticated Web2.0 framework that utilizes Ruby and Javascript and > Og is an innovative, transparent and efficient ORM library. > > You can find the first two screen casts here: > > http://www.nitrohq.com/view/Videos > > These two videos are experimental and certainly don't demonstrate the > full power of Nitro and > Og (far from it). But I hope you will like them anyway ;-) Stay tuned > for more impressive screen casts real soon! > > For more information on Nitro/Og surf www.nitrohq.com or install the gem: > > gem install nitro > > > best regards, > George. > > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From epiperak at softlab.ece.ntua.gr Tue Dec 20 23:43:25 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Wed, 21 Dec 2005 06:43:25 +0200 (EET) Subject: [Nitro] Nitro Screencasts In-Reply-To: References: Message-ID: > curl http://www.nitrohq.com/videos/nitro.swf > nitro.swf or just http://www.nitrohq.com/videos/nitro.swf and save the page and http://www.nitrohq.com/videos/nitro3.swf Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From george.moschovitis at gmail.com Wed Dec 21 04:53:40 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 21 Dec 2005 11:53:40 +0200 Subject: [Nitro] help with og! In-Reply-To: <3ff63f9b0512200321i65f1918bh@mail.gmail.com> References: <4b6f054f0512050807h38b99171gab5824ebfcba0dd9@mail.gmail.com> <3ff63f9b0512051213y2ef6bd31x@mail.gmail.com> <4b6f054f0512111612k276b1c81p6332401b74345500@mail.gmail.com> <3ff63f9b0512120501i2dda1a53h@mail.gmail.com> <4b6f054f0512120623j734df3f4ke520f8bd6e0b6e4f@mail.gmail.com> <3ff63f9b0512121454v36ef9c78m@mail.gmail.com> <3ff63f9b0512200321i65f1918bh@mail.gmail.com> Message-ID: zimb, will get back to this after 0.26.0 is released, be patient for some more days. thanks for your efforts ;-) -g. On 12/20/05, zimba-tm wrote: > Hello, > I didn't had much reaction on this topic. What do you think of thecontent of this page ? > http://www.nitrohq.com/view/OgRevisited > It's a number of ideas to implement Og differently. Some can be portedto Og directly, some would necessitate big changes. > Much people here work a lot, but I would appreciate feedback. Just aword is enough :-) > --Cheers, zimba > http://zimba.oree.ch > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Wed Dec 21 09:17:41 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 21 Dec 2005 16:17:41 +0200 Subject: [Nitro] Nitro + Og 0.26.0: New auto admin, scaffolding, morphing, sweeper, revisable, searchable Message-ID: Dear devs, New versions of Nitro and Og were just released! homepage: http://www.nitrohq.com install: gem install nitro download: http://rubyforge.org/projects/nitro/ irc: irce.freenode.net #nitro mailing list: http://rubyforge.org/pipermail/nitro-general/ What's new: Another step closer to web programming nirvana. This release features completely recoded scaffolding, an auto admin system, a recoded template-morphing system, a new intelligent dispatcher that handles both nice urls and general structure, and so much more. Moreover, this is the release with the most community contributions. Download now! Most notable changes: * New, intelligent dispatcher handles nice urls automatically, without explicit rewrite rules. At the same time, it handles sub directories, so you are free to design your app's structure as you like. * New template morphing implementation. The morphing compiler is fully customizable. You can implement your own morphers and add them to the morphing system, here for example is the new selected_if morpher: becomes * New Sweeper mixin. Using this mixin allows you to keep the cleanup logic in one place. This logic is called automagically by many default Nitro/Og methods (for example Og insert/update, scaffolding, etc). You can fully customize the behaviour. class Article include Sweeper def sweep_affected(action = :all) expire_affected_output('articles/view') ... end end a = Article[1] a.title = 'New' a.save # => calls expire_affected. This mixin is typically used to automatically clean up output caching files from the filesystem, but you can use it to remove temp rows from the database, or temp objects from a drb server or anything you like. * Searchable mixin. Include this mixin to your classes to make them searchable by the auto administration system. * Added two new session managers (OgSession, FileSession), cleaned up the session code. * Better validations implementation. Cleaner code, less evals, more flexible and easier to extend. * New scaffolding / auto administration system. The implementation is much cleaner and easier to customize. It leverages the latest advancements (dispatcher, sweeper, etc) and adds search support, pager, breadcrumps and more. You can define your own controls to handle properties and relations. Stay tuned for more stuff in the near future. * New Og revisable mixin. Just include this mixin in your classes and get db backed revision support for free. Here comes an example: class Article is Revisable property :body, String, :revisable => true property :title, String end Automatically generates the Revision class (and the backend schema): class Article::Revision article.revisions article.revise do |a| a.title = 'hello' a.body = 'world' end article.rollback(4) * Bug fixed KirbyBase Og adapter. This works great with the new 2.5 gem. * Added more rational defaults, and many predefined options to minimize the amount of setup needed to get your app running. Of course you can still customize just about everything in Nitro. * Improvements to PostgreSQL automatic generation of foreign key constraints. * Added evolution support to the MySql store. * Upgrated to Prototype 1.4 and Scriptaculous 1.5 * Updated the examples, check out the improved blog and why_wiki examples. * Many, many, many bug fixes and smaller improvements. Nitro provides everything you need to develop professional Web applications using Ruby and Javascript. Nitro redefines Rapid Application Development by providing a clean, yet efficient API, a layer of domain specific languages implemented on top of Ruby and the most powerful and elegant object relational mapping solution available everywhere. have fun, George Moschovitis -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From vikingtux at gmail.com Wed Dec 21 10:46:37 2005 From: vikingtux at gmail.com (Alexandre Gravem) Date: Wed, 21 Dec 2005 13:46:37 -0200 Subject: [Nitro] Nitro Screencasts In-Reply-To: References: Message-ID: <40b05ebe0512210746q3bb6d993xf3b823f04972729e@mail.gmail.com> On 12/21/05, Emmanuel Piperakis wrote: > or just http://www.nitrohq.com/videos/nitro.swf and save the page > and http://www.nitrohq.com/videos/nitro3.swf or even: wget http://www.nitrohq.com/videos/nitro.swf ;) Alexandre Gravem From james_b at neurogami.com Wed Dec 21 12:12:33 2005 From: james_b at neurogami.com (James Britt) Date: Wed, 21 Dec 2005 10:12:33 -0700 Subject: [Nitro] Nitro 0.26 error: undefined method `is' for Nitro::Session:Class (NoMethodError) Message-ID: <43A98D01.4090706@neurogami.com> I update Nitro, and just tried running a Nitro app under CGI on a WinXP box, and I get an exception in session.rb. c:/ruby/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/session.rb:30: undefined method `is' for Nitro::Session:Class (NoMethodError) This is line 29/30: class Session < Hash is Expirable Where is 'is' defined? Thanks, James -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From james_b at neurogami.com Wed Dec 21 13:12:41 2005 From: james_b at neurogami.com (James Britt) Date: Wed, 21 Dec 2005 11:12:41 -0700 Subject: [Nitro] Undefined method 'is' in session.rb Message-ID: <43A99B19.3010006@neurogami.com> I updated Nitro, and I just tried running a Nitro app under CGI on a WinXP box, and I get an exception in session.rb. c:/ruby/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/session.rb:30: undefined method `is' for Nitro::Session:Class (NoMethodError) This is line 29/30: class Session < Hash is Expirable Where is 'is' defined? Thanks, James -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From m.fellinger at gmail.com Wed Dec 21 13:42:52 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Wed, 21 Dec 2005 19:42:52 +0100 Subject: [Nitro] Undefined method 'is' in session.rb In-Reply-To: <43A99B19.3010006@neurogami.com> References: <43A99B19.3010006@neurogami.com> Message-ID: <200512211942.57449.m.fellinger@gmail.com> You have to give it some property before, since this class is not enchanted with Og yet and so the keyword is not interpreted. class Session < Hash property :foo, String is Expirable end should work but, let me warn you - i have no idea if a (class Session < Hash) works as expected... Am Mittwoch, 21. Dezember 2005 19:12 schrieb James Britt: > I updated Nitro, and I just tried running a Nitro app under CGI on a > WinXP box, and I get an exception in session.rb. > > c:/ruby/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/session.rb:30: > undefined method `is' for Nitro::Session:Class (NoMethodError) > > This is line 29/30: > > class Session < Hash > is Expirable > > > > Where is 'is' defined? > > > > Thanks, > > > James -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051221/3e5cebb6/attachment.bin From bryan.a.soto at gmail.com Wed Dec 21 15:18:38 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 21 Dec 2005 12:18:38 -0800 Subject: [Nitro] Has anyone else been missing emails from the mailing list? Message-ID: So far I've missed: George's three requests for a resend on my validation key patch (Sorry George), Nitro/Og 0.26.0 Announcement, James Britt's undefined method 'is' in session, but have Michael's follow up, Tim Larson's Taggable demodulize, and an email each from Nitro Screencasts and Using Nitro::Controller as main. Using gmail. List archives at http://rubyforge.org/pipermail/nitro-general/2005-December/thread.html. I don't use filters and my spam and trash are empty, so I'm somewhat confused... Thanks for any help, bryan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051221/f501fd7b/attachment.html From james_b at neurogami.com Wed Dec 21 15:44:22 2005 From: james_b at neurogami.com (James Britt) Date: Wed, 21 Dec 2005 13:44:22 -0700 Subject: [Nitro] Undefined method 'is' in session.rb In-Reply-To: <200512211942.57449.m.fellinger@gmail.com> References: <43A99B19.3010006@neurogami.com> <200512211942.57449.m.fellinger@gmail.com> Message-ID: <43A9BEA6.7020402@neurogami.com> Michael Fellinger wrote: > You have to give it some property before, since this class is not enchanted > with Og yet and so the keyword is not interpreted. The error occurs in code that is part of Nitro. I should not have to change the distributed library, should I? > > class Session < Hash > property :foo, String > is Expirable > end > > should work > but, let me warn you - i have no idea if a (class Session < Hash) works as > expected... The application in question works fine with Nitro 0.24.0, but never worked with 0.25 because that version has a broken CGI. Now I want to see if I can run the app under CGI with 0.26.0, but apparently there have been more changes, and I want to know what I need to do o run a 0.24 app with 0.26. Thanks, James -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From tim at keow.org Wed Dec 21 15:45:36 2005 From: tim at keow.org (Tim Larson) Date: Wed, 21 Dec 2005 20:45:36 +0000 Subject: [Nitro] Has anyone else been missing emails from the mailing list? In-Reply-To: References: Message-ID: <20051221204535.GB6467@localhost> On Wed, Dec 21, 2005 at 12:18:38PM -0800, Bryan Soto wrote: > So far I've missed: ...list of messages... FWIW, I believe I _have_ received all of those messages. --Tim Larson From rob at motionpath.com Wed Dec 21 15:51:50 2005 From: rob at motionpath.com (Rob Pitt) Date: Wed, 21 Dec 2005 20:51:50 +0000 Subject: [Nitro] Has anyone else been missing emails from the mailing list? In-Reply-To: <20051221204535.GB6467@localhost> References: <20051221204535.GB6467@localhost> Message-ID: <1135198310.16291.6.camel@robs-p4> What messages? :) On Wed, 2005-12-21 at 20:45 +0000, Tim Larson wrote: > On Wed, Dec 21, 2005 at 12:18:38PM -0800, Bryan Soto wrote: > > So far I've missed: > ...list of messages... > > FWIW, I believe I _have_ received all of those messages. > > --Tim Larson > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From bryan.a.soto at gmail.com Wed Dec 21 16:42:45 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 21 Dec 2005 13:42:45 -0800 Subject: [Nitro] Has anyone else been missing emails from the mailing list? In-Reply-To: <1135198310.16291.6.camel@robs-p4> References: <20051221204535.GB6467@localhost> <1135198310.16291.6.camel@robs-p4> Message-ID: And just for your amusment Rob, you caught me for a few seconds. ;) Maybe a gmail thing then... bryan On 12/21/05, Rob Pitt wrote: > > What messages? :) > > On Wed, 2005-12-21 at 20:45 +0000, Tim Larson wrote: > > On Wed, Dec 21, 2005 at 12:18:38PM -0800, Bryan Soto wrote: > > > So far I've missed: > > ...list of messages... > > > > FWIW, I believe I _have_ received all of those messages. > > > > --Tim Larson > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051221/9f8a266f/attachment.html From m.fellinger at gmail.com Wed Dec 21 17:16:12 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Wed, 21 Dec 2005 23:16:12 +0100 Subject: [Nitro] Has anyone else been missing emails from the mailing list? In-Reply-To: References: <1135198310.16291.6.camel@robs-p4> Message-ID: <200512212316.19208.m.fellinger@gmail.com> I have to get my second address out of this list somehow, since i have yet another problem of getting every message twice (wich makes very sure i never miss one, but it's not really what i want) so, someone needs all my dupes? :D Am Mittwoch, 21. Dezember 2005 22:42 schrieb Bryan Soto: > And just for your amusment Rob, you caught me for a few seconds. ;) > > Maybe a gmail thing then... > > bryan > > On 12/21/05, Rob Pitt wrote: > > What messages? :) > > > > On Wed, 2005-12-21 at 20:45 +0000, Tim Larson wrote: > > > On Wed, Dec 21, 2005 at 12:18:38PM -0800, Bryan Soto wrote: > > > > So far I've missed: > > > > > > ...list of messages... > > > > > > FWIW, I believe I _have_ received all of those messages. > > > > > > --Tim Larson > > > _______________________________________________ > > > Nitro-general mailing list > > > Nitro-general at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051221/53172d23/attachment.bin From jos at catnook.com Wed Dec 21 19:00:08 2005 From: jos at catnook.com (Jos Backus) Date: Wed, 21 Dec 2005 16:00:08 -0800 Subject: [Nitro] examples-0.26: blog example doesn't work Message-ID: <20051222000030.GA73518@lizzy.catnook.local> Fyi: re-runnig the blog example yields the following error: hal% ruby run.rb D, [2005-12-21T15:54:19.439536 #88430] DEBUG -- : Using memory sessions. nil I, [2005-12-21T15:54:20.341614 #88430] INFO -- : Og uses the Mysql store. E, [2005-12-21T15:54:20.351591 #88430] ERROR -- : Ruby-Mysql bindings are not installed! E, [2005-12-21T15:54:20.352117 #88430] ERROR -- : Trying to use the pure-Ruby binding included in Og D, [2005-12-21T15:54:20.480234 #88430] DEBUG -- : Og manageable classes: [Comment, Entry] E, [2005-12-21T15:54:20.511331 #88430] ERROR -- : Og.setup had problems: NoMethodError => undefined method `[]' for nil:NilClass E, [2005-12-21T15:54:20.511888 #88430] ERROR -- : # E, [2005-12-21T15:54:20.512371 #88430] ERROR -- : /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/vendor/mysql411.rb:250:in `unpack_fields_41' /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/vendor/mysql411.rb:242:in `each' /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/vendor/mysql411.rb:242:in `unpack_fields_41' /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/vendor/mysql411.rb:233:in `unpack_fields' /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/vendor/mysql.rb:247:in `list_fields' /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/mysql.rb:230:in `create_table' (eval):6:in `send' (eval):6:in `og_create_schema' /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/sql.rb:331:in `enchant' /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/mysql.rb:175:in `enchant' /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/manager.rb:122:in `manage' /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/manager.rb:187:in `manage_classes' /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/manager.rb:187:in `each' /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/manager.rb:187:in `manage_classes' /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og.rb:122:in `setup' run.rb:15 hal% It works fine if I set :destroy to true. This is with nitro 0.26 and all the latest required gems, on FreeBSD with mysql 4.1.15 from ports. -- Jos Backus jos at catnook.com From bryan.a.soto at gmail.com Wed Dec 21 19:23:12 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 21 Dec 2005 16:23:12 -0800 Subject: [Nitro] examples-0.26: blog example doesn't work In-Reply-To: <20051222000030.GA73518@lizzy.catnook.local> References: <20051222000030.GA73518@lizzy.catnook.local> Message-ID: Hi, I ran into similar error messages, though on Linux. I believe it has to do with the version of MySql and the Ruby bindings to it. You might try running: gem install mysql to get the C bindings. Those worked for me. They're also faster. They might be available via ports, though I don't know for sure. bryan On 12/21/05, Jos Backus wrote: > > Fyi: re-runnig the blog example yields the following error: > > hal% ruby run.rb > D, [2005-12-21T15:54:19.439536 #88430] DEBUG -- : Using memory sessions. > nil > I, [2005-12-21T15:54:20.341614 #88430] INFO -- : Og uses the Mysql store. > E, [2005-12-21T15:54:20.351591 #88430] ERROR -- : Ruby-Mysql bindings are > not installed! > E, [2005-12-21T15:54:20.352117 #88430] ERROR -- : Trying to use the > pure-Ruby binding included in Og > D, [2005-12-21T15:54:20.480234 #88430] DEBUG -- : Og manageable classes: > [Comment, Entry] > E, [2005-12-21T15:54:20.511331 #88430] ERROR -- : Og.setup had problems: > NoMethodError => undefined method `[]' for nil:NilClass > E, [2005-12-21T15:54:20.511888 #88430] ERROR -- : # undefined method `[]' for nil:NilClass> > E, [2005-12-21T15:54:20.512371 #88430] ERROR -- : > /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/vendor/mysql411.rb:250:in > `unpack_fields_41' > /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/vendor/mysql411.rb:242:in > `each' > /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/vendor/mysql411.rb:242:in > `unpack_fields_41' > /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/vendor/mysql411.rb:233:in > `unpack_fields' > /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/vendor/mysql.rb:247:in > `list_fields' > /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/mysql.rb:230:in > `create_table' > (eval):6:in `send' > (eval):6:in `og_create_schema' > /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/sql.rb:331:in > `enchant' > /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/mysql.rb:175:in > `enchant' > /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/manager.rb:122:in > `manage' > /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/manager.rb:187:in > `manage_classes' > /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/manager.rb:187:in > `each' > /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/manager.rb:187:in > `manage_classes' > /usr/local/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og.rb:122:in `setup' > run.rb:15 > hal% > > It works fine if I set :destroy to true. > > This is with nitro 0.26 and all the latest required gems, on FreeBSD with > mysql 4.1.15 from ports. > > -- > Jos Backus > jos at catnook.com > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051221/f77aa867/attachment.html From jos at catnook.com Wed Dec 21 20:35:38 2005 From: jos at catnook.com (Jos Backus) Date: Wed, 21 Dec 2005 17:34:38 -0801 Subject: [Nitro] examples-0.26: blog example doesn't work In-Reply-To: References: <20051222000030.GA73518@lizzy.catnook.local> Message-ID: <20051222013500.GB73518@lizzy.catnook.local> On Wed, Dec 21, 2005 at 04:23:12PM -0800, Bryan Soto wrote: > Hi, > > I ran into similar error messages, though on Linux. I believe it has to do > with the version of MySql and the Ruby bindings to it. You might try > running: > > gem install mysql > > to get the C bindings. Those worked for me. They're also faster. > > They might be available via ports, though I don't know for sure. I installed the gem and that seems to work. Thanks! My next problem occurs when I try to add a comment. Log: E, [2005-12-21T17:32:04.107682 #89161] ERROR -- : Error while handling '/view/2'. E, [2005-12-21T17:32:04.108430 #89161] ERROR -- : undefined method `create_time' for nil:NilClass src/template/view.xhtml:30:in `view_template' (eval):6:in `view_action' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/controller.rb:88:in `send' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/controller.rb:88:in `method_missing' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/render.rb:125:in `send' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/render.rb:125:in `render' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/adapter/webrick.rb:145:in `do_GET' /usr/local/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `__send__' /usr/local/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/local/lib/ruby/1.8/webrick/server.rb:155:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:94:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `each' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/adapter/webrick.rb:55:in `start' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/server/runner.rb:297:in `invoke_server' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/server/runner.rb:263:in `invoke' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/server.rb:124:in `run' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro.rb:73:in `run' run.rb:48 Do you see this too? -- Jos Backus jos at catnook.com From epiperak at softlab.ece.ntua.gr Wed Dec 21 20:44:50 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Thu, 22 Dec 2005 03:44:50 +0200 (EET) Subject: [Nitro] Has anyone else been missing emails from the mailing list? In-Reply-To: <200512212316.19208.m.fellinger@gmail.com> References: <1135198310.16291.6.camel@robs-p4> <200512212316.19208.m.fellinger@gmail.com> Message-ID: I have the same problem. Some emails arrive very late (1-2 days) and I do not use gmail... > I have to get my second address out of this list somehow, since i have yet > another problem of getting every message twice (wich makes very sure i never > miss one, but it's not really what i want) > > so, someone needs all my dupes? :D > > Am Mittwoch, 21. Dezember 2005 22:42 schrieb Bryan Soto: >> And just for your amusment Rob, you caught me for a few seconds. ;) >> >> Maybe a gmail thing then... >> >> bryan >> >> On 12/21/05, Rob Pitt wrote: >>> What messages? :) >>> >>> On Wed, 2005-12-21 at 20:45 +0000, Tim Larson wrote: >>>> On Wed, Dec 21, 2005 at 12:18:38PM -0800, Bryan Soto wrote: >>>>> So far I've missed: >>>> >>>> ...list of messages... >>>> >>>> FWIW, I believe I _have_ received all of those messages. >>>> >>>> --Tim Larson >>>> _______________________________________________ >>>> Nitro-general mailing list >>>> Nitro-general at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/nitro-general >>> >>> _______________________________________________ >>> Nitro-general mailing list >>> Nitro-general at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/nitro-general > Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From bryan.a.soto at gmail.com Wed Dec 21 21:10:16 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 21 Dec 2005 18:10:16 -0800 Subject: [Nitro] Has anyone else been missing emails from the mailing list? In-Reply-To: References: <1135198310.16291.6.camel@robs-p4> <200512212316.19208.m.fellinger@gmail.com> Message-ID: I'll wait a few days then to see if I get it, but I just received Emmanuel's reply to an email I haven't gotten yet. Archive says it's manveru. So yes, manveru, please send me your dupes! 8) On 12/21/05, Emmanuel Piperakis wrote: > > I have the same problem. Some emails arrive very late (1-2 days) and I do > not use gmail... > > > I have to get my second address out of this list somehow, since i have > yet > > another problem of getting every message twice (wich makes very sure i > never > > miss one, but it's not really what i want) > > > > so, someone needs all my dupes? :D > > > > Am Mittwoch, 21. Dezember 2005 22:42 schrieb Bryan Soto: > >> And just for your amusment Rob, you caught me for a few seconds. ;) > >> > >> Maybe a gmail thing then... > >> > >> bryan > >> > >> On 12/21/05, Rob Pitt wrote: > >>> What messages? :) > >>> > >>> On Wed, 2005-12-21 at 20:45 +0000, Tim Larson wrote: > >>>> On Wed, Dec 21, 2005 at 12:18:38PM -0800, Bryan Soto wrote: > >>>>> So far I've missed: > >>>> > >>>> ...list of messages... > >>>> > >>>> FWIW, I believe I _have_ received all of those messages. > >>>> > >>>> --Tim Larson > >>>> _______________________________________________ > >>>> Nitro-general mailing list > >>>> Nitro-general at rubyforge.org > >>>> http://rubyforge.org/mailman/listinfo/nitro-general > >>> > >>> _______________________________________________ > >>> Nitro-general mailing list > >>> Nitro-general at rubyforge.org > >>> http://rubyforge.org/mailman/listinfo/nitro-general > > > > Emmanouil Piperakis (epiperak at cs.ntua.gr) > {To explore is Human, to Create is Devine, > To teach is Primal, to Rule is Sin} > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051221/60acb787/attachment.html From bryan.a.soto at gmail.com Wed Dec 21 21:21:57 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 21 Dec 2005 18:21:57 -0800 Subject: [Nitro] Has anyone else been missing emails from the mailing list? In-Reply-To: References: <1135198310.16291.6.camel@robs-p4> <200512212316.19208.m.fellinger@gmail.com> Message-ID: Emmanuel, Just curious, in the thread started by James Britt, [Nitro] Undefined method 'is' in session.rb, did you get either of James posts? I'm missing both of them. On 12/21/05, Emmanuel Piperakis wrote: > > I have the same problem. Some emails arrive very late (1-2 days) and I do > not use gmail... > > > I have to get my second address out of this list somehow, since i have > yet > > another problem of getting every message twice (wich makes very sure i > never > > miss one, but it's not really what i want) > > > > so, someone needs all my dupes? :D > > > > Am Mittwoch, 21. Dezember 2005 22:42 schrieb Bryan Soto: > >> And just for your amusment Rob, you caught me for a few seconds. ;) > >> > >> Maybe a gmail thing then... > >> > >> bryan > >> > >> On 12/21/05, Rob Pitt wrote: > >>> What messages? :) > >>> > >>> On Wed, 2005-12-21 at 20:45 +0000, Tim Larson wrote: > >>>> On Wed, Dec 21, 2005 at 12:18:38PM -0800, Bryan Soto wrote: > >>>>> So far I've missed: > >>>> > >>>> ...list of messages... > >>>> > >>>> FWIW, I believe I _have_ received all of those messages. > >>>> > >>>> --Tim Larson > >>>> _______________________________________________ > >>>> Nitro-general mailing list > >>>> Nitro-general at rubyforge.org > >>>> http://rubyforge.org/mailman/listinfo/nitro-general > >>> > >>> _______________________________________________ > >>> Nitro-general mailing list > >>> Nitro-general at rubyforge.org > >>> http://rubyforge.org/mailman/listinfo/nitro-general > > > > Emmanouil Piperakis (epiperak at cs.ntua.gr) > {To explore is Human, to Create is Devine, > To teach is Primal, to Rule is Sin} > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051221/1dcd02eb/attachment.html From james_b at neurogami.com Wed Dec 21 21:44:14 2005 From: james_b at neurogami.com (James Britt) Date: Wed, 21 Dec 2005 19:44:14 -0700 Subject: [Nitro] BUG: nitrogen app does not create a usable CGI app on WinXP Message-ID: <43AA12FE.4080307@neurogami.com> I'm still trying to run some fairly simple Nitro apps under Apache2 CGI on my WinXP, with no luck. I thought perhaps there was some change from 0.24 to 0.26 such that my cgi.rb or run.rb file was broken, so I tried to create a bare-bones app using nitrogen. One bug is that the apache.conf file placed in the /conf dir has mod_rewrite rules that set dispatch.cgi as the default script, yet there is no such script in /public. Instead, there is cgi.rb and fcgi.rb No big deal for me, but some folks might wonder why these configuration settings don't work. (Oh, and one more quibble: the robots.txt file is always empty. Why is it there?) The real bug is that I still get this error with CGI: undefined method `is' for Nitro::Session:Class (NoMethodError) So, not only can't I get my existing code running under CGI, I can't get Nitro to generate usable CGI code. James Britt -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From transfire at gmail.com Wed Dec 21 22:10:42 2005 From: transfire at gmail.com (TRANS) Date: Wed, 21 Dec 2005 22:10:42 -0500 Subject: [Nitro] BUG: nitrogen app does not create a usable CGI app on WinXP In-Reply-To: <43AA12FE.4080307@neurogami.com> References: <43AA12FE.4080307@neurogami.com> Message-ID: <4b6f054f0512211910w3edf12edu8655c21c29edc7f6@mail.gmail.com> On 12/21/05, James Britt wrote: > I'm still trying to run some fairly simple Nitro apps under Apache2 CGI > on my WinXP, with no luck. > > I thought perhaps there was some change from 0.24 to 0.26 such that my > cgi.rb or run.rb file was broken, so I tried to create a bare-bones app > using nitrogen. > > One bug is that the apache.conf file placed in the /conf dir has > mod_rewrite rules that set dispatch.cgi as the default script, yet there > is no such script in /public. Instead, there is cgi.rb and fcgi.rb > > No big deal for me, but some folks might wonder why these configuration > settings don't work. (Oh, and one more quibble: the robots.txt file is > always empty. Why is it there?) > > The real bug is that I still get this error with CGI: > > undefined method `is' for Nitro::Session:Class (NoMethodError) That's likey an alias for #include from Facets. Try adding 'require facet/module/is', or change 'is' to 'include'. T. From ak at navel.gr Wed Dec 21 23:19:30 2005 From: ak at navel.gr (Anastasios Koutoumanos) Date: Thu, 22 Dec 2005 06:19:30 +0200 Subject: [Nitro] Has anyone else been missing emails from the mailing list? In-Reply-To: References: <1135198310.16291.6.camel@robs-p4> <200512212316.19208.m.fellinger@gmail.com> Message-ID: <43AA2952.6090603@navel.gr> FYI, I got both messages of James Britt, _but_ I got the announcement for the 0.26.0 release almost 12 hours after George's post and that got me worried. After a little digging, I would say it's a problem with rubyforge rather with gmail. Here's a trace with the timestamps (i have highlighted with red the ones that look suspicious): Received: from mail.navel.gr ([unix socket]) by linfinity (Cyrus v2.1.18-IPv6-Debian-2.1.18-1ubuntu1) with LMTP; *Wed, 21 Dec 2005 20:11:46 +0200* X-Sieve: CMU Sieve 2.2 Received: from *rubyforge.org* (dsl092-150-242.wdc2.dsl.speakeasy.net [66.92.150.242]) by mail.navel.gr (Postfix) with ESMTP id A242F48C3F2 for ; *Wed, 21 Dec 2005 20:11:44 +0200 (EET)* Received: from rubyforge.org (localhost.localdomain [127.0.0.1]) by rubyforge.org (8.12.8/8.12.8) with ESMTP id jBLE7Fe9015949; *Wed, 21 Dec 2005 09:07:27 -0500* Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.197]) by rubyforge.org (8.12.8/8.12.8) with ESMTP id jBLE7Ee6015944 for ; *Wed, 21 Dec 2005 09:07:14 -0500* Received: by zproxy.gmail.com with SMTP id 14so166414nzn for ; Wed, 21 Dec 2005 06:17:42 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=aZLKWbHsh2MHxkuhAoNgzQzTJmSGVxBDsXfS34958dCXdEM2yztomFbHK1WNZjaoLuP6Moz56W4lzpFxr1UqCmzEhUqx742q1yznTQDP9UoIRzX4vLk0T+w3f2MYOnewGq+3PbBmmp0gnFTtA00h6oNzN1zlHTiPaqi3oRPZn0g= Received: by 10.65.35.3 with SMTP id n3mr507253qbj; Wed, 21 Dec 2005 06:17:41 -0800 (PST) Received: by 10.64.204.11 with HTTP; Wed, 21 Dec 2005 06:17:41 -0800 (PST) Message-ID: Date: Wed, 21 Dec 2005 16:17:41 +0200 Bryan Soto wrote: > Emmanuel, > > Just curious, in the thread started by James Britt, [Nitro] Undefined > method 'is' in session.rb > , > did you get either of James posts? I'm missing both of them. > > On 12/21/05, *Emmanuel Piperakis* > wrote: > > I have the same problem. Some emails arrive very late (1-2 days) > and I do > not use gmail... > > > I have to get my second address out of this list somehow, since > i have yet > > another problem of getting every message twice (wich makes very > sure i never > > miss one, but it's not really what i want) > > > > so, someone needs all my dupes? :D > > > > Am Mittwoch, 21. Dezember 2005 22:42 schrieb Bryan Soto: > >> And just for your amusment Rob, you caught me for a few seconds. ;) > >> > >> Maybe a gmail thing then... > >> > >> bryan > >> > >> On 12/21/05, Rob Pitt > wrote: > >>> What messages? :) > >>> > >>> On Wed, 2005-12-21 at 20:45 +0000, Tim Larson wrote: > >>>> On Wed, Dec 21, 2005 at 12:18:38PM -0800, Bryan Soto wrote: > >>>>> So far I've missed: > >>>> > >>>> ...list of messages... > >>>> > >>>> FWIW, I believe I _have_ received all of those messages. > >>>> > >>>> --Tim Larson > >>>> _______________________________________________ > >>>> Nitro-general mailing list > >>>> Nitro-general at rubyforge.org > >>>> http://rubyforge.org/mailman/listinfo/nitro-general > >>> > >>> _______________________________________________ > >>> Nitro-general mailing list > >>> Nitro-general at rubyforge.org > >>> http://rubyforge.org/mailman/listinfo/nitro-general > > > > > Emmanouil Piperakis (epiperak at cs.ntua.gr ) > {To explore is Human, to Create is Devine, > To teach is Primal, to Rule is Sin} > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > >------------------------------------------------------------------------ > >_______________________________________________ >Nitro-general mailing list >Nitro-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/nitro-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051221/c9074ea3/attachment.html From epiperak at softlab.ece.ntua.gr Thu Dec 22 01:39:21 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Thu, 22 Dec 2005 08:39:21 +0200 (EET) Subject: [Nitro] Has anyone else been missing emails from the mailing list? In-Reply-To: References: <1135198310.16291.6.camel@robs-p4> <200512212316.19208.m.fellinger@gmail.com> Message-ID: I think I got these ones... NOw I am not sure in what order... I will check later today ... > Emmanuel, > > Just curious, in the thread started by James Britt, [Nitro] Undefined method > 'is' in session.rb, > did you get either of James posts? I'm missing both of them. > > On 12/21/05, Emmanuel Piperakis wrote: >> >> I have the same problem. Some emails arrive very late (1-2 days) and I do >> not use gmail... >> >>> I have to get my second address out of this list somehow, since i have >> yet >>> another problem of getting every message twice (wich makes very sure i >> never >>> miss one, but it's not really what i want) >>> >>> so, someone needs all my dupes? :D >>> >>> Am Mittwoch, 21. Dezember 2005 22:42 schrieb Bryan Soto: >>>> And just for your amusment Rob, you caught me for a few seconds. ;) >>>> >>>> Maybe a gmail thing then... >>>> >>>> bryan >>>> >>>> On 12/21/05, Rob Pitt wrote: >>>>> What messages? :) >>>>> >>>>> On Wed, 2005-12-21 at 20:45 +0000, Tim Larson wrote: >>>>>> On Wed, Dec 21, 2005 at 12:18:38PM -0800, Bryan Soto wrote: >>>>>>> So far I've missed: >>>>>> >>>>>> ...list of messages... >>>>>> >>>>>> FWIW, I believe I _have_ received all of those messages. >>>>>> >>>>>> --Tim Larson >>>>>> _______________________________________________ >>>>>> Nitro-general mailing list >>>>>> Nitro-general at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/nitro-general >>>>> >>>>> _______________________________________________ >>>>> Nitro-general mailing list >>>>> Nitro-general at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/nitro-general >>> >> >> Emmanouil Piperakis (epiperak at cs.ntua.gr) >> {To explore is Human, to Create is Devine, >> To teach is Primal, to Rule is Sin} >> _______________________________________________ >> Nitro-general mailing list >> Nitro-general at rubyforge.org >> http://rubyforge.org/mailman/listinfo/nitro-general >> > Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From epiperak at softlab.ece.ntua.gr Thu Dec 22 01:49:48 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Thu, 22 Dec 2005 08:49:48 +0200 (EET) Subject: [Nitro] Inheritance/Constraints Bug Message-ID: Dear friends, I am not sure but I am afraid this is a bug. class Project has_many :loans, Loan schema_inheritance end class ForeignProject < Project property :koko, String end class DomesticProject < Project property :haha, String end class Loan belongs_to :project, Project end Og.setup( :store => :psql, :destroy => true, :create_schema => true, :evolve_schema => true, :evolve_schema_cautious => false, :name => 'glycerin', :user => 'www-weez', :password => '****' ) And I get the following error: (which from what I understand Og is trying to make a constraint with a foreign key of ForeignProject, the moment that due to the schema_inheritance there is no such oid). Also without schema_inheritance same error.... G!!!??? Help! D, [2005-12-22T14:24:56.437131 #21978] DEBUG -- : PostgreSQL processing foreign key constraints E, [2005-12-22T14:24:56.449050 #21978] ERROR -- : PostgreSQL connection returned an error for query ALTER TABLE ogloan ADD CONSTRAINT ogc_ogloan_foreign_project_oid FOREIGN KEY (foreign_project_oid) REFERENCES ogproject(oid) ON UPDATE SET NULL ON DELETE SET NULL E, [2005-12-22T14:24:56.449262 #21978] ERROR -- : Og.setup had problems: RuntimeError => ERROR C42703 Mcolumn "foreign_project_oid" referenced in foreign key constraint does not exist Ftablecmds.c L4054 RtransformColumnNameList ==> Setup for debug mode ==> Listening at 0.0.0.0:4001. ==> Press Ctrl-C to shutdown; Run with --help for options. Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From james_b at neurogami.com Thu Dec 22 02:24:39 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 22 Dec 2005 00:24:39 -0700 Subject: [Nitro] BUG: nitrogen app does not create a usable CGI app on WinXP In-Reply-To: <4b6f054f0512211910w3edf12edu8655c21c29edc7f6@mail.gmail.com> References: <43AA12FE.4080307@neurogami.com> <4b6f054f0512211910w3edf12edu8655c21c29edc7f6@mail.gmail.com> Message-ID: <43AA54B7.1020103@neurogami.com> TRANS wrote: > On 12/21/05, James Britt wrote: > ... >> >>The real bug is that I still get this error with CGI: >> >> undefined method `is' for Nitro::Session:Class (NoMethodError) > > > That's likey an alias for #include from Facets. Try adding 'require > facet/module/is', or change 'is' to 'include'. > I tried the 'require' approach, but it didn't help. It makes little sense to for me to consider changing the call form 'is' to 'include' because that call is in the core Nitro session.rb library code, not my own code. Thanks, James From george.moschovitis at gmail.com Thu Dec 22 02:57:25 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 22 Dec 2005 09:57:25 +0200 Subject: [Nitro] Undefined method 'is' in session.rb In-Reply-To: <200512211942.57449.m.fellinger@gmail.com> References: <43A99B19.3010006@neurogami.com> <200512211942.57449.m.fellinger@gmail.com> Message-ID: > You have to give it some property before, since this class is not enchanted > with Og yet and so the keyword is not interpreted. No no need for property before, just require 'nano/module/is' -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu Dec 22 03:01:47 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 22 Dec 2005 10:01:47 +0200 Subject: [Nitro] BUG: nitrogen app does not create a usable CGI app on WinXP In-Reply-To: <43AA54B7.1020103@neurogami.com> References: <43AA12FE.4080307@neurogami.com> <4b6f054f0512211910w3edf12edu8655c21c29edc7f6@mail.gmail.com> <43AA54B7.1020103@neurogami.com> Message-ID: > It makes little sense to for me to consider changing the call form 'is' > to 'include' because that call is in the core Nitro session.rb library > code, not my own code. ok will investigate... -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu Dec 22 03:05:40 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 22 Dec 2005 10:05:40 +0200 Subject: [Nitro] BUG: nitrogen app does not create a usable CGI app on WinXP In-Reply-To: <43AA12FE.4080307@neurogami.com> References: <43AA12FE.4080307@neurogami.com> Message-ID: > cgi.rb or run.rb file was broken, so I tried to create a bare-bones app > using nitrogen. As demonstrated in the videos, nitrogen is not really useful in Nitro (as it is on Rails). You can create 1-2 dirs and start running. However this release seems to have fixed the gem/bin path bug, and the next release will add some features on nitro/nitrogen so you can expect that these helpers will be heavily tested. The changes are related to the one-step install for spark (I want to aggresively promote spark) that I plan to do... > No big deal for me, but some folks might wonder why these configuration > settings don't work. (Oh, and one more quibble: the robots.txt file is > always empty. Why is it there?) thanks for pointing this out... > The real bug is that I still get this error with CGI: > undefined method `is' for Nitro::Session:Class (NoMethodError) > So, not only can't I get my existing code running under CGI, I can't get > Nitro to generate usable CGI code. require 'nano/module/is' as a temp workaround. -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From rob at motionpath.com Thu Dec 22 05:07:49 2005 From: rob at motionpath.com (Rob Pitt) Date: Thu, 22 Dec 2005 10:07:49 +0000 Subject: [Nitro] Inheritance/Constraints Bug In-Reply-To: References: Message-ID: <1135246070.16291.9.camel@robs-p4> Please e-mail me a full working test case that causes this error as I was unable to reproduce it from your code snippet. On Thu, 2005-12-22 at 08:49 +0200, Emmanuel Piperakis wrote: > Dear friends, > I am not sure but I am afraid this is a bug. > class Project > has_many :loans, Loan > schema_inheritance > end > > class ForeignProject < Project > property :koko, String > end > > class DomesticProject < Project > property :haha, String > end > > class Loan > belongs_to :project, Project > end > > Og.setup( > :store => :psql, > :destroy => true, > :create_schema => true, > :evolve_schema => true, > :evolve_schema_cautious => false, > :name => 'glycerin', > :user => 'www-weez', > :password => '****' > ) > > And I get the following error: > (which from what I understand Og is trying to make a constraint with a > foreign key of ForeignProject, the moment that due to the > schema_inheritance there is no such oid). Also without schema_inheritance > same error.... > > G!!!??? Help! > > > D, [2005-12-22T14:24:56.437131 #21978] DEBUG -- : PostgreSQL processing > foreign key constraints > E, [2005-12-22T14:24:56.449050 #21978] ERROR -- : PostgreSQL connection > returned an error for query ALTER TABLE ogloan ADD CONSTRAINT > ogc_ogloan_foreign_project_oid FOREIGN KEY (foreign_project_oid) > REFERENCES ogproject(oid) ON UPDATE SET NULL ON DELETE SET NULL > E, [2005-12-22T14:24:56.449262 #21978] ERROR -- : Og.setup had problems: > RuntimeError => ERROR C42703 Mcolumn "foreign_project_oid" referenced in > foreign key constraint does not exist Ftablecmds.c L4054 > RtransformColumnNameList > > ==> Setup for debug mode > ==> Listening at 0.0.0.0:4001. > ==> Press Ctrl-C to shutdown; Run with --help for options. > > > Emmanouil Piperakis (epiperak at cs.ntua.gr) > {To explore is Human, to Create is Devine, > To teach is Primal, to Rule is Sin} > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From rob at motionpath.com Thu Dec 22 05:16:51 2005 From: rob at motionpath.com (Rob Pitt) Date: Thu, 22 Dec 2005 10:16:51 +0000 Subject: [Nitro] Inheritance/Constraints Bug In-Reply-To: <1135246070.16291.9.camel@robs-p4> References: <1135246070.16291.9.camel@robs-p4> Message-ID: <1135246612.16291.15.camel@robs-p4> To be more explicit, I mean a full working mini script, not a full blown ruby test case as I tried to reproduce it and failed with the following (which worked fine): ==begin require 'rubygems' require 'nitro' require 'og' class Loan < Og::Entity end class Project < Og::Entity has_many :loans, Loan schema_inheritance end class Loan < Og::Entity belongs_to :project, Project end class ForeignProject < Project property :koko, String end class DomesticProject < Project property :haha, String end Og.setup( :store => :psql, :address => 'localhost', :destroy => true, :create_schema => true, :evolve_schema => true, :evolve_schema_cautious => false, :name => 'testx', :user => 'user', :password => 'password' ) ==end On Thu, 2005-12-22 at 10:07 +0000, Rob Pitt wrote: > Please e-mail me a full working test case that causes this error as I > was unable to reproduce it from your code snippet. > > On Thu, 2005-12-22 at 08:49 +0200, Emmanuel Piperakis wrote: > > Dear friends, > > I am not sure but I am afraid this is a bug. > > class Project > > has_many :loans, Loan > > schema_inheritance > > end > > > > class ForeignProject < Project > > property :koko, String > > end > > > > class DomesticProject < Project > > property :haha, String > > end > > > > class Loan > > belongs_to :project, Project > > end > > > > Og.setup( > > :store => :psql, > > :destroy => true, > > :create_schema => true, > > :evolve_schema => true, > > :evolve_schema_cautious => false, > > :name => 'glycerin', > > :user => 'www-weez', > > :password => '****' > > ) > > > > And I get the following error: > > (which from what I understand Og is trying to make a constraint with a > > foreign key of ForeignProject, the moment that due to the > > schema_inheritance there is no such oid). Also without schema_inheritance > > same error.... > > > > G!!!??? Help! > > > > > > D, [2005-12-22T14:24:56.437131 #21978] DEBUG -- : PostgreSQL processing > > foreign key constraints > > E, [2005-12-22T14:24:56.449050 #21978] ERROR -- : PostgreSQL connection > > returned an error for query ALTER TABLE ogloan ADD CONSTRAINT > > ogc_ogloan_foreign_project_oid FOREIGN KEY (foreign_project_oid) > > REFERENCES ogproject(oid) ON UPDATE SET NULL ON DELETE SET NULL > > E, [2005-12-22T14:24:56.449262 #21978] ERROR -- : Og.setup had problems: > > RuntimeError => ERROR C42703 Mcolumn "foreign_project_oid" referenced in > > foreign key constraint does not exist Ftablecmds.c L4054 > > RtransformColumnNameList > > > > ==> Setup for debug mode > > ==> Listening at 0.0.0.0:4001. > > ==> Press Ctrl-C to shutdown; Run with --help for options. > > > > > > Emmanouil Piperakis (epiperak at cs.ntua.gr) > > {To explore is Human, to Create is Devine, > > To teach is Primal, to Rule is Sin} > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From rob at motionpath.com Thu Dec 22 05:22:47 2005 From: rob at motionpath.com (Rob Pitt) Date: Thu, 22 Dec 2005 10:22:47 +0000 Subject: [Nitro] Inheritance/Constraints Bug In-Reply-To: <1135246070.16291.9.camel@robs-p4> References: <1135246070.16291.9.camel@robs-p4> Message-ID: <1135246967.16291.16.camel@robs-p4> OK ignore that, I have managed to reproduce it and will get back to you shortly. From rob at motionpath.com Thu Dec 22 05:41:05 2005 From: rob at motionpath.com (Rob Pitt) Date: Thu, 22 Dec 2005 10:41:05 +0000 Subject: [Nitro] Inheritance/Constraints Bug In-Reply-To: <1135246967.16291.16.camel@robs-p4> References: <1135246070.16291.9.camel@robs-p4> <1135246967.16291.16.camel@robs-p4> Message-ID: <1135248065.16291.22.camel@robs-p4> I will try to resolve this soon, right now you can work around it very easily by changing the line: has_many :loans, Loan to has_many :loans, Loan, :foreign_name => 'project' Which gives a hint to Og so that it knows the belongs_to relationship is named "project", due to this line: belongs_to :project, Project On Thu, 2005-12-22 at 10:22 +0000, Rob Pitt wrote: > OK ignore that, I have managed to reproduce it and will get back to you > shortly. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From rob at motionpath.com Thu Dec 22 05:52:42 2005 From: rob at motionpath.com (Rob Pitt) Date: Thu, 22 Dec 2005 10:52:42 +0000 Subject: [Nitro] Inheritance/Constraints Bug In-Reply-To: References: Message-ID: <1135248762.16291.24.camel@robs-p4> I would also like to point out this is not a constraints issue, it is an issue with the way Og handles inheritance. From rob at motionpath.com Thu Dec 22 06:09:06 2005 From: rob at motionpath.com (Rob Pitt) Date: Thu, 22 Dec 2005 11:09:06 +0000 Subject: [Nitro] Inheritance/Constraints Bug In-Reply-To: References: Message-ID: <1135249747.16291.28.camel@robs-p4> If you wait 20-30 mins until I have finished constructing a test suite to make sure this fix doesn't effect the other stores (it isn't a PostgreSQL problem) I will post a patch to resolve this without you needing hints. On Thu, 2005-12-22 at 08:49 +0200, Emmanuel Piperakis wrote: > Dear friends, > I am not sure but I am afraid this is a bug. > class Project > has_many :loans, Loan > schema_inheritance > end > > class ForeignProject < Project > property :koko, String > end > > class DomesticProject < Project > property :haha, String > end > > class Loan > belongs_to :project, Project > end > > Og.setup( > :store => :psql, > :destroy => true, > :create_schema => true, > :evolve_schema => true, > :evolve_schema_cautious => false, > :name => 'glycerin', > :user => 'www-weez', > :password => '****' > ) > > And I get the following error: > (which from what I understand Og is trying to make a constraint with a > foreign key of ForeignProject, the moment that due to the > schema_inheritance there is no such oid). Also without schema_inheritance > same error.... > > G!!!??? Help! > > > D, [2005-12-22T14:24:56.437131 #21978] DEBUG -- : PostgreSQL processing > foreign key constraints > E, [2005-12-22T14:24:56.449050 #21978] ERROR -- : PostgreSQL connection > returned an error for query ALTER TABLE ogloan ADD CONSTRAINT > ogc_ogloan_foreign_project_oid FOREIGN KEY (foreign_project_oid) > REFERENCES ogproject(oid) ON UPDATE SET NULL ON DELETE SET NULL > E, [2005-12-22T14:24:56.449262 #21978] ERROR -- : Og.setup had problems: > RuntimeError => ERROR C42703 Mcolumn "foreign_project_oid" referenced in > foreign key constraint does not exist Ftablecmds.c L4054 > RtransformColumnNameList > > ==> Setup for debug mode > ==> Listening at 0.0.0.0:4001. > ==> Press Ctrl-C to shutdown; Run with --help for options. > > > Emmanouil Piperakis (epiperak at cs.ntua.gr) > {To explore is Human, to Create is Devine, > To teach is Primal, to Rule is Sin} > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From rob at motionpath.com Thu Dec 22 06:37:10 2005 From: rob at motionpath.com (Rob Pitt) Date: Thu, 22 Dec 2005 11:37:10 +0000 Subject: [Nitro] Inheritance/Constraints Bug In-Reply-To: <1135248762.16291.24.camel@robs-p4> References: <1135248762.16291.24.camel@robs-p4> Message-ID: <1135251430.16291.31.camel@robs-p4> By that I mean that, if you disabled constraints, Og would crash as soon as you tried to use the has_many relation anyway, in any store, not just in PostgreSQL (in response to your IRC question). On Thu, 2005-12-22 at 10:52 +0000, Rob Pitt wrote: > I would also like to point out this is not a constraints issue, it is an > issue with the way Og handles inheritance. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From rob at motionpath.com Thu Dec 22 07:38:49 2005 From: rob at motionpath.com (Rob Pitt) Date: Thu, 22 Dec 2005 12:38:49 +0000 Subject: [Nitro] Fix to STI has_many relationship for the problem reported by Emmanuel Piperakis Message-ID: <1135255130.16291.37.camel@robs-p4> Hello G, I have also started work on a heavy duty automated batch test suite system... This patch does not appear to introduce any problems into the other stores (and I cannot see why it would). It means when using STI you no longer have to provide a :foreign_name hint. This problem was reported as an issue with PostgreSQL constraints earlier, but this was not the case, any usage with any store of that relationship would have caused Og to crash, constraints was simply the first thing that tried to use it :) I have cc'd this to you Emmanuel Piperakis and also to the list in case you do not want to wait until this fix is applied to Glycerin. Thank you for reporting this problem! - rp -------------- next part -------------- A non-text attachment was scrubbed... Name: sti-fix.patch.bz2 Type: application/x-bzip Size: 9330 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051222/e24b5df0/attachment.bin From george.moschovitis at gmail.com Thu Dec 22 08:02:27 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 22 Dec 2005 15:02:27 +0200 Subject: [Nitro] Fix to STI has_many relationship for the problem reported by Emmanuel Piperakis In-Reply-To: <1135255130.16291.37.camel@robs-p4> References: <1135255130.16291.37.camel@robs-p4> Message-ID: Thanks Rob ;-) i will review and integrate... -g. On 12/22/05, Rob Pitt wrote: > Hello G, > > I have also started work on a heavy duty automated batch test suite > system... > > This patch does not appear to introduce any problems into the other > stores (and I cannot see why it would). > > It means when using STI you no longer have to provide a :foreign_name > hint. > > This problem was reported as an issue with PostgreSQL constraints > earlier, but this was not the case, any usage with any store of that > relationship would have caused Og to crash, constraints was simply the > first thing that tried to use it :) > > I have cc'd this to you Emmanuel Piperakis and also to the list in case > you do not want to wait until this fix is applied to Glycerin. > > Thank you for reporting this problem! > > - rp > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From james_b at neurogami.com Thu Dec 22 11:10:37 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 22 Dec 2005 09:10:37 -0700 Subject: [Nitro] Undefined method 'is' in session.rb In-Reply-To: References: <43A99B19.3010006@neurogami.com> <200512211942.57449.m.fellinger@gmail.com> Message-ID: <43AACFFD.1060900@neurogami.com> George Moschovitis wrote: >>You have to give it some property before, since this class is not enchanted >>with Og yet and so the keyword is not interpreted. > > > No no need for property before, just > > require 'nano/module/is' Does not do any good. :( James -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From transfire at gmail.com Thu Dec 22 12:27:30 2005 From: transfire at gmail.com (TRANS) Date: Thu, 22 Dec 2005 12:27:30 -0500 Subject: [Nitro] Facets/Calibre (Nano/Mega) (In)Sanity Message-ID: <4b6f054f0512220927s21ea4f7cg9eee75c9be659a9f@mail.gmail.com> I've been sitting here day after day staring at this screen trying to figure out what to do and getting no where. I can't do it anymore. I desparetly need help. The problem seems simple enough: the organization of facets/calibre (was nano/mega). But it overwhelm me. I can't find a satsifactory solution. I'll try to explain. Facets is primarily the core extension methods, which consists of a bunch of files for every method and then some other files that are groupings of those (a file that requires other method files) which are mostly along the lines of all-methods-per-class. So I basically have three sets of things here: the methods, which exist under subdirectories of each class, the class groupings, and miscellaneous groupings. Calibre OTOH consists of the classes, modules and frameworks. The current release of Facets includes all of files in Calibre (I was hoping to just have one project). But I split Calibre back out of Facets for current development b/c there were requests for offereing the classes/modules/and frameworks on individual bases. So I did that. Calibre now consists of a bunch of subprojects all released individually. Individual packages works great as each subproject can develop at it's own pace, BUT it makes an all-in-one Gem package a complete mess --each subproject is installed in its own subpackage directory within Gems, gems actually has to search through 60 different directories to find a single file --it's stupid! The other big issue is that deep down I would prefer it if these were all still under the Facets project rather then having two different projects, but the organization of this completely alludes me. Maybe that means they simply can't be under a single project as much as I really want them to be? Can anyone offer me any sanity? Thanks, T. From humberaquino at gmail.com Thu Dec 22 14:41:22 2005 From: humberaquino at gmail.com (Humber Aquino) Date: Thu, 22 Dec 2005 16:41:22 -0300 Subject: [Nitro] Help with callbacks Message-ID: <37fd0c50512221141pc3fa495g15307b221b622619@mail.gmail.com> Hi everyone! I'm having a problem defining callbacks.. i don't know if this is a newbie question or something like that but i didn't found a solution.. I want to define some callbacks to do some custom validations among other things.. i started with the og callback example but it doesn't work. require 'og' class Post property :name, String def initialize(name) @name = name end def og_post_insert(conn) puts 'Hey, a new post was just posted!' end def og_post_insert puts 'Hey, a new post was just posted!' end end p = Post.create('Hello') #No output p2 = Post.new('Bye') p2.save #No output Mi nitro version is 0.26 I tried the update callback too and nothing happened.. I also put raise some exceptions to see if the callback is actually called. Do i have to include some mixin? Or do something else? Thanks for your time and help Humber From chris at motionpath.com Thu Dec 22 14:50:05 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Thu, 22 Dec 2005 19:50:05 +0000 Subject: [Nitro] Help with callbacks In-Reply-To: <37fd0c50512221141pc3fa495g15307b221b622619@mail.gmail.com> References: <37fd0c50512221141pc3fa495g15307b221b622619@mail.gmail.com> Message-ID: use: post :og_post_insert, :on => :og_insert (whack that just after the property declaratoin... i think og_insert is a valid aspect method) sorry im breif... just walking out of office. hope that tips you in the right direction Chris Farmiloe Design & Development. On 22 Dec 2005, at 19:41, Humber Aquino wrote: > Hi everyone! I'm having a problem defining callbacks.. i don't know if > this is a newbie question or something like that but i didn't found a > solution.. > > I want to define some callbacks to do some custom validations among > other things.. > i started with the og callback example but it doesn't work. > > require 'og' > > class Post > property :name, String > > def initialize(name) > @name = name > end > > def og_post_insert(conn) > puts 'Hey, a new post was just posted!' > end > > def og_post_insert > puts 'Hey, a new post was just posted!' > end > end > > p = Post.create('Hello') > #No output > > p2 = Post.new('Bye') > p2.save > #No output > > Mi nitro version is 0.26 > > I tried the update callback too and nothing happened.. I also put > raise some exceptions to see if the callback is actually called. > Do i have to include some mixin? Or do something else? > > Thanks for your time and help > > Humber > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051222/d492f9ad/attachment.html From humberaquino at gmail.com Thu Dec 22 14:56:44 2005 From: humberaquino at gmail.com (Humber Aquino) Date: Thu, 22 Dec 2005 16:56:44 -0300 Subject: [Nitro] Help with callbacks In-Reply-To: References: <37fd0c50512221141pc3fa495g15307b221b622619@mail.gmail.com> Message-ID: <37fd0c50512221156g7b04d393h7dfa39f6051506ff@mail.gmail.com> Thanks a lot Chris! post :og_post_insert, :on => :og_insert #Works smooth! :D #This method is called def og_post_insert puts 'Hey, a new post was just posted!' end #Not the one with the conn parameter Humber From jos at catnook.com Thu Dec 22 14:58:13 2005 From: jos at catnook.com (Jos Backus) Date: Thu, 22 Dec 2005 11:58:13 -0800 Subject: [Nitro] Problem with Nitro In Flames tutorial Message-ID: <20051222195835.GA40127@lizzy.catnook.local> http://www.nitrohq.com/view/Tutorials%3ANitro_In_Flames%3AChapter2 First I fixed the Timestamped mixin not working. Now I see: E, [2005-12-22T11:52:22.736477 #24193] ERROR -- : Error while handling '/admin/stylesheet/system'. E, [2005-12-22T11:52:22.737191 #24193] ERROR -- : uninitialized constant AdminController::Server /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/../src/part/admin/controller.rb:54:in `stylesheet' (eval):12:in `stylesheet_action' etc. -- Jos Backus jos at catnook.com From jos at catnook.com Thu Dec 22 15:16:19 2005 From: jos at catnook.com (Jos Backus) Date: Thu, 22 Dec 2005 12:16:19 -0800 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: <20051222195835.GA40127@lizzy.catnook.local> References: <20051222195835.GA40127@lizzy.catnook.local> Message-ID: <20051222201641.GB40127@lizzy.catnook.local> Replying to myself: It looks like part/admin/controller.rb need some changes: Server and RenderExit need to be Nitro::Server and Nitro::RenderExit. Not sure if that's correct but it stops the error. Of course as I am trying to learn Nitro I have no idea what I am doing. :-) (Having actual working examples would be Really Nice. As it stands, the threshold for learning to write Ruby web apps seems to be much lower with Rails than Nitro. That's sad since Nitro appears to be technically superior. At this rate of progress I may have no other option than to get the Rails book...) -- Jos Backus jos at catnook.com From chris at motionpath.com Thu Dec 22 16:17:36 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Thu, 22 Dec 2005 21:17:36 +0000 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: <20051222195835.GA40127@lizzy.catnook.local> References: <20051222195835.GA40127@lizzy.catnook.local> Message-ID: <59ED35D3-586B-4AFE-BB5F-4B1DC3F46B8D@motionpath.com> in your run.rb file, somewhere (after require 'nitro') do include Nitro I'll add the correct scope on the call in admin, but i think it is handy/common to include the main nitro module in your projects anyway since you probably dont want to be prefixing everything with Nitro:: chrisfarms On 22 Dec 2005, at 19:58, Jos Backus wrote: > http://www.nitrohq.com/view/Tutorials%3ANitro_In_Flames%3AChapter2 > > First I fixed the Timestamped mixin not working. Now I see: > > E, [2005-12-22T11:52:22.736477 #24193] ERROR -- : Error while handling > '/admin/stylesheet/system'. > E, [2005-12-22T11:52:22.737191 #24193] ERROR -- : uninitialized > constant > AdminController::Server > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/../src/part/ > admin/controller.rb:54:in > `stylesheet' > (eval):12:in `stylesheet_action' > etc. > > -- > Jos Backus > jos at catnook.com > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From jos at catnook.com Thu Dec 22 16:36:02 2005 From: jos at catnook.com (Jos Backus) Date: Thu, 22 Dec 2005 13:36:02 -0800 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: <2CF86E50-0D57-4BEE-B4E1-339A3A4F470F@farmiloe.com> References: <20051222195835.GA40127@lizzy.catnook.local> <2CF86E50-0D57-4BEE-B4E1-339A3A4F470F@farmiloe.com> Message-ID: <20051222213624.GA45166@lizzy.catnook.local> On Thu, Dec 22, 2005 at 09:15:19PM +0000, Chris Farmiloe wrote: > Quick fix... in your run file somewhere (after require 'nitro') > do an > > include Nitro > > I'll add put the correct scope on the call in admin, but i think it > is handy/common to include the main nitro module in your projects anyway > since you probably dont want to be prefixing everything with Nitro:: Thanks Chris. The problme with not prefixing is that Server is such a common class name. If Nitro uses its own version it should use the proper include (or prefix) rather than having the application do it. Jos > chrisfarms > > > On 22 Dec 2005, at 19:58, Jos Backus wrote: > > >http://www.nitrohq.com/view/Tutorials%3ANitro_In_Flames%3AChapter2 > > > >First I fixed the Timestamped mixin not working. Now I see: > > > >E, [2005-12-22T11:52:22.736477 #24193] ERROR -- : Error while handling > >'/admin/stylesheet/system'. > >E, [2005-12-22T11:52:22.737191 #24193] ERROR -- : uninitialized > >constant > >AdminController::Server > > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/../src/part/ > >admin/controller.rb:54:in > > `stylesheet' > > (eval):12:in `stylesheet_action' > > etc. > > > >-- > >Jos Backus > >jos at catnook.com > >_______________________________________________ > >Nitro-general mailing list > >Nitro-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/nitro-general > > -- Jos Backus jos at catnook.com From jos at catnook.com Thu Dec 22 17:14:37 2005 From: jos at catnook.com (Jos Backus) Date: Thu, 22 Dec 2005 14:14:37 -0800 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: <20051222195835.GA40127@lizzy.catnook.local> References: <20051222195835.GA40127@lizzy.catnook.local> Message-ID: <20051222221459.GA54278@lizzy.catnook.local> Next problem: I added src/controller.rb per the tutorial and while trying to access http://host/items I see: E, [2005-12-22T14:11:18.255399 #25040] ERROR -- : Error while handling '/items'. E, [2005-12-22T14:11:18.255729 #25040] ERROR -- : No action to dispatch to on Nitro::Controller /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/dispatcher.rb:202:in `dispatch' src/controller.rb looks like: class TodoController < Nitro::Controller scaffold TodoList scaffold Item end What am I missing? -- Jos Backus jos at catnook.com From chris at motionpath.com Thu Dec 22 17:22:20 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Thu, 22 Dec 2005 22:22:20 +0000 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: <20051222221459.GA54278@lizzy.catnook.local> References: <20051222195835.GA40127@lizzy.catnook.local> <20051222221459.GA54278@lizzy.catnook.local> Message-ID: the scaffolding has changed a bit since that tutorial... try visiting /items/list On 22 Dec 2005, at 22:14, Jos Backus wrote: > Next problem: I added src/controller.rb per the tutorial and while > trying to > access http://host/items I see: > > E, [2005-12-22T14:11:18.255399 #25040] ERROR -- : Error while handling > '/items'. > E, [2005-12-22T14:11:18.255729 #25040] ERROR -- : No action to > dispatch to on > Nitro::Controller > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/ > dispatcher.rb:202:in > `dispatch' > > src/controller.rb looks like: > > class TodoController < Nitro::Controller > scaffold TodoList > scaffold Item > end > > What am I missing? > > -- > Jos Backus > jos at catnook.com > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From jos at catnook.com Thu Dec 22 17:43:16 2005 From: jos at catnook.com (Jos Backus) Date: Thu, 22 Dec 2005 14:43:16 -0800 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: References: <20051222195835.GA40127@lizzy.catnook.local> <20051222221459.GA54278@lizzy.catnook.local> Message-ID: <20051222224338.GA54911@lizzy.catnook.local> On Thu, Dec 22, 2005 at 10:22:20PM +0000, Chris Farmiloe wrote: > the scaffolding has changed a bit since that tutorial... No doubt... > try visiting /items/list Thanks. Same error ensues. Jos > On 22 Dec 2005, at 22:14, Jos Backus wrote: > > >Next problem: I added src/controller.rb per the tutorial and while > >trying to > >access http://host/items I see: > > > >E, [2005-12-22T14:11:18.255399 #25040] ERROR -- : Error while handling > >'/items'. > >E, [2005-12-22T14:11:18.255729 #25040] ERROR -- : No action to > >dispatch to on > >Nitro::Controller > > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/ > >dispatcher.rb:202:in > > `dispatch' > > > >src/controller.rb looks like: > > > > class TodoController < Nitro::Controller > > scaffold TodoList > > scaffold Item > > end > > > >What am I missing? > > > >-- > >Jos Backus > >jos at catnook.com > >_______________________________________________ > >Nitro-general mailing list > >Nitro-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/nitro-general > > -- Jos Backus jos at catnook.com From james_b at neurogami.com Thu Dec 22 22:58:45 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 22 Dec 2005 20:58:45 -0700 Subject: [Nitro] Undefined method 'is' in session.rb In-Reply-To: <43AACFFD.1060900@neurogami.com> References: <43A99B19.3010006@neurogami.com> <200512211942.57449.m.fellinger@gmail.com> <43AACFFD.1060900@neurogami.com> Message-ID: <43AB75F5.3020607@neurogami.com> James Britt wrote: > George Moschovitis wrote: > >>>You have to give it some property before, since this class is not enchanted >>>with Og yet and so the keyword is not interpreted. >> >> >>No no need for property before, just >> >>require 'nano/module/is' > > > > Does not do any good. > > :( > Nor does simply calling ruby run.rb as suggested by the Wiki http://www.nitrohq.com/view/Tutorials:Nitro_Intro Even when using the exact code as on that page. Thanks, James -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From george.moschovitis at gmail.com Fri Dec 23 02:59:39 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 23 Dec 2005 09:59:39 +0200 Subject: [Nitro] Facets/Calibre (Nano/Mega) (In)Sanity In-Reply-To: <4b6f054f0512220927s21ea4f7cg9eee75c9be659a9f@mail.gmail.com> References: <4b6f054f0512220927s21ea4f7cg9eee75c9be659a9f@mail.gmail.com> Message-ID: Hello Tom, as I have told you privately, I like the organization used in facets-2005.10.30 (the version used by Nitro). Ie, the project is named facets, and you categorize small methods in nano, and bigger classes in mega. Alternatively you could keep big classes in calibre and small classes in facets. But please, please, PLEASE don't release the calibre classes as separate gems. This TOTALY sucks! Any other opinions? regards, George -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Fri Dec 23 04:33:54 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 23 Dec 2005 11:33:54 +0200 Subject: [Nitro] darcs Message-ID: I did the following on the repo: darcs tag # 0.26.0 darcs optimize --checkpoint so using: darcs get --partial http://repo.nitrohq.com you get a partial history (and much less files) perhaps this will help in keeping the patch bundles smaller... regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From zimba.tm at gmail.com Fri Dec 23 08:17:57 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Fri, 23 Dec 2005 14:17:57 +0100 Subject: [Nitro] Facets/Calibre (Nano/Mega) (In)Sanity In-Reply-To: References: <4b6f054f0512220927s21ea4f7cg9eee75c9be659a9f@mail.gmail.com> Message-ID: <3ff63f9b0512230517v663fc45fg@mail.gmail.com> Hi Tom, I agree with George regarding the release of multiple projects. For me, one gem corresponds to one utility. A pdf library, a robotcombat game, ... In your case, the problem is that facets is none ofthese. A gem is there to put together files that will changetogether. This is why I think it's difficult for you to organise it.Because facets is more an extension of the ruby core lib and manyclasses are independent from each-other. What I would do, is put all files in one package. One folder for allutils, each one in a different file, and one folder for classes thatwork together. If you think one class will always be used withanother, then you can put both in the same file. You could alsorelease every independent class as a separate gem, but I don't thinkit makes sense to release a gem with a single file in it. I see this like a database relationship. A file is a database, afolder is a group of databases. Each group can contain different"tables". This could be descibed with UML. However it doesn't apply toevery case. Also, I don't know your lib that much, so I can't give preciseadvices, but sometimes it's good to have somebody else giving externaladvices. This is why I'm telling all this. Hope this helps. On 23/12/05, George Moschovitis wrote:> Hello Tom,>> as I have told you privately, I like the organization used in> facets-2005.10.30 (the version used by Nitro).>> Ie, the project is named facets, and you categorize small methods> in nano, and bigger classes in mega.>> Alternatively you could keep big classes in calibre and small> classes in facets. But please, please, PLEASE don't release the calibre> classes as separate gems. This TOTALY sucks!>> Any other opinions?>> regards,> George>> --> http://www.gmosx.com> http://www.navel.gr> http://www.nitrohq.com>> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general> --Cheers, zimba http://zimba.oree.ch From tim at keow.org Fri Dec 23 09:53:30 2005 From: tim at keow.org (Tim Larson) Date: Fri, 23 Dec 2005 14:53:30 +0000 Subject: [Nitro] transaction exception logging Message-ID: <20051223145329.GB23021@localhost> In og/lib/og/store.rb "def transaction", why is there all that logging code present? It make it harder to find the error location than a simple rollback and re-raising of the exception would. Also it makes test case output for expected failures be unnecessarily verbose and redundant, and the lack of re-raising the exception makes it difficult to test when and if the right exceptions are being raised by the code being tested. I am recommending: def transaction(&block) begin start yield(self) commit rescue => ex #Logger.error 'Erro #Logger.error ex #Logger.error ex.ba rollback raise ex end end --Tim Larson From rob at motionpath.com Fri Dec 23 10:12:28 2005 From: rob at motionpath.com (rob) Date: Fri, 23 Dec 2005 15:12:28 +0000 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: <20051222221459.GA54278@lizzy.catnook.local> References: <20051222195835.GA40127@lizzy.catnook.local> <20051222221459.GA54278@lizzy.catnook.local> Message-ID: Have you mapped the correct controller to the / path? On 22 Dec 2005, at 22:14, Jos Backus wrote: > Next problem: I added src/controller.rb per the tutorial and while > trying to > access http://host/items I see: > > E, [2005-12-22T14:11:18.255399 #25040] ERROR -- : Error while handling > '/items'. > E, [2005-12-22T14:11:18.255729 #25040] ERROR -- : No action to > dispatch to on > Nitro::Controller > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/ > dispatcher.rb:202:in > `dispatch' > > src/controller.rb looks like: > > class TodoController < Nitro::Controller > scaffold TodoList > scaffold Item > end > > What am I missing? > > -- > Jos Backus > jos at catnook.com > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general From jhouchin at cableone.net Fri Dec 23 01:39:30 2005 From: jhouchin at cableone.net (Jimmie Houchin) Date: Fri, 23 Dec 2005 00:39:30 -0600 Subject: [Nitro] Nitro Screencasts In-Reply-To: References: Message-ID: Hello, Any possibility in getting these in mpeg format in the future? This would make them more easily downloadable and viewable by anyone. I am on an amd64 linux system and I have yet to go thru the trouble of creating a 32bit environment and the appropriate firefox and flash binaries for the 32bit environement. And Macromedia has yet to go thru the trouble of creating a 64bit binary. :( Mpeg is a very much more cross-platform video. Please, please, please. Thanks for listening. :) And hopefully considering. :) jimmie George Moschovitis wrote: > Dear devs, > > while fixing the final issues for the 0.26.0 release I took some time > to experiment with > vnc2swf to create some screen casts for Nitro / Og. Nitro is a > sophisticated Web2.0 framework that utilizes Ruby and Javascript and > Og is an innovative, transparent and efficient ORM library. > > You can find the first two screen casts here: > > http://www.nitrohq.com/view/Videos > > These two videos are experimental and certainly don't demonstrate the > full power of Nitro and > Og (far from it). But I hope you will like them anyway ;-) Stay tuned > for more impressive screen casts real soon! > > For more information on Nitro/Og surf www.nitrohq.com or install the gem: > > gem install nitro > > > best regards, > George. > > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com > > From george.moschovitis at gmail.com Fri Dec 23 10:30:52 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 23 Dec 2005 17:30:52 +0200 Subject: [Nitro] Nitro Screencasts In-Reply-To: References: Message-ID: If you tell me how to convert vnc2swf output to mpeg, I will do it ;-) -g. On 12/23/05, Jimmie Houchin wrote: > Hello, > Any possibility in getting these in mpeg format in the future? > This would make them more easily downloadable and viewable by anyone. > > I am on an amd64 linux system and I have yet to go thru the trouble of > creating a 32bit environment and the appropriate firefox and flash > binaries for the 32bit environement. And Macromedia has yet to go thru > the trouble of creating a 64bit binary. :( > > Mpeg is a very much more cross-platform video. Please, please, please. > > Thanks for listening. :) And hopefully considering. :) > > jimmie > > George Moschovitis wrote: > > Dear devs, > > > > while fixing the final issues for the 0.26.0 release I took some time > > to experiment with > > vnc2swf to create some screen casts for Nitro / Og. Nitro is a > > sophisticated Web2.0 framework that utilizes Ruby and Javascript and > > Og is an innovative, transparent and efficient ORM library. > > > > You can find the first two screen casts here: > > > > http://www.nitrohq.com/view/Videos > > > > These two videos are experimental and certainly don't demonstrate the > > full power of Nitro and > > Og (far from it). But I hope you will like them anyway ;-) Stay tuned > > for more impressive screen casts real soon! > > > > For more information on Nitro/Og surf www.nitrohq.com or install the gem: > > > > gem install nitro > > > > > > best regards, > > George. > > > > > > -- > > http://www.gmosx.com > > http://www.navel.gr > > http://www.nitrohq.com > > > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From jos at catnook.com Fri Dec 23 16:19:23 2005 From: jos at catnook.com (Jos Backus) Date: Fri, 23 Dec 2005 13:19:23 -0800 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: References: <20051222195835.GA40127@lizzy.catnook.local> <20051222221459.GA54278@lizzy.catnook.local> Message-ID: <20051223211945.GB12139@lizzy.catnook.local> On Fri, Dec 23, 2005 at 03:12:28PM +0000, rob wrote: > Have you mapped the correct controller to the / path? I tried that. See my response to Chris. Thanks, Jos > On 22 Dec 2005, at 22:14, Jos Backus wrote: > > >Next problem: I added src/controller.rb per the tutorial and while > >trying to > >access http://host/items I see: > > > >E, [2005-12-22T14:11:18.255399 #25040] ERROR -- : Error while handling > >'/items'. > >E, [2005-12-22T14:11:18.255729 #25040] ERROR -- : No action to > >dispatch to on > >Nitro::Controller > > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/ > >dispatcher.rb:202:in > > `dispatch' > > > >src/controller.rb looks like: > > > > class TodoController < Nitro::Controller > > scaffold TodoList > > scaffold Item > > end > > > >What am I missing? > > > >-- > >Jos Backus > >jos at catnook.com > >_______________________________________________ > >Nitro-general mailing list > >Nitro-general at rubyforge.org > >http://rubyforge.org/mailman/listinfo/nitro-general > > -- Jos Backus jos at catnook.com From jos at catnook.com Fri Dec 23 16:55:37 2005 From: jos at catnook.com (Jos Backus) Date: Fri, 23 Dec 2005 13:55:37 -0800 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: <20051223211945.GB12139@lizzy.catnook.local> References: <20051222195835.GA40127@lizzy.catnook.local> <20051222221459.GA54278@lizzy.catnook.local> <20051223211945.GB12139@lizzy.catnook.local> Message-ID: <20051223215559.GA37698@lizzy.catnook.local> On Fri, Dec 23, 2005 at 01:19:23PM -0800, Jos Backus wrote: > On Fri, Dec 23, 2005 at 03:12:28PM +0000, rob wrote: > > Have you mapped the correct controller to the / path? > > I tried that. See my response to Chris. Oops, my response to Chris was private. But it doesn't work: Nitro.run(TodoController) gives lizzy:~/public_html/nitro/todo% ruby run.rb D, [2005-12-23T13:53:58.174095 #37880] DEBUG -- : Using memory sessions. nil I, [2005-12-23T13:53:59.268807 #37880] INFO -- : Og uses the Mysql store. /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/compiler/elements.rb:34:in `const_get': uninitialized constant SystemPage (NameError) from /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/compiler/elements.rb:34:in `tag_start' from /usr/local/lib/ruby/1.8/rexml/parsers/streamparser.rb:24:in `parse' from /usr/local/lib/ruby/1.8/rexml/document.rb:171:in `parse_stream' from /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/compiler/elements.rb:100:in `transform' from /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/compiler/elements.rb:92:in `transform' from /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/compiler.rb:96:in `transform_template' from /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/scaffolding.rb:103:in `define_controller_action' from /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/scaffolding.rb:140:in `scaffold_controller' ... 10 levels... from /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/server.rb:89:in `start' from /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/server.rb:121:in `run' from /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro.rb:73:in `run' from run.rb:18 lizzy:~/public_html/nitro/todo% and Nitro.map["/"] = TodoController Nitro.run yields lizzy:~/public_html/nitro/todo% ruby run.rb D, [2005-12-23T13:54:33.325165 #37940] DEBUG -- : Using memory sessions. nil I, [2005-12-23T13:54:33.827597 #37940] INFO -- : Og uses the Mysql store. run.rb:19: undefined method `map' for Nitro:Module (NoMethodError) lizzy:~/public_html/nitro/todo% run.rb is #!/usr/bin/env ruby require 'nitro' require 'og' require 'src/model.rb' require 'src/controller.rb' #require 'part/admin' Og.setup( :store => :mysql, :name => 'todo', :user => 'jos', :password => '********' ) #Nitro.run(TodoController) Nitro.map["/"] = TodoController Nitro.run Jos > Thanks, > Jos > > > On 22 Dec 2005, at 22:14, Jos Backus wrote: > > > > >Next problem: I added src/controller.rb per the tutorial and while > > >trying to > > >access http://host/items I see: > > > > > >E, [2005-12-22T14:11:18.255399 #25040] ERROR -- : Error while handling > > >'/items'. > > >E, [2005-12-22T14:11:18.255729 #25040] ERROR -- : No action to > > >dispatch to on > > >Nitro::Controller > > > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/ > > >dispatcher.rb:202:in > > > `dispatch' > > > > > >src/controller.rb looks like: > > > > > > class TodoController < Nitro::Controller > > > scaffold TodoList > > > scaffold Item > > > end > > > > > >What am I missing? > > > > > >-- > > >Jos Backus > > >jos at catnook.com > > >_______________________________________________ > > >Nitro-general mailing list > > >Nitro-general at rubyforge.org > > >http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > -- > Jos Backus > jos at catnook.com > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- Jos Backus jos at catnook.com From vikingtux at gmail.com Fri Dec 23 19:55:51 2005 From: vikingtux at gmail.com (Alexandre Gravem) Date: Fri, 23 Dec 2005 22:55:51 -0200 Subject: [Nitro] [Flare] Not rendering tags correctly Message-ID: <40b05ebe0512231655s4bb0d7a6lea97805ecc7e0c71@mail.gmail.com> Hello all, I installed Flare as said in the README file. But the tags aren't interpreted. If I change to it works fine. Am I missing something? There is any adicional library to required? Alexandre Gravem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051223/89cbfdfb/attachment.html From transfire at gmail.com Fri Dec 23 20:54:58 2005 From: transfire at gmail.com (TRANS) Date: Fri, 23 Dec 2005 20:54:58 -0500 Subject: [Nitro] help with og! In-Reply-To: <3ff63f9b0512200321i65f1918bh@mail.gmail.com> References: <4b6f054f0512050807h38b99171gab5824ebfcba0dd9@mail.gmail.com> <3ff63f9b0512051213y2ef6bd31x@mail.gmail.com> <4b6f054f0512111612k276b1c81p6332401b74345500@mail.gmail.com> <3ff63f9b0512120501i2dda1a53h@mail.gmail.com> <4b6f054f0512120623j734df3f4ke520f8bd6e0b6e4f@mail.gmail.com> <3ff63f9b0512121454v36ef9c78m@mail.gmail.com> <3ff63f9b0512200321i65f1918bh@mail.gmail.com> Message-ID: <4b6f054f0512231754r74b48675j91334a588c66d151@mail.gmail.com> I've finally was able to take some time to look it over. I have to say it looks pretty sexy. The Setup I think is very nice, being both clean and explicit. Relations is a very cool idea, although it may be a little _too_ magical. A couple of issues come to mind: what if you actually do want to store a class in an attribute? Also what if it doesn't conform to the pluralization rules? We need nice ways to handle these. The Types idea seems like the right approach to me too, but it harder than you might realize --I've tried it. You have to take into account that it might differ for each DB-adapter, so that adds another dimension. (Hmm... that's insteresting, OT but, OOP is sort of two dimensional in nature Object x Subject. It will be Selector Namespaces that actually move us beyond this. Very interesting....) If we had Selector Namespace though we could define the method according to which adapter was in use --that would be pretty awesome. T. From zimba.tm at gmail.com Fri Dec 23 22:10:25 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Sat, 24 Dec 2005 04:10:25 +0100 Subject: [Nitro] help with og! In-Reply-To: <4b6f054f0512231754r74b48675j91334a588c66d151@mail.gmail.com> References: <3ff63f9b0512051213y2ef6bd31x@mail.gmail.com> <4b6f054f0512111612k276b1c81p6332401b74345500@mail.gmail.com> <3ff63f9b0512120501i2dda1a53h@mail.gmail.com> <4b6f054f0512120623j734df3f4ke520f8bd6e0b6e4f@mail.gmail.com> <3ff63f9b0512121454v36ef9c78m@mail.gmail.com> <3ff63f9b0512200321i65f1918bh@mail.gmail.com> <4b6f054f0512231754r74b48675j91334a588c66d151@mail.gmail.com> Message-ID: <3ff63f9b0512231910s3872b3ffq@mail.gmail.com> Hi TRANS, I'm happy you took some time to review this idea. On 24/12/05, TRANS wrote:> I've finally was able to take some time to look it over. I have to say> it looks pretty sexy.>> The Setup I think is very nice, being both clean and explicit. Ok, nice. I love to think simple. > Relations is a very cool idea, although it may be a little _too_> magical. A couple of issues come to mind: what if you actually do want> to store a class in an attribute? I see. Do you see any case where it would be useful to store classesdirectly ? In the actual Og, we have shema_inheritance, but it ismanaged by Og. So I assume it can be handled differently. > Also what if it doesn't conform to> the pluralization rules? If applicable, I had in the idea that the Og would replacerelationships with an Enumerable object. How could we tell thatGroup[1].users is an array of User ? Also, is it possible to havedifferent classes in the enumerable ? class Group def initialize() @users = Array.of User endend > We need nice ways to handle these. I totally agree. In general, I think we could use the ann tool torefine the objects. Maybe other ideas will come later. > The Types idea seems like the right approach to me too, but it harder> than you might realize --I've tried it. You have to take into account> that it might differ for each DB-adapter, so that adds another> dimension. Yes. What I like with the current Og is that an adapter doesn't haveto implement every transformation if it's compatible. What do youthink of re-opening the classes to inject adapter-specific code ? Wehave to take in account that it should also be possible to use twostores at the same time on different adapters. So we can't justreplace the main Og::Type code with adapter-specific code. > (Hmm... that's insteresting, OT but, OOP is sort of two> dimensional in nature Object x Subject. It will be Selector Namespaces> that actually move us beyond this. Very interesting....) If we had> Selector Namespace though we could define the method according to> which adapter was in use --that would be pretty awesome. I think your ruby OOP-fu is way beyond mine. What do you mean by"Subject" ? I think I get the idea, but I'm not sure at all. Talkingabout alternatives, what do you think of the "cut" AOP library ? I just had a funny idea while re-reading this email. I think mostprototype-based languages are not successful because the differencebetween a class and an instance is too weak. People get lost in thecode structure. On the other side, class-based OOP languages arefighting to remove the difference between a class and an object (eg.meta-ruby). Do you see the contradiction ? :-p --Cheers, zimba http://zimba.oree.ch From transfire at gmail.com Sat Dec 24 00:34:16 2005 From: transfire at gmail.com (TRANS) Date: Sat, 24 Dec 2005 00:34:16 -0500 Subject: [Nitro] Og fixtures for Time class In-Reply-To: <37fd0c50512191245r56e84d5fr59273d71aa500872@mail.gmail.com> References: <37fd0c50512191245r56e84d5fr59273d71aa500872@mail.gmail.com> Message-ID: <4b6f054f0512232134m55b4c05eod850b9cf5a1d3b67@mail.gmail.com> On 12/19/05, Humber Aquino wrote: > Hi everyone! I'm having a little problem with the fixtures.. You've probably alrady figured this out, bu just in case.... it looks like it's a mater of the YAML not converting to a time. Look at this irb session: irb(main):013:0> y = %q{ irb(main):014:0' --- irb(main):015:0' a: 2005-10-11 irb(main):016:0' b: 2005-10-11 09:00:00 irb(main):017:0' } => "\n---\na: 2005-10-11\nb: 2005-10-11 09:00:00\n" irb(main):018:0> YAML::load(y) => {"a"=>#, "b"=>"2005-10-11 09:00:00"} irb(main):019:0> HTH, T. From rainhead at gmail.com Sat Dec 24 02:31:19 2005 From: rainhead at gmail.com (Peter Abrahamsen) Date: Fri, 23 Dec 2005 23:31:19 -0800 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: <20051223215559.GA37698@lizzy.catnook.local> References: <20051222195835.GA40127@lizzy.catnook.local> <20051222221459.GA54278@lizzy.catnook.local> <20051223211945.GB12139@lizzy.catnook.local> <20051223215559.GA37698@lizzy.catnook.local> Message-ID: <428455D9-524B-407D-AB91-9744547AB36C@gmail.com> The first probably (guessing) doesn't work because you're using the native mysql bindings, which are apparently broken, as per a recent post. Try the C ones, gem install mysql. The second doesn't work because map is a method of Nitro.Server, not Nitro. Hope this helps, Peter -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2410 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051224/345a683b/attachment.bin From jos at catnook.com Sat Dec 24 03:04:09 2005 From: jos at catnook.com (Jos Backus) Date: Sat, 24 Dec 2005 00:04:09 -0800 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: <428455D9-524B-407D-AB91-9744547AB36C@gmail.com> References: <20051222195835.GA40127@lizzy.catnook.local> <20051222221459.GA54278@lizzy.catnook.local> <20051223211945.GB12139@lizzy.catnook.local> <20051223215559.GA37698@lizzy.catnook.local> <428455D9-524B-407D-AB91-9744547AB36C@gmail.com> Message-ID: <20051224080431.GA48728@lizzy.catnook.local> On Fri, Dec 23, 2005 at 11:31:19PM -0800, Peter Abrahamsen wrote: > > > The first probably (guessing) doesn't work because you're using the > native mysql bindings, which are apparently broken, as per a recent > post. Try the C ones, gem install mysql. Thanks, but I did that already (`gem install mysql') because with the native bindings running run.rb a second time without :destroy == true yields an error. > The second doesn't work because map is a method of Nitro.Server, not > Nitro. Okay, so how do I fix that? Please remember that I'm trying to get this tutorial to work. A broken tutorial in some sense is worse than no tutorial because it just frustrates people and they will move on to something else (likely Rails in this case). Your help _is_ appreciated, of course. Jos > Hope this helps, > > Peter > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general -- Jos Backus jos at catnook.com From humberaquino at gmail.com Sat Dec 24 14:45:59 2005 From: humberaquino at gmail.com (Humber Aquino) Date: Sat, 24 Dec 2005 16:45:59 -0300 Subject: [Nitro] Og fixtures for Time class In-Reply-To: <4b6f054f0512232134m55b4c05eod850b9cf5a1d3b67@mail.gmail.com> References: <37fd0c50512191245r56e84d5fr59273d71aa500872@mail.gmail.com> <4b6f054f0512232134m55b4c05eod850b9cf5a1d3b67@mail.gmail.com> Message-ID: <37fd0c50512241145j4c8ca663i74b8142ee69b78ce@mail.gmail.com> Hi TRANS!! Thanks a lot! As you said, it's a mater of the YAML This is a helpful cookbook for using yaml with ruby http://yaml4r.sourceforge.net/cookbook/ Yaml recognize this pattern for the time: iso8601: 2001-12-14t21:59:43.10-05:00 space seperated: 2001-12-14 21:59:43.10 -05:00 For example: y = %q{ iso8601: 2001-12-14t21:59:43.10-05:00 space seperated: 2001-12-14 21:59:43.10 -05:00 } YAML::load(y).each { |key, value| puts "'#{key}' => (#{value.class}) #{value}"} # 'space seperated' => (Time) Fri Dec 14 23:59:43 PYST 2001 # 'iso8601' => (Time) Fri Dec 14 23:59:43 PYST 2001 Thanks again T. and mary christmas! :D Humber From chris at motionpath.com Sat Dec 24 17:02:46 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Sat, 24 Dec 2005 22:02:46 +0000 Subject: [Nitro] Has anyone else been missing emails from the mailing list? In-Reply-To: References: Message-ID: <12BE073B-64C9-4F94-AF98-1999C9FB966A@motionpath.com> woohoo looks like the epostmen arn't on strike anymore ... backlog of messages!.... thought the list was quiet! *reads* On 21 Dec 2005, at 20:18, Bryan Soto wrote: > So far I've missed: > > George's three requests for a resend on my validation key patch > (Sorry George), > Nitro/Og 0.26.0 Announcement, > James Britt's undefined method 'is' in session, but have Michael's > follow up, > Tim Larson's Taggable demodulize, > and an email each from Nitro Screencasts and Using > Nitro::Controller as main. > > Using gmail. > List archives at http://rubyforge.org/pipermail/nitro-general/2005- > December/thread.html. > > I don't use filters and my spam and trash are empty, so I'm > somewhat confused... > > Thanks for any help, > > bryan > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051224/c7868033/attachment.html From m.fellinger at gmail.com Sat Dec 24 17:07:41 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sat, 24 Dec 2005 23:07:41 +0100 Subject: [Nitro] Has anyone else been missing emails from the mailing list? In-Reply-To: <12BE073B-64C9-4F94-AF98-1999C9FB966A@motionpath.com> References: <12BE073B-64C9-4F94-AF98-1999C9FB966A@motionpath.com> Message-ID: <200512242307.45715.m.fellinger@gmail.com> omfg! now i'm flooded with mails from the whole week... just got some from wednesday and thursday :| and well... now i have them thrice - horray for the *delete dupes* method of KMail ^^ ~~~~ manveru Am Samstag, 24. Dezember 2005 23:02 schrieb Chris Farmiloe: > woohoo looks like the epostmen arn't on strike anymore ... > backlog of messages!.... thought the list was quiet! > > *reads* > > On 21 Dec 2005, at 20:18, Bryan Soto wrote: > > So far I've missed: > > > > George's three requests for a resend on my validation key patch > > (Sorry George), > > Nitro/Og 0.26.0 Announcement, > > James Britt's undefined method 'is' in session, but have Michael's > > follow up, > > Tim Larson's Taggable demodulize, > > and an email each from Nitro Screencasts and Using > > Nitro::Controller as main. > > > > Using gmail. > > List archives at http://rubyforge.org/pipermail/nitro-general/2005- > > December/thread.html. > > > > I don't use filters and my spam and trash are empty, so I'm > > somewhat confused... > > > > Thanks for any help, > > > > bryan > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051224/b0c2b4bd/attachment.bin From jos at catnook.com Sat Dec 24 19:21:44 2005 From: jos at catnook.com (Jos Backus) Date: Sat, 24 Dec 2005 16:20:44 -0801 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: <20051223215559.GA37698@lizzy.catnook.local> References: <20051222195835.GA40127@lizzy.catnook.local> <20051222221459.GA54278@lizzy.catnook.local> <20051223211945.GB12139@lizzy.catnook.local> <20051223215559.GA37698@lizzy.catnook.local> Message-ID: <20051225002106.GA10939@lizzy.catnook.local> On Fri, Dec 23, 2005 at 01:55:37PM -0800, Jos Backus wrote: [snip] > Nitro.run(TodoController) > > gives > > lizzy:~/public_html/nitro/todo% ruby run.rb > D, [2005-12-23T13:53:58.174095 #37880] DEBUG -- : Using memory sessions. > nil > I, [2005-12-23T13:53:59.268807 #37880] INFO -- : Og uses the Mysql store. > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/compiler/elements.rb:34:in `const_get': uninitialized constant SystemPage (NameError) > from /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/compiler/elements.rb:34:in `tag_start' On Dec 14, Bryan Soto wrote: >Using scaffolding without 'part/admin' doesn't work. > >The generated pages all depend on SystemPage (nitro/src/part/admin/skin.rb) >and SystemPage depends on AdminPart (nitro/src/part/admin.rb) because of the >inline_css setting. > >I'm assuming that scaffolding should be usable without part/admin. Of >course, with gen form, maybe that's deprecated? > >I use Mysql so I can report on how that goes. So I added require `'part/admin'' in hopes that that would fix that problem. But alas, same error: [2005-12-24 16:16:19] INFO WEBrick 1.3.1 [2005-12-24 16:16:19] INFO ruby 1.8.2 (2004-12-25) [i386-freebsd7] [2005-12-24 16:16:19] INFO WEBrick::HTTPServer#start: pid=33636 port=9999 D, [2005-12-24T16:16:34.659286 #33636] DEBUG -- : Rendering '/'. E, [2005-12-24T16:16:34.996333 #33636] ERROR -- : Error while handling '/'. E, [2005-12-24T16:16:34.997356 #33636] ERROR -- : No action to dispatch to on TodoController /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/dispatcher.rb:202:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/render.rb:115:in `render' /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/adapter/webrick.rb:145:in `do_GET' -- Jos Backus jos at catnook.com From rainhead at gmail.com Sat Dec 24 19:57:53 2005 From: rainhead at gmail.com (Peter Abrahamsen) Date: Sat, 24 Dec 2005 16:57:53 -0800 Subject: [Nitro] transform_template -> block In-Reply-To: <20051213154029.GG25600@localhost> References: <20051212194746.GE25600@localhost> <20051212211819.GF25600@localhost> <20051213154029.GG25600@localhost> Message-ID: This points to what I think is something that needs a bit of refactoring in Nitro, which is how Templates are generated. I started looking at them when some javascript I put in a page, something like: alert("Booga Booga!\n"); failed because the \n was interpreted, not left as a literal as one would expect in a template. This caused the javascript to fail, since the string was then unterminated. It is an consequence of the way templates are built by Nitro, namely, turned into one big string with ruby script text interspersed. It seems like a hack, in a bad way. What would be a better way to build templates? Peter From transfire at gmail.com Sun Dec 25 00:34:43 2005 From: transfire at gmail.com (TRANS) Date: Sun, 25 Dec 2005 00:34:43 -0500 Subject: [Nitro] in... vain... In-Reply-To: References: Message-ID: <4b6f054f0512242134v7ccb2d5cibdf816bcb3d6aa16@mail.gmail.com> On 12/13/05, Emmanuel Piperakis wrote: > Dear list, > I have posted the same problem in the past, and I have been reassured that > in 0.25 it would be fixed... here is a bit of code that illustrates the > problem... > Have you made any progress on this? I'mnot too sure myself, Og does a lot of magic and I am yet familiar with it all. But in looking at this code I am struct by ine thing, it may be be nothing but... 72 # this work... 73 ar = Array.new 74 foo1.bars.each {|ii| 75 ar.push(ii.foobars) # <- foobars called on each element. 76 } 77 78 ar.flatten! 79 ar.size 80 81 # next line should work, but it does not 82 foo_foobars = foo1.bars.foobars # <- foobars called on the whole collection. 83 foo_foobars.class Is the #foobars method supposed to apply to each element and the collection too? T. From itsme213 at hotmail.com Sun Dec 25 00:39:01 2005 From: itsme213 at hotmail.com (itsme213) Date: Sat, 24 Dec 2005 23:39:01 -0600 Subject: [Nitro] Problem with Nitro In Flames tutorial References: <20051222195835.GA40127@lizzy.catnook.local> <20051222201641.GB40127@lizzy.catnook.local> Message-ID: > (Having actual working examples would be Really Nice. As it stands, the > threshold for learning to write Ruby web apps seems to be much lower with > Rails than Nitro. That's sad since Nitro appears to be technically > superior. > At this rate of progress I may have no other option than to get the Rails > book...) As I have done too. I'd rather use Nitro but it's so much harder getting started in its current form ... hope that changes in time. From vikingtux at gmail.com Sun Dec 25 01:08:00 2005 From: vikingtux at gmail.com (Alexandre Gravem) Date: Sun, 25 Dec 2005 04:08:00 -0200 Subject: [Nitro] examples-0.26: blog example doesn't work In-Reply-To: <20051222013500.GB73518@lizzy.catnook.local> References: <20051222000030.GA73518@lizzy.catnook.local> <20051222013500.GB73518@lizzy.catnook.local> Message-ID: <40b05ebe0512242208wed2b9agb3e72987fa2147c8@mail.gmail.com> I have experienced that error too when posting comments! On 12/21/05, Jos Backus wrote: > > On Wed, Dec 21, 2005 at 04:23:12PM -0800, Bryan Soto wrote: > > Hi, > > > > I ran into similar error messages, though on Linux. I believe it has to > do > > with the version of MySql and the Ruby bindings to it. You might try > > running: > > > > gem install mysql > > > > to get the C bindings. Those worked for me. They're also faster. > > > > They might be available via ports, though I don't know for sure. > > I installed the gem and that seems to work. Thanks! > > My next problem occurs when I try to add a comment. Log: > > E, [2005-12-21T17:32:04.107682 #89161] ERROR -- : Error while handling > '/view/2'. > E, [2005-12-21T17:32:04.108430 #89161] ERROR -- : undefined method > `create_time' for nil:NilClass > src/template/view.xhtml:30:in `view_template' > (eval):6:in `view_action' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/controller.rb:88:in > `send' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/controller.rb:88:in > `method_missing' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/render.rb:125:in > `send' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/render.rb:125:in > `render' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/adapter/webrick.rb:145:in > `do_GET' > /usr/local/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `__send__' > /usr/local/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service' > /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' > /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' > /usr/local/lib/ruby/1.8/webrick/server.rb:155:in `start_thread' > /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start' > /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start_thread' > /usr/local/lib/ruby/1.8/webrick/server.rb:94:in `start' > /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `each' > /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `start' > /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start' > /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/adapter/webrick.rb:55:in > `start' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/server/runner.rb:297:in > `invoke_server' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/server/runner.rb:263:in > `invoke' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/server.rb:124:in > `run' > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro.rb:73:in `run' > run.rb:48 > > Do you see this too? > > -- > Jos Backus > jos at catnook.com > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051225/3069e994/attachment.html From transfire at gmail.com Sun Dec 25 04:05:06 2005 From: transfire at gmail.com (TRANS) Date: Sun, 25 Dec 2005 04:05:06 -0500 Subject: [Nitro] Nitro 0.26 error: undefined method `is' for Nitro::Session:Class (NoMethodError) In-Reply-To: <43A98D01.4090706@neurogami.com> References: <43A98D01.4090706@neurogami.com> Message-ID: <4b6f054f0512250105t4e32587fnb7dfca65e75994bf@mail.gmail.com> On 12/21/05, James Britt wrote: > I update Nitro, and just tried running a Nitro app under CGI on a WinXP > box, and I get an exception in session.rb. > > c:/ruby/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/session.rb:30: > undefined method `is' for Nitro::Session:Class (NoMethodError) > > This is line 29/30: > > class Session < Hash > is Expirable > > > > Where is 'is' defined? > It's an alias for include. With current version it should be defined in nano/module/is.rb. T. From epiperak at softlab.ece.ntua.gr Sun Dec 25 05:59:06 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Sun, 25 Dec 2005 12:59:06 +0200 (EET) Subject: [Nitro] Merry Christmas... Message-ID: Unfortunately Christmas and I am at work preparing for a presentation. I found a bug in 0.26 class Project property :hohoho, String ... schema_inheritance end class ForeignProject < Project property :santa, String ... end class DomesticProject < Project property :evilsanta, String ... end the table ogproject only inherits ForeignProjects' properties!!! NOT the DomesticProjects' !!! It must be really simple to fix, ... Please advise... Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From transfire at gmail.com Sun Dec 25 10:52:34 2005 From: transfire at gmail.com (TRANS) Date: Sun, 25 Dec 2005 10:52:34 -0500 Subject: [Nitro] Merry Christmas... In-Reply-To: References: Message-ID: <4b6f054f0512250752n3a025a70w3ed28223afee7d08@mail.gmail.com> On 12/25/05, Emmanuel Piperakis wrote: > Unfortunately Christmas and I am at work preparing for a presentation. > I found a bug in 0.26 > > class Project > property :hohoho, String > ... > schema_inheritance > end > > class ForeignProject < Project > property :santa, String > ... > end > > class DomesticProject < Project > property :evilsanta, String > ... > end > > the table ogproject only inherits ForeignProjects' properties!!! NOT the > DomesticProjects' !!! It must be really simple to fix, ... > Please advise... Fraid I don't understand enough to help here, but maybe you can answer a question for me and maybe I can understand enough. What does schema_inheritance do exactly? Thanks, T. From vikingtux at gmail.com Sun Dec 25 11:54:12 2005 From: vikingtux at gmail.com (Alexandre Gravem) Date: Sun, 25 Dec 2005 14:54:12 -0200 Subject: [Nitro] Merry Christmas... In-Reply-To: <4b6f054f0512250752n3a025a70w3ed28223afee7d08@mail.gmail.com> References: <4b6f054f0512250752n3a025a70w3ed28223afee7d08@mail.gmail.com> Message-ID: <40b05ebe0512250854t6510cb8bu91f2921a6127031c@mail.gmail.com> schema_inherintance implements a SingleTableInheritancepattern. yours, Alexandre Gravem On 12/25/05, TRANS wrote: > > On 12/25/05, Emmanuel Piperakis wrote: > > Unfortunately Christmas and I am at work preparing for a presentation. > > I found a bug in 0.26 > > > > class Project > > property :hohoho, String > > ... > > schema_inheritance > > end > > > > class ForeignProject < Project > > property :santa, String > > ... > > end > > > > class DomesticProject < Project > > property :evilsanta, String > > ... > > end > > > > the table ogproject only inherits ForeignProjects' properties!!! NOT the > > DomesticProjects' !!! It must be really simple to fix, ... > > Please advise... > > Fraid I don't understand enough to help here, but maybe you can answer > a question for me and maybe I can understand enough. What does > schema_inheritance do exactly? > > Thanks, > T. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051225/6b260c46/attachment.html From epiperak at softlab.ece.ntua.gr Sun Dec 25 12:00:23 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Sun, 25 Dec 2005 19:00:23 +0200 (EET) Subject: [Nitro] schema_inheritance Message-ID: Trans, what it does is, in the case of subclasses if in the superclass you include the line schema_inheritance Og create 1 table for all the subclasses and puts the UNION of all properties in this table + one new column called ogtype that distinguishes the subclass by holding the .class of the subclass (aka the name of the Subclass). If schema inheritance is not used then each class and subclass has its own table. eg. (to use the same example) class Project property :xmas, String schema_inheritance end class ForeignProject < Project property :gift, String end class DomesticProject < Project property :santa, String end Og creates one table with the following columns (at least for version 0.25 and NOT for 0.26) ogtype ogxmas oggift ogsanta oid schema_inheritance is necessary for certain kind of queries... do not ask me not to use it as a solution... ;-) Thanks for your patience... Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From transfire at gmail.com Sun Dec 25 12:39:07 2005 From: transfire at gmail.com (TRANS) Date: Sun, 25 Dec 2005 12:39:07 -0500 Subject: [Nitro] schema_inheritance In-Reply-To: References: Message-ID: <4b6f054f0512250939v58e9e261p9d692e73d685c4@mail.gmail.com> On 12/25/05, Emmanuel Piperakis wrote: > Trans, > what it does is, > > in the case of subclasses if in the superclass you include the line > schema_inheritance Og create 1 table for all the subclasses and puts the > UNION of all properties in this table + one new column called ogtype that > distinguishes the subclass by holding the .class of the subclass (aka the > name of the Subclass). If schema inheritance is not used then each class > and subclass has its own table. > > eg. (to use the same example) > > class Project > property :xmas, String > schema_inheritance > end > > class ForeignProject < Project > property :gift, String > end > > class DomesticProject < Project > property :santa, String > end > > Og creates one table with the following columns (at least for version 0.25 > and NOT for 0.26) > > ogtype > ogxmas > oggift > ogsanta > oid Thanks. I think I understand. > schema_inheritance is necessary for certain kind of queries... do not ask > me not to use it as a solution... ;-) Well, I certaily wouldn't tell you to do that! :-) On the Og implementation side though I do find it kind of interesting, even a bit unexpected, of the way to do that, i.e. using a superclass to create the union. But I guess it actually makes good sense. But why not call is union_inheritance instead? That seems more intuitive. Perhaps evn better, would a mixin, or a superclass, be more appropriate here? Eg. class Project is Union property :xmas, String end or class Project < Union property :xmas, String end Also, what's the reason for the field names to be prefixed by 'og'? T. From transfire at gmail.com Sun Dec 25 12:40:26 2005 From: transfire at gmail.com (TRANS) Date: Sun, 25 Dec 2005 12:40:26 -0500 Subject: [Nitro] Merry Christmas... In-Reply-To: <40b05ebe0512250854t6510cb8bu91f2921a6127031c@mail.gmail.com> References: <4b6f054f0512250752n3a025a70w3ed28223afee7d08@mail.gmail.com> <40b05ebe0512250854t6510cb8bu91f2921a6127031c@mail.gmail.com> Message-ID: <4b6f054f0512250940v72b521d6xa29de1775262f21e@mail.gmail.com> On 12/25/05, Alexandre Gravem wrote: > schema_inherintance implements a SingleTableInheritance pattern. > > yours, Alexandre Gravem Thanks, that nice and concise. T. From bernd at bdebl.de Sun Dec 25 12:55:30 2005 From: bernd at bdebl.de (Martin Bernd Schmeil) Date: Sun, 25 Dec 2005 18:55:30 +0100 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: References: <20051222195835.GA40127@lizzy.catnook.local> <20051222201641.GB40127@lizzy.catnook.local> Message-ID: <43AEDD12.5020503@bdebl.de> itsme213 wrote: >>(Having actual working examples would be Really Nice. As it stands, the >>threshold for learning to write Ruby web apps seems to be much lower with >>Rails than Nitro. That's sad since Nitro appears to be technically >>superior. >>At this rate of progress I may have no other option than to get the Rails >>book...) >> >> > >As I have done too. I'd rather use Nitro but it's so much harder getting >started in its current form ... hope that changes in time. > > Absolutely right. I think there's progress on the documentation front (it improved over the last have year). On the other hand at my work we're currently (plan) evaluating alternatives to java / j2ee and after one year of talking about rails and half a year about nitro my team leader is very interested in both. But his decision for a test implementation fell on rails, because of the known problems. For my (still planed) private project i still hope to go with nitro. I just wish that if solutions are posted to this list, someone with a clue sorts out the workarounds and bad hacks and corrects / extends the existing docs with the "real way". I volunteer to do the latter... (can't do the former for obvious reasons). - Bernd From humberaquino at gmail.com Sun Dec 25 17:50:17 2005 From: humberaquino at gmail.com (Humber Aquino) Date: Sun, 25 Dec 2005 19:50:17 -0300 Subject: [Nitro] in... vain... In-Reply-To: <4b6f054f0512242134v7ccb2d5cibdf816bcb3d6aa16@mail.gmail.com> References: <4b6f054f0512242134v7ccb2d5cibdf816bcb3d6aa16@mail.gmail.com> Message-ID: <37fd0c50512251450g38a9656yc0f62ba9514e0562@mail.gmail.com> puts "foo1.bars returns an #{foo1.bars .class} object" > # next line should work, but it does not > foo_foobars = foo1.bars.foobars foo1.bars # returns an object of the class Og::HasManyCollection. This class is a subclass of Og::Collection # Og::HasManyCollection just inherits from Og::Collection # Og::Collection has this public methods # [] check_type delete delete_all delete_if each load_members method_missing new push reload remove #remove_all size to_ary unload # And none of them loads all "foobars" for each bar in foo.. # If you want a clean logic has that you can define a method in your foo class as this def foobars result = [] bars.each { |bar| result.concat(bar.foobars) } return result end #And try the call foo_foobars = foo1.foobars # I don't know if og does this automatically, but it would be a nice feature Humber From vikingtux at gmail.com Sun Dec 25 18:22:04 2005 From: vikingtux at gmail.com (Alexandre Gravem) Date: Sun, 25 Dec 2005 21:22:04 -0200 Subject: [Nitro] schema_inheritance In-Reply-To: <4b6f054f0512250939v58e9e261p9d692e73d685c4@mail.gmail.com> References: <4b6f054f0512250939v58e9e261p9d692e73d685c4@mail.gmail.com> Message-ID: <40b05ebe0512251522m2ee4d2eam1daa9b8cde75f3a@mail.gmail.com> > > Perhaps evn better, would a mixin, or a superclass, be more > appropriate here? Eg. > > class Project > is Union > property :xmas, String > end > > or > > class Project < Union > property :xmas, String > end > > Also, what's the reason for the field names to be prefixed by 'og'? > > T. I agree with the use of mixin ... the name Schema_Inheritance seems fine to me! Gravem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051225/69b2ef13/attachment.html From vikingtux at gmail.com Sun Dec 25 18:37:33 2005 From: vikingtux at gmail.com (Alexandre Gravem) Date: Sun, 25 Dec 2005 21:37:33 -0200 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: References: <20051222195835.GA40127@lizzy.catnook.local> <20051222201641.GB40127@lizzy.catnook.local> Message-ID: <40b05ebe0512251537o36661f12h3cadbd56c702e889@mail.gmail.com> On 12/25/05, itsme213 wrote: > > > (Having actual working examples would be Really Nice. As it stands, the > > threshold for learning to write Ruby web apps seems to be much lower > with > > Rails than Nitro. That's sad since Nitro appears to be technically > > superior. > > At this rate of progress I may have no other option than to get the > Rails > > book...) > > As I have done too. I'd rather use Nitro but it's so much harder getting > started in its current form ... hope that changes in time. I will join the "Bad docs are getting people away from Nitro" choir! I agree with everything that was said. I am trying hard to set up some learning projects using Nitro but it's too hard without good documentation. In my actual level there is little I can do for help!! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051225/e3eec895/attachment.html From epiperak at softlab.ece.ntua.gr Sun Dec 25 20:04:32 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Mon, 26 Dec 2005 03:04:32 +0200 (EET) Subject: [Nitro] schema_inheritance In-Reply-To: <4b6f054f0512250939v58e9e261p9d692e73d685c4@mail.gmail.com> References: <4b6f054f0512250939v58e9e261p9d692e73d685c4@mail.gmail.com> Message-ID: > On the Og implementation side though I do find it kind of interesting, > even a bit unexpected, of the way to do that, i.e. using a superclass > to create the union. But I guess it actually makes good sense. > > But why not call is union_inheritance instead? That seems more > intuitive. Perhaps evn better, would a mixin, or a superclass, be more > appropriate here? Eg. > > class Project > is Union > property :xmas, String > end > I do not fully understand what "is Union" does. Is Union my superclass? Do I have to say something like too? class ForeignProject is Union property :santa, String end Could I still query for all Projects and get both Foreign and Domestic? Do Foreign and Domestic share primary keys? > > class Project < Union > property :xmas, String > end Here again I do not understand what Union is. Is it a ruby class? Sorry, I am not an expert... > Also, what's the reason for the field names to be prefixed by 'og'? That is my bad... I was influenced by the naming of the tables, and thought for a moment that the column names were prefixed bye 'og' Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From epiperak at softlab.ece.ntua.gr Sun Dec 25 20:09:02 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Mon, 26 Dec 2005 03:09:02 +0200 (EET) Subject: [Nitro] password?! Message-ID: Hi all, has anybody experience the following: When the application starts, even though the password for the DB is provided in Og.setup, Og asks for the password in order to DROP or CREATE the DB. That is not a big issues in the case of running the app in development mode, but under lighttpd or other automatic way, where the user can not input the password, it causes a major problem... Any ideas? Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From vikingtux at gmail.com Mon Dec 26 00:48:14 2005 From: vikingtux at gmail.com (Alexandre Gravem) Date: Mon, 26 Dec 2005 03:48:14 -0200 Subject: [Nitro] Dispaying ruby vars in Nitro templates Message-ID: <40b05ebe0512252148m4df28743u44eea19d715cbadc@mail.gmail.com> I am not sure it is a Nitro question, if I am asking in the wrong place please forgive me! To learn Nitro I decided to set up a multi-user blog system based on the blog example provided. When checking on templates/view.xhtml I notice 3 ways to display the value of ruby vars: #{var}, #(var) and #|var| ... Firstly I thought the three worked same way, but when displaying text marked up with Textile the #{var} 'operator' showed the raw text while the #|var| transform it to HTML. My questions are: 1) How to use each correctly 2) There are others 'operators' like those? Again, I am sorry if I am asking in the wrong place! Gravem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051226/e246ab61/attachment.html From m.fellinger at gmail.com Mon Dec 26 02:19:48 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Mon, 26 Dec 2005 08:19:48 +0100 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: <40b05ebe0512251537o36661f12h3cadbd56c702e889@mail.gmail.com> References: <20051222195835.GA40127@lizzy.catnook.local> <40b05ebe0512251537o36661f12h3cadbd56c702e889@mail.gmail.com> Message-ID: <200512260819.54326.m.fellinger@gmail.com> Well... To tell you a bit about how i myself learned nitro/og. It was no straight way - for example i only used my PHP-style of doing things in Nitro first, without giving a crap about models/controllers, since nobody gave me a good example how they work and why i would want to use them. I had some experience in doing Web-stuff, the little examples gave me a glimpse of the features Nitro might provide me with, but with no actual idea how i utilize it there was no chance to do anything really productive with it. Eventually George released Spark/Flare - wich was a great breakthrough for me (and us all). I just took Spark and started modifying it (that is how rdog was integrated in Spark). The main-point is that there were lots of patient people who helped me along and provided me with new goals. The only way you can learn Nitro/Og at the moment is step-by-step. I don't think you can just set out and create what you want, you have to explore everything, find a way Nitro/Og integrates into your workflow and partially using more and more features it provides. For example i know that #{} #|| #() work together with different kinds of transformers, but don't ask me what they exactly are - i only use #{} and it works fine for me. Learning Nitro is a tendious work, you first code something wich is not DRY at all and doesn't use much dynamic code. I think Ysabel once said that Nitro is perfect for refactoring static pages. I have to agree on that. Nitro is all about refactoring! Nitro is all about choice! You may have heard these sentences before, in various kinds, however, that is what Nitro is all about - and Og helps the concept... letting you work as flexible as you probably ever will be working with a Database (we're not programming in 3d-models yet... :() - simply by treating them like every other Object in Ruby. You are probably going the best way when you first make a normal static page and slowly walk into more dynamic generation. For example a menu: First doing it static: next step would be to copy&paste it to every page - but when you're taking a closer look at how Flare works, you see a lot of little like tags in there, and guess what? They are helping you! :) So you outsource the menu into a seperate menu.xhtml and replace the real menu with the render-tag. Now, that saves us a lot of rewriting-work... right? But we could refactor the menu with some ruby... This might look a bit overkill at first, but imagine you want to add a target="_blank" to every menu-item... it will save you some work ;) and all it required was a little bit knowledge of Ruby and some digging in Code. Of course, since you might have seen the nitro-videos you may know about the Skin (Nitro::Element) and how to use it, wich makes even the tag redunant... but this is only a little example to show how i got into Nitro and wants so give you some confidence that nobody in here had an easy time doing/learning it all - in the end you are rewarded. Also, i want to encourage everyone who has questions about Nitro/Og to join us in the IRC-channel (irc.freenode.net #nitro) and asking these questions. People helped me to learn Nitro/Og, and for learning and digging the Framework for weeks i was rewarded by this wonderful community and a new Job :) In turn I want to help people, and the fastest way to do that in the IRC... However, thanks to all the guys/gals that helped me so far and special thanks to George/TRANS/Emmanuoil :) BTW, RDOG is making real progress, we've got the rdoc2og-generator ready! So i hope in the next few days we can present you with a real database-driven page for the documentation. thanks to the efforts of Vagabond! ~~~~manveru Am Montag, 26. Dezember 2005 00:37 schrieb Alexandre Gravem: > On 12/25/05, itsme213 wrote: > > > (Having actual working examples would be Really Nice. As it stands, the > > > threshold for learning to write Ruby web apps seems to be much lower > > > > with > > > > > Rails than Nitro. That's sad since Nitro appears to be technically > > > superior. > > > At this rate of progress I may have no other option than to get the > > > > Rails > > > > > book...) > > > > As I have done too. I'd rather use Nitro but it's so much harder getting > > started in its current form ... hope that changes in time. > > I will join the "Bad docs are getting people away from Nitro" choir! I > agree with everything that was said. I am trying hard to set up some > learning projects using Nitro but it's too hard without good documentation. > In my actual level there is little I can do for help!! -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051226/a31e2c79/attachment.bin From m.fellinger at gmail.com Mon Dec 26 04:20:51 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Mon, 26 Dec 2005 10:20:51 +0100 Subject: [Nitro] password?! In-Reply-To: References: Message-ID: <200512261020.56374.m.fellinger@gmail.com> Just wanted to place a notice that this problem was solved by doing following: http://www.postgresql.org/docs/8.1/interactive/libpq-pgpass.html Hope that helps someone who stumbles upon that problem... ~~~~manveru Am Montag, 26. Dezember 2005 02:09 schrieb Emmanuel Piperakis: > Hi all, > has anybody experience the following: > > When the application starts, even though the password for the DB is > provided in Og.setup, Og asks for the password in order to DROP or CREATE > the DB. That is not a big issues in the case of running the app in > development mode, but under lighttpd or other automatic way, where the > user can not input the password, it causes a major problem... > > Any ideas? > > Emmanouil Piperakis (epiperak at cs.ntua.gr) > {To explore is Human, to Create is Devine, > To teach is Primal, to Rule is Sin} > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051226/a7c31430/attachment.bin From george.moschovitis at gmail.com Mon Dec 26 05:31:55 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 26 Dec 2005 12:31:55 +0200 Subject: [Nitro] transaction exception logging In-Reply-To: <20051223145329.GB23021@localhost> References: <20051223145329.GB23021@localhost> Message-ID: Ok, will consider this, any other opinions? -g. On 12/23/05, Tim Larson wrote: > In og/lib/og/store.rb "def transaction", why is there all > that logging code present? It make it harder to find the > error location than a simple rollback and re-raising of > the exception would. Also it makes test case output for > expected failures be unnecessarily verbose and redundant, > and the lack of re-raising the exception makes it difficult > to test when and if the right exceptions are being raised > by the code being tested. > > I am recommending: > > def transaction(&block) > begin > start > yield(self) > commit > rescue => ex > #Logger.error 'Erro > #Logger.error ex > #Logger.error ex.ba > rollback > raise ex > end > end > > --Tim Larson > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Mon Dec 26 05:33:17 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 26 Dec 2005 12:33:17 +0200 Subject: [Nitro] [Flare] Not rendering tags correctly In-Reply-To: <40b05ebe0512231655s4bb0d7a6lea97805ecc7e0c71@mail.gmail.com> References: <40b05ebe0512231655s4bb0d7a6lea97805ecc7e0c71@mail.gmail.com> Message-ID: wrote: > Hello all, > I installed Flare as said in the README file. But the tags > aren't interpreted. If I change to it works fine. > Am I missing something? There is any adicional library to required? > > Alexandre Gravem > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Mon Dec 26 05:37:17 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 26 Dec 2005 12:37:17 +0200 Subject: [Nitro] 0.26.0 preview In-Reply-To: References: Message-ID: You are right, we will improve this, thanks for pointing this out! -g. > The generated pages all depend on SystemPage (nitro/src/part/admin/skin.rb) > and SystemPage depends on AdminPart (nitro/src/part/admin.rb) because of the > inline_css setting. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Mon Dec 26 05:38:08 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 26 Dec 2005 12:38:08 +0200 Subject: [Nitro] taggable demodulize In-Reply-To: <20051220181352.GL25600@localhost> References: <20051220181352.GL25600@localhost> Message-ID: thanks, will fix! -g. On 12/20/05, Tim Larson wrote: > In taggable.rb's method tag there needs to be a call > to demodulize to strip any module name off of the > field name to match how the rest of Og strips module > names before creating or refering to field names. > (Not sure if this is good, but at least it is consistent.) > > --Tim Larson > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Mon Dec 26 05:41:10 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 26 Dec 2005 12:41:10 +0200 Subject: [Nitro] examples-0.26: blog example doesn't work In-Reply-To: <40b05ebe0512242208wed2b9agb3e72987fa2147c8@mail.gmail.com> References: <20051222000030.GA73518@lizzy.catnook.local> <20051222013500.GB73518@lizzy.catnook.local> <40b05ebe0512242208wed2b9agb3e72987fa2147c8@mail.gmail.com> Message-ID: will fix in the repo version! -g. On 12/25/05, Alexandre Gravem wrote: > I have experienced that error too when posting comments! > > On 12/21/05, Jos Backus wrote: > > On Wed, Dec 21, 2005 at 04:23:12PM -0800, Bryan Soto wrote: > > > Hi, > > > > > > I ran into similar error messages, though on Linux. I believe it has to > do > > > with the version of MySql and the Ruby bindings to it. You might try > > > running: > > > > > > gem install mysql > > > > > > to get the C bindings. Those worked for me. They're also faster. > > > > > > They might be available via ports, though I don't know for sure. > > > > I installed the gem and that seems to work. Thanks! > > > > My next problem occurs when I try to add a comment. Log: > > > > E, [2005-12-21T17:32: 04.107682 #89161] ERROR -- : Error while handling > '/view/2'. > > E, [2005-12-21T17:32:04.108430 #89161] ERROR -- : undefined method > `create_time' for nil:NilClass > > src/template/view.xhtml:30:in `view_template' > > (eval):6:in `view_action' > > > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/controller.rb:88:in > `send' > > > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/controller.rb:88:in > `method_missing' > > /usr/local/lib/ruby/gems/1.8/gems/nitro- > 0.26.0/lib/nitro/render.rb:125:in `send' > > > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/render.rb:125:in > `render' > > > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/adapter/webrick.rb:145:in > `do_GET' > > > /usr/local/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in > `__send__' > > > /usr/local/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in > `service' > > /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in > `service' > > /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in > `run' > > /usr/local/lib/ruby/1.8/webrick/server.rb:155:in > `start_thread' > > /usr/local/lib/ruby/1.8/webrick/server.rb:144:in > `start' > > /usr/local/lib/ruby/1.8/webrick/server.rb:144:in > `start_thread' > > /usr/local/lib/ruby/1.8/webrick/server.rb:94:in `start' > > /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `each' > > /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `start' > > /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start' > > /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start' > > > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/adapter/webrick.rb:55:in > `start' > > > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/server/runner.rb:297:in > `invoke_server' > > > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/server/runner.rb:263:in > `invoke' > > > /usr/local/lib/ruby/gems/1.8/gems/nitro-0.26.0/lib/nitro/server.rb:124:in > `run' > > /usr/local/lib/ruby/gems/1.8/gems/nitro- > 0.26.0/lib/nitro.rb:73:in `run' > > run.rb:48 > > > > Do you see this too? > > > > -- > > Jos Backus > > jos at catnook.com > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Mon Dec 26 05:42:35 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 26 Dec 2005 12:42:35 +0200 Subject: [Nitro] transform_template -> block In-Reply-To: References: <20051212194746.GE25600@localhost> <20051212211819.GF25600@localhost> <20051213154029.GG25600@localhost> Message-ID: > the string was then unterminated. It is an consequence of the way > templates are built by Nitro, namely, turned into one big string with > ruby script text interspersed. It seems like a hack, in a bad way. not one big string, a series of @out << "..." instructions plus ruby code. This gets compiled as a method. why is this bad? -g. > > What would be a better way to build templates? > > Peter > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Mon Dec 26 05:47:06 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 26 Dec 2005 12:47:06 +0200 Subject: [Nitro] schema_inheritance In-Reply-To: <40b05ebe0512251522m2ee4d2eam1daa9b8cde75f3a@mail.gmail.com> References: <4b6f054f0512250939v58e9e261p9d692e73d685c4@mail.gmail.com> <40b05ebe0512251522m2ee4d2eam1daa9b8cde75f3a@mail.gmail.com> Message-ID: > I agree with the use of mixin ... the name Schema_Inheritance seems fine to > me! there is a mixin: is SchemaInheritanceBase have a look at og/markers -g. > > Gravem > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Mon Dec 26 05:49:37 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 26 Dec 2005 12:49:37 +0200 Subject: [Nitro] schema_inheritance In-Reply-To: <4b6f054f0512250939v58e9e261p9d692e73d685c4@mail.gmail.com> References: <4b6f054f0512250939v58e9e261p9d692e73d685c4@mail.gmail.com> Message-ID: > intuitive. Perhaps evn better, would a mixin, or a superclass, be more > appropriate here? Eg. use: is SchemaInheritanceBase perhaps we can improve the name. > Also, what's the reason for the field names to be prefixed by 'og'? this is configurable. I originally added the prefix because different rdbms have different reserved names, for example i think Oracle reserves 'name'. so if you used property :name without prefix you would have a problem. (perhaps you could use "name" instead of ogname, but I am not sure.) regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From humberaquino at gmail.com Mon Dec 26 14:55:37 2005 From: humberaquino at gmail.com (Humber Aquino) Date: Mon, 26 Dec 2005 16:55:37 -0300 Subject: [Nitro] fixtures not loaded in test database Message-ID: <37fd0c50512261155g5a61eb0bp169b31c546d94892@mail.gmail.com> Hi everyone!! I have a problem with the fixtures in unit testing.. #This is my model require 'og' class User property :name, String property :telephone, String property :username, String, :uniq => true property :password, String #This is the method that i'm trying to test def self.find_by_username_and_password(username, password) users = find :condition => "username = '#{username}' and password = '#{password}'" if users.nil? || users.size == 0 return nil else return users[0] end end end #The fixture user.yml user1: oid: 1 name: John Doe telephone: '132312' username: jduser password: jdpassword user2: oid: 2 name: Some person telephone: '11112' username: spuser password: sppassword #The test case require 'test/unit' require 'glue/fixture' require 'og/test' require 'src/model/user' class TestUsuario < Test::Unit::TestCase def setup @og = Og.setup( :destroy => true, :store => :mysql, :name => 'test_db', :user => 'webuser', :password => 'some_pass' ) og_fixture User end def test_all #There are 2 users in the fixture user.yml assert_equal 2, @users.size #But this assert fails. It looks that the fixture where loaded but not inserted #in the database, but the structure is always updated. assert_equal 2, User.count end def test_find_by_username_password #This call returns nil.. because it's not loaded in the database john_doe = User.find_by_username_and_password('jduser', 'jdpassword') end end I don't know if there's a configuration step missing or it's the way it works.. Is there any other alternative for testing the self.find_by_username_and_password(username, password) method but using the fixtures? This works with no problem in rails.. Thanks for your help Humber From humberaquino at gmail.com Mon Dec 26 14:58:08 2005 From: humberaquino at gmail.com (Humber Aquino) Date: Mon, 26 Dec 2005 16:58:08 -0300 Subject: [Nitro] fixtures not loaded in test database In-Reply-To: <37fd0c50512261155g5a61eb0bp169b31c546d94892@mail.gmail.com> References: <37fd0c50512261155g5a61eb0bp169b31c546d94892@mail.gmail.com> Message-ID: <37fd0c50512261158l60bb0a35s92102c503aefdfec@mail.gmail.com> This is the output of the test Loaded suite test/tc_users Started nil I, [2005-12-26T23:48:31.731922 #32057] INFO -- : Og uses the Mysql store. Database "test_db" dropped I, [2005-12-26T23:48:31.789497 #32057] INFO -- : Database 'test_db' not found! I, [2005-12-26T23:48:32.198497 #32057] INFO -- : Created table 'oguser'. Fnil I, [2005-12-26T23:48:32.227648 #32057] INFO -- : Og uses the Mysql store. Database "test_db" dropped I, [2005-12-26T23:48:32.253778 #32057] INFO -- : Database 'test_db' not found! /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/sql.rb:314: warning: already initialized constant OGTABLE I, [2005-12-26T23:48:32.326364 #32057] INFO -- : Created table 'oguser'. . Finished in 0.618061 seconds. 1) Failure: test_all(TestUsuario) [test/tc_users.rb:28]: <2> expected but was <0>. 2 tests, 2 assertions, 1 failures, 0 errors From vikingtux at gmail.com Mon Dec 26 17:26:54 2005 From: vikingtux at gmail.com (Alexandre Gravem) Date: Mon, 26 Dec 2005 20:26:54 -0200 Subject: [Nitro] [Flare] Not rendering tags correctly In-Reply-To: References: <40b05ebe0512231655s4bb0d7a6lea97805ecc7e0c71@mail.gmail.com> Message-ID: <40b05ebe0512261426p34390c0dy177e01305b04e43d@mail.gmail.com> I am using Nitro 0.26 but I guess the examples package was 0.25 ... the render tag worked fine in other mini-projects of mine. On 12/26/05, George Moschovitis wrote: > > > -g. > > > On 12/24/05, Alexandre Gravem wrote: > > Hello all, > > I installed Flare as said in the README file. But the > tags > > aren't interpreted. If I change to it works fine. > > Am I missing something? There is any adicional library to required? > > > > Alexandre Gravem > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > > > > > > > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051226/742a5db1/attachment.html From vikingtux at gmail.com Mon Dec 26 17:30:19 2005 From: vikingtux at gmail.com (Alexandre Gravem) Date: Mon, 26 Dec 2005 20:30:19 -0200 Subject: [Nitro] examples-0.26: blog example doesn't work In-Reply-To: References: <20051222000030.GA73518@lizzy.catnook.local> <20051222013500.GB73518@lizzy.catnook.local> <40b05ebe0512242208wed2b9agb3e72987fa2147c8@mail.gmail.com> Message-ID: <40b05ebe0512261430t20500a83nc88ee0a9870f9753@mail.gmail.com> The line 16 of comments.xhtml have perhaps change it to may solve the case! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051226/182e2ea7/attachment.html From vikingtux at gmail.com Mon Dec 26 18:43:25 2005 From: vikingtux at gmail.com (Alexandre Gravem) Date: Mon, 26 Dec 2005 21:43:25 -0200 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: <200512260819.54326.m.fellinger@gmail.com> References: <20051222195835.GA40127@lizzy.catnook.local> <40b05ebe0512251537o36661f12h3cadbd56c702e889@mail.gmail.com> <200512260819.54326.m.fellinger@gmail.com> Message-ID: <40b05ebe0512261543i74d14c7fud9927c1fb4b2ae7@mail.gmail.com> Hi Michael, Just today I decided to spend some time browsing the source files of Nitro. I notice a lot of FIXME in the code and actually I think I could help to fix some of them, so I think that I will submit some patches soon. I am learning Nitro by browsing the examples and now the source code. And getting good results, I still prefer Nitro over Rails, but when I have some question about Rails API it is rapidly solved looking through the wiki or rdoc page. With Nitro the questions may live longer! But I will join a new choir now, the "Stop joining choirs and help with docs" choir :p I have no experience writing rdoc, so I will post in the wiki the relevant results of my source files browsing! Moreover, learning Nitro may be harder than Rails, but it worth! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051226/8f58c43e/attachment.html From epiperak at softlab.ece.ntua.gr Mon Dec 26 20:23:55 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 27 Dec 2005 03:23:55 +0200 (EET) Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: <200512260819.54326.m.fellinger@gmail.com> References: <20051222195835.GA40127@lizzy.catnook.local> <40b05ebe0512251537o36661f12h3cadbd56c702e889@mail.gmail.com> <200512260819.54326.m.fellinger@gmail.com> Message-ID: > I think Ysabel once said that Nitro is > perfect for refactoring static pages. I have to agree on that. This reminds me of MacGyver: "My grandfather used to say..." hehehe We have reached the level where we quote people from the ML. We are "growing" and only sky is the limit!!! > > However, thanks to all the guys/gals that helped me so far and special thanks > to George/TRANS/Emmanuoil :) Emmanouil Piperakis (epiperak at cs.ntua.gr) ahh... when people will start spelling my name correctly! that will be the day ;-) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From epiperak at softlab.ece.ntua.gr Mon Dec 26 20:28:56 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 27 Dec 2005 03:28:56 +0200 (EET) Subject: [Nitro] password?! In-Reply-To: <200512261020.56374.m.fellinger@gmail.com> References: <200512261020.56374.m.fellinger@gmail.com> Message-ID: > Just wanted to place a notice that this problem was solved by doing following: > http://www.postgresql.org/docs/8.1/interactive/libpq-pgpass.html M, how does this solve the problem? It just cures the problem. Og did not use to ask for the password, but suddenly it started. That mean that is does not parse the Og.setup correctly or something. It gets the user of the db, which now with the .pgpass file compares and uses the password from that file. The real question is , why does not Og or the connection to the postgres use the password from the run.rb file? e.p. From epiperak at softlab.ece.ntua.gr Mon Dec 26 20:52:11 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 27 Dec 2005 03:52:11 +0200 (EET) Subject: [Nitro] schema_inheritance In-Reply-To: References: <4b6f054f0512250939v58e9e261p9d692e73d685c4@mail.gmail.com> Message-ID: > use: > > is SchemaInheritanceBase > > perhaps we can improve the name. G. the initial email I posted reported a bug in the 0.26, where when I use the schema_inheritance only the frist subclasss' fields are added to the superclass. That must be realy easy to fix, and it worked for 0.25 and it prevents me from upgrading. e.g class Project property :koko, String schema_inheritance end class FProject < Project property :haha, String end class DProject < Project property :kaka, String end ONLY :haha is added and NOT :kaka. I tried switching the order of the classes (first DProject and then FProject) and then only :kaka was added to the table and NOT :haha, therefore there a very simple problem. You only take one subclass... Could you please fix this? Thanx Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From transfire at gmail.com Mon Dec 26 23:51:03 2005 From: transfire at gmail.com (TRANS) Date: Mon, 26 Dec 2005 23:51:03 -0500 Subject: [Nitro] transform_template -> block In-Reply-To: References: <20051212194746.GE25600@localhost> <20051212211819.GF25600@localhost> <20051213154029.GG25600@localhost> Message-ID: <4b6f054f0512262051q4cab820dga971db26a9b81863@mail.gmail.com> On 12/24/05, Peter Abrahamsen wrote: > This points to what I think is something that needs a bit of > refactoring in Nitro, which is how Templates are generated. I started > looking at them when some javascript I put in a page, something like: > > alert("Booga Booga!\n"); > > failed because the \n was interpreted, not left as a literal as one > would expect in a template. This caused the javascript to fail, since > the string was then unterminated. It is an consequence of the way > templates are built by Nitro, namely, turned into one big string with > ruby script text interspersed. It seems like a hack, in a bad way. > > What would be a better way to build templates? So it converted the \n into a newline? Is it supposted to do that? Well, if so then I guess it needs to either allow for it's own form of escaping or see that the \n is between quotes and do it automatically. T. From vikingtux at gmail.com Mon Dec 26 23:56:34 2005 From: vikingtux at gmail.com (Alexandre Gravem) Date: Tue, 27 Dec 2005 02:56:34 -0200 Subject: [Nitro] My Blog Example Message-ID: <40b05ebe0512262056v22d19ba4g5f3fd554f80cfe1@mail.gmail.com> Hi, I have mentioned in an earlier email that I was working on an learning project inspired by the blog example provided with nitro. The project concists of a multi-user blog system with tags instead of cathegories. It is pretty stable and lacks of rss, traceback,mailing... what I think make simpler to begginners (like myself) to follow the code. I hope it helps someone! yours, Gravem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051226/784b8bc6/attachment.html From transfire at gmail.com Tue Dec 27 00:06:24 2005 From: transfire at gmail.com (TRANS) Date: Tue, 27 Dec 2005 00:06:24 -0500 Subject: [Nitro] My Blog Example In-Reply-To: <40b05ebe0512262056v22d19ba4g5f3fd554f80cfe1@mail.gmail.com> References: <40b05ebe0512262056v22d19ba4g5f3fd554f80cfe1@mail.gmail.com> Message-ID: <4b6f054f0512262106u59c4b9adib10d844381a7c9c8@mail.gmail.com> On 12/26/05, Alexandre Gravem wrote: > I have mentioned in an earlier email that I was working on an learning > project inspired by the blog example provided with nitro. The project > concists of a multi-user blog system with tags instead of cathegories. It is > pretty stable and lacks of rss, traceback,mailing... what I think make > simpler to begginners (like myself) to follow the code. > > I hope it helps someone! Is there a link to it? T. From vikingtux at gmail.com Tue Dec 27 00:20:13 2005 From: vikingtux at gmail.com (Alexandre Gravem) Date: Tue, 27 Dec 2005 03:20:13 -0200 Subject: [Nitro] My Blog Example In-Reply-To: <4b6f054f0512262106u59c4b9adib10d844381a7c9c8@mail.gmail.com> References: <40b05ebe0512262056v22d19ba4g5f3fd554f80cfe1@mail.gmail.com> <4b6f054f0512262106u59c4b9adib10d844381a7c9c8@mail.gmail.com> Message-ID: <40b05ebe0512262120n4afd5123n6908dc06ec995fb@mail.gmail.com> Ops ... I forgot to attach the file -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051227/3eabd6a2/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: MultiBlog.tar.gz Type: application/x-gzip Size: 73679 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051227/3eabd6a2/attachment.gz From george.moschovitis at gmail.com Tue Dec 27 03:22:07 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 27 Dec 2005 10:22:07 +0200 Subject: [Nitro] fixtures not loaded in test database In-Reply-To: <37fd0c50512261158l60bb0a35s92102c503aefdfec@mail.gmail.com> References: <37fd0c50512261155g5a61eb0bp169b31c546d94892@mail.gmail.com> <37fd0c50512261158l60bb0a35s92102c503aefdfec@mail.gmail.com> Message-ID: Havent used fixtures for some time, will have a look at this... -g. On 12/26/05, Humber Aquino wrote: > This is the output of the test > > Loaded suite test/tc_users > Started > nil > I, [2005-12-26T23:48:31.731922 #32057] INFO -- : Og uses the Mysql store. > Database "test_db" dropped > I, [2005-12-26T23:48:31.789497 #32057] INFO -- : Database 'test_db' not found! > I, [2005-12-26T23:48:32.198497 #32057] INFO -- : Created table 'oguser'. > Fnil > I, [2005-12-26T23:48:32.227648 #32057] INFO -- : Og uses the Mysql store. > Database "test_db" dropped > I, [2005-12-26T23:48:32.253778 #32057] INFO -- : Database 'test_db' not found! > /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/sql.rb:314: > warning: already initialized constant OGTABLE > I, [2005-12-26T23:48:32.326364 #32057] INFO -- : Created table 'oguser'. > . > Finished in 0.618061 seconds. > > 1) Failure: > test_all(TestUsuario) [test/tc_users.rb:28]: > <2> expected but was > <0>. > > 2 tests, 2 assertions, 1 failures, 0 errors > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue Dec 27 03:33:36 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 27 Dec 2005 10:33:36 +0200 Subject: [Nitro] My Blog Example In-Reply-To: <40b05ebe0512262120n4afd5123n6908dc06ec995fb@mail.gmail.com> References: <40b05ebe0512262056v22d19ba4g5f3fd554f80cfe1@mail.gmail.com> <4b6f054f0512262106u59c4b9adib10d844381a7c9c8@mail.gmail.com> <40b05ebe0512262120n4afd5123n6908dc06ec995fb@mail.gmail.com> Message-ID: Nice effortr, thanks for releasing... -g. On 12/27/05, Alexandre Gravem wrote: > Ops ... I forgot to attach the file > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue Dec 27 03:34:10 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 27 Dec 2005 10:34:10 +0200 Subject: [Nitro] [Flare] Not rendering tags correctly In-Reply-To: <40b05ebe0512261426p34390c0dy177e01305b04e43d@mail.gmail.com> References: <40b05ebe0512231655s4bb0d7a6lea97805ecc7e0c71@mail.gmail.com> <40b05ebe0512261426p34390c0dy177e01305b04e43d@mail.gmail.com> Message-ID: > I am using Nitro 0.26 but I guess the examples package was 0.25 ... the > render tag worked fine in other mini-projects of mine. than explains it ;-) -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue Dec 27 03:35:41 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 27 Dec 2005 10:35:41 +0200 Subject: [Nitro] Problem with Nitro In Flames tutorial In-Reply-To: <40b05ebe0512261543i74d14c7fud9927c1fb4b2ae7@mail.gmail.com> References: <20051222195835.GA40127@lizzy.catnook.local> <40b05ebe0512251537o36661f12h3cadbd56c702e889@mail.gmail.com> <200512260819.54326.m.fellinger@gmail.com> <40b05ebe0512261543i74d14c7fud9927c1fb4b2ae7@mail.gmail.com> Message-ID: > I notice a lot of FIXME in the code and actually I think I could help to fix > some of them, so I think that I will submit some patches soon. Thanks Alexandre, many developers have started submitting patches lately, and thus the quality of our code is improving daily. I can't wait to see your contributions ;-) regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue Dec 27 03:36:32 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 27 Dec 2005 10:36:32 +0200 Subject: [Nitro] schema_inheritance In-Reply-To: References: <4b6f054f0512250939v58e9e261p9d692e73d685c4@mail.gmail.com> Message-ID: > Could you please fix this? Yes ;-) -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From rainhead at gmail.com Tue Dec 27 16:13:14 2005 From: rainhead at gmail.com (Peter Abrahamsen) Date: Tue, 27 Dec 2005 13:13:14 -0800 Subject: [Nitro] transform_template -> block In-Reply-To: <4b6f054f0512262051q4cab820dga971db26a9b81863@mail.gmail.com> References: <20051212194746.GE25600@localhost> <20051212211819.GF25600@localhost> <20051213154029.GG25600@localhost> <4b6f054f0512262051q4cab820dga971db26a9b81863@mail.gmail.com> Message-ID: <095564D5-9EFC-4A26-925F-6EB900F5A462@gmail.com> It does, and it shouldn't. One expects everything in a text file to be taken literally, including (real) newlines and backslashes, save the things that are explicitly not literal. Adding another form of escaping is not acceptable, as it adds complexity with no benefit to the user. This should not be hard to do cleanly. While I'm at it, there are probably too many ways of embedding ruby in templates, but that's not a fight I care much about. P On Dec 26, 2005, at 8:51 PM, TRANS wrote: > So it converted the \n into a newline? Is it supposted to do that? > Well, if so then I guess it needs to either allow for it's own form of > escaping or see that the \n is between quotes and do it automatically. From bryan.a.soto at gmail.com Tue Dec 27 16:16:02 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Tue, 27 Dec 2005 13:16:02 -0800 Subject: [Nitro] Has anyone else been missing emails from the mailing list? In-Reply-To: <12BE073B-64C9-4F94-AF98-1999C9FB966A@motionpath.com> References: <12BE073B-64C9-4F94-AF98-1999C9FB966A@motionpath.com> Message-ID: Yes, Tom Copeland of Rubyforge successfully negotiated an agreement to get the mailing list flowing again. ;) On 12/24/05, Chris Farmiloe wrote: > > woohoo looks like the epostmen arn't on strike anymore ...backlog of > messages!.... thought the list was quiet! > > *reads* > > > On 21 Dec 2005, at 20:18, Bryan Soto wrote: > > So far I've missed: > > George's three requests for a resend on my validation key patch (Sorry > George), > Nitro/Og 0.26.0 Announcement, > James Britt's undefined method 'is' in session, but have Michael's follow > up, > Tim Larson's Taggable demodulize, > and an email each from Nitro Screencasts and Using Nitro::Controller as > main. > > Using gmail. > List archives at > http://rubyforge.org/pipermail/nitro-general/2005-December/thread.html. > > I don't use filters and my spam and trash are empty, so I'm somewhat > confused... > > Thanks for any help, > > bryan > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051227/6741380f/attachment.html From rainhead at gmail.com Tue Dec 27 16:37:38 2005 From: rainhead at gmail.com (Peter Abrahamsen) Date: Tue, 27 Dec 2005 13:37:38 -0800 Subject: [Nitro] transform_template -> block In-Reply-To: References: <20051212194746.GE25600@localhost> <20051212211819.GF25600@localhost> <20051213154029.GG25600@localhost> Message-ID: > not one big string, a series of > > @out << "..." > > instructions plus ruby code. Right, but it's actually a string that looks like: "@out << #{the template text}" Somehow in creating that final string, literal newlines in the template text are turned into \n's, but existing \n's are not given a further level of escapes. When the string is prepared to be given to the UA, there is no differentiation between the original newlines and the escaped ones--both are simple \n's. The stopgap solution is to escape \'s just before the return instruction, after all the template transforms. I think that'd work for my purposes, but I don't know what kind of havoc it'd wreak on embedded ruby. > This gets compiled as a method. > why is this bad? See my reply to TRANS. I have a little more time now, post-Christmas, so I'll look some more at this--and at the exciting new javascript stuff :) P From epiperak at softlab.ece.ntua.gr Tue Dec 27 20:27:49 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Wed, 28 Dec 2005 03:27:49 +0200 (EET) Subject: [Nitro] schema_inheritance In-Reply-To: References: <4b6f054f0512250939v58e9e261p9d692e73d685c4@mail.gmail.com> Message-ID: >> Could you please fix this? > > Yes ;-) > Ohhh Dev Leader, My Dev Leader (Dead Poets' Society) > -g. > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From humberaquino at gmail.com Wed Dec 28 08:02:01 2005 From: humberaquino at gmail.com (Humber Aquino) Date: Wed, 28 Dec 2005 10:02:01 -0300 Subject: [Nitro] fixtures not loaded in test database In-Reply-To: References: <37fd0c50512261155g5a61eb0bp169b31c546d94892@mail.gmail.com> <37fd0c50512261158l60bb0a35s92102c503aefdfec@mail.gmail.com> Message-ID: <37fd0c50512280502v38a42372yb004f645891b0491@mail.gmail.com> I figure it out G! When i assign an oid to mi fixture, it's updated rather than inserted, and when you do that in mysql, nothing happens. #The fixture that creates an update sql user1: oid: 1 name: John Doe telephone: '132312' username: jduser password: jdpassword #The fixture that creates an insert statement. Whitout the 'oid: 1' line user1: name: John Doe telephone: '132312' username: jduser password: jdpassword I asign an oid because, in my real app, i have a has_many relationship whit a class named Role. class user ... has_many :roles, Role ... end class Role ... belongs_to :user, User ... end So in the role.yml, i assign an user_oid to a role so that role belongs to a given user with that oid(Sorry for my english, it's quite bad +) ). role1: user_oid: 1 .... The solution to the issue is know that the user fixtures will be loaded in a secuential order and each oid depends of that order. If someone tries to assign an oid, it will not be loaded, at least on mysql(4.0.20)... This is the sql statement generated by og when the oid is manualy assigned UPDATE oguser SET name='John Doe', telephone='132312', username='jduser', password='jdpassword' WHERE oid=1 if i execute this statement in any mysql client i get this: mysql> UPDATE oguser SET name='John Doe', telephone='132312', username='jduser', password='jdpassword' WHERE oid=1; Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 Humber From george.moschovitis at gmail.com Wed Dec 28 08:38:55 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 28 Dec 2005 15:38:55 +0200 Subject: [Nitro] Nitro Screencast: Web 2.0, Flickr ignited Message-ID: Dear devs, as the first two videos were well received, I decided to make on more: http://www.nitrohq.com/videos/nitro4.html This time some sophisticated Web2.0 features of the Nitro framework are demonstrated. The demo is based on the concept of a similar Rails screencast (the flickr video). However, please note: - no generator is used. - ajax code and templates are cleanly separated. - standard html tags are naturally extended to support client side actions using Nitro's powerful morphing technology. - Draggable and autocomplete effects as well as the programmatic render are also demonstrated. This is a simple demo, and does not demonstrate the full power of Nitro. To feel the magic give it a try yourself: gem install nitro For more information browse: www.nitrohq.com or join the Nitro mailing list. enjoy, George. -- http://www.nitrohq.com http://www.gmosx.com http://www.navel.gr From humberaquino at gmail.com Wed Dec 28 09:50:01 2005 From: humberaquino at gmail.com (Humber Aquino) Date: Wed, 28 Dec 2005 11:50:01 -0300 Subject: [Nitro] Posible belongs_to problem/bug Message-ID: <37fd0c50512280650h113ec744m59bdccd9190e8697@mail.gmail.com> I think this can be a bug, please follow mi explanation and don't get bored! +) I'll wil show a common use of a has_many - belongs_to relationship class User property :name, String property :telephone, String property :username, String, :uniq => true property :password, String #roles: plural of Role has_many :roles, Role end class Role property :permissions, String #When og maps this class it will create a column named user_oid belongs_to :user, User end #User fixture user.yml user1: name: John Doe telephone: '132312' username: jduser password: jdpassword user2: name: Some person telephone: '13d2312' username: spuser password: sppassword #Role fixture role.yml role1: user_oid: 1 permmisions: something role2: user_oid: 1 permmisions: something else #So when whe test this we have no problems ;-) class TestUsuario < Test::Unit::TestCase def setup @og = Og.setup( :destroy => true, :store => :mysql, #4.0.20 :name => 'test_db', :user => 'webuser', :password => '******' ) og_fixture User og_fixture Role end def test_roles assert_equal 2, @user1.roles.size end end I run the test an i get this: 1 tests, 1 assertions, 0 failures, 0 errors :-) Sorry for the verbosity Then i change the name of the role property in my User class has_many :roles, Role -> has_many :roles_i_love, Role And in the test case def test_roles assert_equal 2, @user1.roles_i_love.size end I run the test.... again :D 1 tests, 1 assertions, 0 failures, 0 errors Great! Now i change the name of the property user in the role class belongs_to :user, User -> belongs_to :user_owner, User I run the test.... again :D and: E, [2005-12-28T18:54:58.992435 #10695] ERROR -- : DB error Unknown column 'user_oid' in 'where clause', [SELECT COUNT(*) FROM ogrole WHERE user_oid = 1] E, [2005-12-28T18:54:58.994148 #10695] ERROR -- : /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/mysql.rb:181:in `query' /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/mysql.rb:181:in `query' /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/sql.rb:476:in `count' /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/entity.rb:166:in `count' (eval):47:in `count_roles_i_love' /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/collection.rb:212:in `size' test/tc_users.rb:26:in `test_roles' /usr/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' /usr/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' /usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' /usr/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' /usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' /usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in `run_suite' /usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in `start_mediator' /usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `start' /usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in `run' /usr/lib/ruby/1.8/test/unit/autorunner.rb:200:in `run' /usr/lib/ruby/1.8/test/unit/autorunner.rb:13:in `run' /usr/lib/ruby/1.8/test/unit.rb:285 test/tc_users.rb:25 /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/sql.rb:822:in `handle_sql_exception': Og::StoreException (Og::StoreException) from /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/mysql.rb:183:in `query' from /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/sql.rb:476:in `count' from /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/entity.rb:166:in `count' from (eval):47:in `count_roles_i_love' from /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/collection.rb:212:in `size' from test/tc_users.rb:26:in `test_roles' from /usr/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' from /usr/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' ... 7 levels... from /usr/lib/ruby/1.8/test/unit/autorunner.rb:200:in `run' from /usr/lib/ruby/1.8/test/unit/autorunner.rb:13:in `run' from /usr/lib/ruby/1.8/test/unit.rb:285 from test/tc_users.rb:25 It executes this sql: SELECT COUNT(*) FROM ogrole WHERE user_oid = 1 Look at the where clause, it is user_oid and not user_owner_oid This is the description of the table generated by og mysql> desc ogrole; +----------------+---------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------+---------+------+-----+---------+----------------+ | permissions | text | YES | | NULL | | | user_owner_oid | int(11) | YES | | NULL | | | oid | int(11) | | PRI | NULL | auto_increment | +----------------+---------+------+-----+---------+----------------+ 3 rows in set (0.00 sec) The mapping is correct but the query is not.. Is this a bug or i'm missing something? I know that this problem can be solved jos changing the property user_owner back to user, but what can i do when i have 2 has_many relationships from User to Role for example.. class User .... has_many :roles_he_like, Role has_many :roles_he_doesnt_like, Role .... end class Role belongs_to :user, User has_one :user_doesnt_like, User end And make this test def test_roles assert_equal 2, @user1.roles_he_like.size #has_many - belongs_to relationship assert_equal 0, @user1.roles_he_doesnt_like.size #has_many - has_one relationship end #In mysql desc ogrole; +----------------------+---------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------------+---------+------+-----+---------+----------------+ | permissions | text | YES | | NULL | | | user_oid | int(11) | YES | | NULL | | | user_doesnt_like_oid | int(11) | YES | | NULL | | | oid | int(11) | | PRI | NULL | auto_increment | +----------------------+---------+------+-----+---------+----------------+ 4 rows in set (0.00 sec) And the result of the test: 1) Failure: test_roles(TestUsuario) [test/tc_users.rb:27]: <0> expected but was <2>. 1 tests, 2 assertions, 1 failures, 0 errors This is because it makes this sql query for @user1.roles_he_doesnt_like.size SELECT COUNT(*) FROM ogrole WHERE user_oid = 1 and not SELECT COUNT(*) FROM ogrole WHERE user_doesnt_like_oid = 1 Sorry for this long long long mail ;-> Humber From george.moschovitis at gmail.com Wed Dec 28 10:04:41 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 28 Dec 2005 17:04:41 +0200 Subject: [Nitro] Posible belongs_to problem/bug In-Reply-To: <37fd0c50512280650h113ec744m59bdccd9190e8697@mail.gmail.com> References: <37fd0c50512280650h113ec744m59bdccd9190e8697@mail.gmail.com> Message-ID: humb, thans for the post, I will investigate this and all bug reports of the last week in the following days in order to prepare a bug-fix release (0.27.0) -g. On 12/28/05, Humber Aquino wrote: > I think this can be a bug, please follow mi explanation and don't get bored! +) > > I'll wil show a common use of a has_many - belongs_to relationship > > class User > property :name, String > property :telephone, String > property :username, String, :uniq => true > property :password, String > > #roles: plural of Role > has_many :roles, Role > end > > class Role > property :permissions, String > > #When og maps this class it will create a column named user_oid > belongs_to :user, User > end > > #User fixture user.yml > user1: > name: John Doe > telephone: '132312' > username: jduser > password: jdpassword > user2: > name: Some person > telephone: '13d2312' > username: spuser > password: sppassword > > #Role fixture role.yml > role1: > user_oid: 1 > permmisions: something > role2: > user_oid: 1 > permmisions: something else > > #So when whe test this we have no problems ;-) > > class TestUsuario < Test::Unit::TestCase > def setup > @og = Og.setup( > :destroy => true, > :store => :mysql, #4.0.20 > :name => 'test_db', > :user => 'webuser', > :password => '******' > ) > og_fixture User > og_fixture Role > end > > def test_roles > assert_equal 2, @user1.roles.size > end > end > > I run the test an i get this: > 1 tests, 1 assertions, 0 failures, 0 errors > > :-) Sorry for the verbosity > > Then i change the name of the role property in my User class > has_many :roles, Role -> has_many :roles_i_love, Role > > And in the test case > > def test_roles > assert_equal 2, @user1.roles_i_love.size > end > > I run the test.... again :D > 1 tests, 1 assertions, 0 failures, 0 errors > Great! > > Now i change the name of the property user in the role class > belongs_to :user, User -> belongs_to :user_owner, User > > I run the test.... again :D and: > E, [2005-12-28T18:54:58.992435 #10695] ERROR -- : DB error Unknown > column 'user_oid' in 'where clause', [SELECT COUNT(*) FROM ogrole > WHERE user_oid = 1] > E, [2005-12-28T18:54:58.994148 #10695] ERROR -- : > /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/mysql.rb:181:in > `query' > /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/mysql.rb:181:in `query' > /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/sql.rb:476:in `count' > /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/entity.rb:166:in `count' > (eval):47:in `count_roles_i_love' > /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/collection.rb:212:in `size' > test/tc_users.rb:26:in `test_roles' > /usr/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' > /usr/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > /usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > /usr/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > /usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run' > /usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in `run_suite' > /usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in `start_mediator' > /usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `start' > /usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in `run' > /usr/lib/ruby/1.8/test/unit/autorunner.rb:200:in `run' > /usr/lib/ruby/1.8/test/unit/autorunner.rb:13:in `run' > /usr/lib/ruby/1.8/test/unit.rb:285 > test/tc_users.rb:25 > /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/sql.rb:822:in > `handle_sql_exception': Og::StoreException (Og::StoreException) > from /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/mysql.rb:183:in > `query' > from /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/store/sql.rb:476:in > `count' > from /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/entity.rb:166:in > `count' > from (eval):47:in `count_roles_i_love' > from /usr/lib/ruby/gems/1.8/gems/og-0.26.0/lib/og/collection.rb:212:in > `size' > from test/tc_users.rb:26:in `test_roles' > from /usr/lib/ruby/1.8/test/unit/testcase.rb:70:in `run' > from /usr/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run' > ... 7 levels... > from /usr/lib/ruby/1.8/test/unit/autorunner.rb:200:in `run' > from /usr/lib/ruby/1.8/test/unit/autorunner.rb:13:in `run' > from /usr/lib/ruby/1.8/test/unit.rb:285 > from test/tc_users.rb:25 > > It executes this sql: > SELECT COUNT(*) FROM ogrole WHERE user_oid = 1 > > Look at the where clause, it is user_oid and not user_owner_oid > > This is the description of the table generated by og > mysql> desc ogrole; > +----------------+---------+------+-----+---------+----------------+ > | Field | Type | Null | Key | Default | Extra | > +----------------+---------+------+-----+---------+----------------+ > | permissions | text | YES | | NULL | | > | user_owner_oid | int(11) | YES | | NULL | | > | oid | int(11) | | PRI | NULL | > auto_increment | > +----------------+---------+------+-----+---------+----------------+ > 3 rows in set (0.00 sec) > > The mapping is correct but the query is not.. > > Is this a bug or i'm missing something? > > I know that this problem can be solved jos changing the property > user_owner back to user, but what can i do when i have 2 has_many > relationships from User to Role for example.. > > class User > .... > has_many :roles_he_like, Role > has_many :roles_he_doesnt_like, Role > .... > end > > class Role > belongs_to :user, User > has_one :user_doesnt_like, User > end > > And make this test > def test_roles > assert_equal 2, @user1.roles_he_like.size #has_many - belongs_to > relationship > assert_equal 0, @user1.roles_he_doesnt_like.size #has_many - > has_one relationship > end > #In mysql > desc ogrole; > +----------------------+---------+------+-----+---------+----------------+ > | Field | Type | Null | Key | Default > | Extra | > +----------------------+---------+------+-----+---------+----------------+ > | permissions | text | YES | | NULL | > | > | user_oid | int(11) | YES | | NULL | > | > | user_doesnt_like_oid | int(11) | YES | | NULL | | > | oid | int(11) | | PRI | NULL > | auto_increment | > +----------------------+---------+------+-----+---------+----------------+ > 4 rows in set (0.00 sec) > > And the result of the test: > 1) Failure: > test_roles(TestUsuario) [test/tc_users.rb:27]: > <0> expected but was > <2>. > > 1 tests, 2 assertions, 1 failures, 0 errors > > This is because it makes this sql query for @user1.roles_he_doesnt_like.size > SELECT COUNT(*) FROM ogrole WHERE user_oid = 1 > and not > SELECT COUNT(*) FROM ogrole WHERE user_doesnt_like_oid = 1 > > Sorry for this long long long mail ;-> > > Humber > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From tim at keow.org Wed Dec 28 10:23:31 2005 From: tim at keow.org (Tim Larson) Date: Wed, 28 Dec 2005 15:23:31 +0000 Subject: [Nitro] AdminController Message-ID: <20051228152331.GC20090@localhost> When using the AdminController (tested with both 0.26.0 and glycerin) the scaffolding for all the enchanted classes gets rebuilt on every page request. I have not had time to look for the cause, but I thought I should at least report the effect in case someone else gets a chance to look at it :) In my case this makes the admin pages unusable, since I have 28 enchanted classes and growing and each page load takes about 30 seconds to a minute. --Tim Larson From m.fellinger at gmail.com Wed Dec 28 14:26:37 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Wed, 28 Dec 2005 20:26:37 +0100 Subject: [Nitro] The status of Nitro/Og - some personal thoughts In-Reply-To: <20051228152331.GC20090@localhost> References: <20051228152331.GC20090@localhost> Message-ID: <200512282026.41151.m.fellinger@gmail.com> Hey List, I've experienced a bunch of problems while working on OgFile/OgImage/Thumbnail for Og... mainly, because there is no documentation on the way the things are supposed to behave - luckily POLS (Principle Of Least Surprise) hurried to my resuce at most times... but there are some parts that need some thinking over... Ok, basically i would like to plead to everyone to get back to the roots. I don't want to know what exactly an Og-Object does, i don't want to take care about the fact that it's a Database under the clothes... But it's being hard to forget about it, differences between the stores are one of the main-problems, while you're mainly secured from bugs in psql (when you don't do too fancy stuff) mysql and kirbybase are really left behind - also sqlite has some drawbacks. Now, i don't think we're perfect yet, and i cannot really complain since i'm no db-guy and cannot work on the adapters without breaking everything... :( but Og is supposed to work the same way on every store, i see there are some limitations, especially with KirbyBase and i respect the work that has been put into every single adapter so far, it's only that i cannot get rid of the feeling that i write my code for only one adapter - losing one main-feature of Og... :| that gets me down to the ground very much about the limitations of Nitro/Og. Now, i still haven't quit complaining, i know - but that is one point i cannot put enough weight on, and one of the main-reasons we're losing users. (a fact that everyone here should have noticed already) I cannot go out on the street and preach Nitro/Og when i'm not comfortable with it myself. My opinion on Nitro is another one, i think it's quite mature now, still has some downs but overall it has more energy in it than every other framework i know. To me it looks like a raw gem, waiting to be polished and get some neat facets :) One of these facets is the new javascript-helper - never has javascript been that easy (correct me when i'm wrong) and tailored to your application! The Videos are really pointing out the beauty and simplicity of Nitro - a really big thank you to george and all of the other guys who worked with him. But there are still some minefields in Nitro - things that we pros seldom think about - stuff like nitrogen-bugs, missing tutorials (i really have to update nitro-in-flames), lacking documentation, unreasonable defaults or missing options, no explanation of the transformers and things like that... It makes getting started a worthwhile, but hard procedure and according to almost every company out there, time is money - no time to learn nitro, more money to earn with rails. I'm trying to help on that with RDOG, and there are some ideas around to make a source-editing-wiki as a fork of spark to get an easy way to edit comments/code of nitro/og/glue and the examples - also there was an idea about including some tutorials in the tests, to make sure we're notified if something breaks and can correct it. I've been a bit disappointed by the development in the past few months - but i'm willing to forgive everyone because i know that it's hard to find time to work on everything... i, myself have only little time and my contribution to nitro was more in manners of working with the community... trying to find new ideas and bringing some interesting approaches into the game. Ok, this has almost become a summary of all my experience with Nitro/Og, please don't think that i want to get you all down, i enjoy my work with nitro, i get along with Og, and i have lots of good experiences with it. Take it more like a kind of status of Nitro/Og, because the thing we lack most, is a larger community - the project has grown, but where are the people? We're visited almost everyday by new users, they try nitro and ditch it, mostly for reasons that could be easily fixed but are a pain for everyone who wants to learn much in the little time one has. So take this as a call to the weapons, we need more quality, tests, and maybe even some documentation :) This is a call to everyone who finds one of these small stones that make newbies or even pros stumble, put it somewhere in the wiki, mail it, put it into the rubyforge-tracker, send a bugfix - every little effort is well appreciated and needed. Sorry, i didn't plan that mail to become that long... but i had to say that. ~~~~manveru -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051228/eb45f157/attachment.bin From jerrett at bravenet.com Wed Dec 28 16:57:26 2005 From: jerrett at bravenet.com (Jerrett Taylor) Date: Wed, 28 Dec 2005 13:57:26 -0800 Subject: [Nitro] The status of Nitro/Og - some personal thoughts Message-ID: <1135807046.12257.25.camel@wintermute> My two cents - Nitro needs API documentation. Peroid. Developers need to have a reference to have at hand, that lets them see what the API they are using does and how it works. My guess is that people coming and leaving is largely due to this. People see examples, read an article that examples what's possible with nitro, they get excited, they start reading more, and a lot of them hit the brick wall of "If I am doing what these examples are doing, i can figure it out. but what else can I do, and how?" - and poof, they are off. Perhaps people are also leaving because of bugs and/or missing functionality, but if a large percentage is leaving before they encounter these things - people that might be willing to contribute might be leaving too. Obviously there are hobbiests who will take the time to dig in the source code and figure out what does what, but I'd wonder if even they know what can all be done. How do they know that they aren't writing code to accomplish something that the API already does, if only they knew the method to call? That said, I think Nitro does look very nice. If I ever get enough free time I may poke at the source code, or wait until there are docs... whichever comes first. As a slightly side-note: I don't think an API/Wiki is the answer. I think annotated API docs are good, and wikis are good - there should be both - link them together if need be.. but don't replace one with the other. From james_b at neurogami.com Wed Dec 28 17:57:06 2005 From: james_b at neurogami.com (James Britt) Date: Wed, 28 Dec 2005 15:57:06 -0700 Subject: [Nitro] The status of Nitro/Og - some personal thoughts In-Reply-To: <200512282026.41151.m.fellinger@gmail.com> References: <20051228152331.GC20090@localhost> <200512282026.41151.m.fellinger@gmail.com> Message-ID: <43B31842.2060008@neurogami.com> Michael Fellinger wrote: > Hey List, > > I've experienced a bunch of problems while working on OgFile/OgImage/Thumbnail > for Og... > mainly, because there is no documentation on the way the things are supposed > to behave - luckily POLS (Principle Of Least Surprise) hurried to my resuce > at most times... but there are some parts that need some thinking over... At one point I was gung ho on trying out Nitro/Og and doing what I could to contribute documentation. But the API was in consant flux. By the time I get something down, it changed. Worse, code updates seem to keep breaking old code. Each release brings some new headache. CGI stops working. Library path names get changed so the app explodes. Example code doesn't work. I managed, after much tedium, to get my code running with 0.26. I had to remove all previous versions, including all the side libs, such as glue and nano (or whatever it's called now), and start from scratch. It's hard to complain about free, open software, and several times I've written up rants, then thought twice and deleted instead of sending them. But maybe it's of some value to understand why people might just decide to say "Screw it", and go put up with the complexity of Rails. Annoying as it is, if you just bite the bullet and do things The One True Rails Way you at least get the app done. (Ironically, there seems to be a strong streak of what some folks claim to be The Python Philosophy.) I don't look forward to having to lock each app I write to a specific version of Nitro, nor do I want to have to crawl through the code on each update, doing a search and replace on new or missing constants, paths, and APIs. I'm at the point where I'll just roll my own simple framework as I need it, and probably just use Og for persistence, and hope not too much breaks each time a new version comes out, or skip upgrades once I find a suitable feature set. James -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From thoraval.yvon at free.fr Wed Dec 28 18:02:52 2005 From: thoraval.yvon at free.fr (Yvon Thoraval) Date: Thu, 29 Dec 2005 00:02:52 +0100 Subject: [Nitro] [Newbie]Nitro examples/[blog|why_wiki] Message-ID: <45A8F1E2-B754-4EB2-8353-98A3D71409BB@free.fr> Hey all, i'm doing some first step experiment with nitro and i'm really impressed ! however i get errors with examples/[blog|why_wiki], the most interesting to me )) for blog i get : [0m~/work/Ruby/Nitro/examples/blog> ruby run.rb D, [2005-12-28T23:57:05.333805 #6461] DEBUG -- : Using memory sessions. nil I, [2005-12-28T23:57:06.014622 #6461] INFO -- : Og uses the Mysql store. D, [2005-12-28T23:57:06.145796 #6461] DEBUG -- : Og manageable classes: [Comment, Entry] /opt/local/lib/ruby/gems/1.8/gems/glue-0.26.0/lib/glue/ configuration.rb:64:in `setup': undefined method `value=' for nil:NilClass (NoMethodError) from /opt/local/lib/ruby/gems/1.8/gems/glue-0.26.0/lib/glue/ configuration.rb:63:in `each' (i had to add "manually" in the table ogcomment 'update_time datetime', 'access_time datetime' and entry_oid integer') is something to do in "glue/configuration.rb" ??? for why_wiki i get : [0m~/work/Ruby/Nitro/examples/why_wiki> ruby run.rb /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:149:in `activate': can't activate RedCloth (= 3.0.3), already activated RedCloth-3.0.4] (Gem::Exception) thus that means i would have to uninstall RedCloth 3.0.4 and make use of 3.0.3 ? in case you have some light !!! best, Yvon From kashia at vfemail.net Wed Dec 28 18:31:24 2005 From: kashia at vfemail.net (Kashia Buch) Date: Thu, 29 Dec 2005 00:31:24 +0100 Subject: [Nitro] SchemaInheritance and Foreign Keys Message-ID: Hi, I think I found a bug with schema inheritance and foreign key handling. A small example: (hope it doesn't get mangled up too much by my email client) # Class File class File is Og::SchemaInheritanceBase property :title, String belongs_to Container belongs_to CD end # end class File # Class VideoFile class VideoFile < File has_one :videofiletype, FileType has_one :quality, FileQuality end # end class VideoFile produces: DEBUG -- : PostgreSQL processing foreign key constraints ERROR -- : PostgreSQL connection returned an error for query ALTER TABLE ogfile ADD CONSTRAINT ogc_ogfile_quality_oid FOREIGN KEY (quality_oid) REFERENCES ogquality(oid) ON UPDATE SET NULL ON DELETE SET NULL ERROR -- : Og.setup had problems: PGError => ERROR: column "quality_oid" referenced in foreign key constraint does not exist after this the psql table looks like: videolist=# \d ogfile Column | Type | Modifiers ---------------+-----------------------+---------- ogtype | character varying(30) | title | text | container_oid | integer | c_d_oid | integer | oid | integer | not null.. so what I'm guessing is, that the "foreign key construction" comes too early. Should be some "if klass.ancestors.include?(SchemaInheritanceBase) then delay foreign key construction". I hope George or someone else can make sense of that. I tried to look into the code where this could be implemented, but I somehow got lost in those 5 or 6 "needed_constraints" functions. Well, I'll keep looking into this, but I don't seem to be good enough to solve this, I really hope this gets solved somehow *g*. Everyone talks about leaving, but I find (after looking at Rails and others first) that Nitro with all it's troubles, edges 'n failures is the only Framework I could ever breathe in. Since I'm not yet making money with what I can, I rather watch Nitro rise instead of getting me strangled by any other framework. Thank you all very much. Kash -- Feel the love http://pinkjuice.com/pics/ruby.png From kashia at vfemail.net Wed Dec 28 18:46:44 2005 From: kashia at vfemail.net (Kashia Buch) Date: Thu, 29 Dec 2005 00:46:44 +0100 Subject: [Nitro] SchemaInheritance and Foreign Keys In-Reply-To: References: Message-ID: Reply to myself: damn am I dumb :) read error messages more thoroghly. DEBUG -- : Table ogfile already exists INFO -- : WARNING: Table 'ogfile' is missing field 'rgroup_oid integer' and :evolve_schema is not set to true! which leads us to the obvious :evolve_schema => true and it already works. Question now, are there any sideeffects to this evolve_schema option other than what it just did? Kash From bryan.a.soto at gmail.com Wed Dec 28 18:55:41 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 28 Dec 2005 15:55:41 -0800 Subject: [Nitro] SchemaInheritance and Foreign Keys In-Reply-To: References: Message-ID: Hi, :evolve_schema will just add fields to your tables, nothing more. deletes are a separate setting, :evolve_schema_cautious, I believe. bryan On 12/28/05, Kashia Buch wrote: > > Reply to myself: > > damn am I dumb :) > read error messages more thoroghly. > > DEBUG -- : Table ogfile already exists > INFO -- : WARNING: Table 'ogfile' is missing field 'rgroup_oid integer' > and :evolve_schema is not set to true! > > which leads us to the obvious > > :evolve_schema => true > > and it already works. > > Question now, are there any sideeffects to this evolve_schema option other > than what it just did? > > Kash > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051228/6744676a/attachment.html From thoraval.yvon at free.fr Wed Dec 28 18:56:42 2005 From: thoraval.yvon at free.fr (Yvon Thoraval) Date: Thu, 29 Dec 2005 00:56:42 +0100 Subject: [Nitro] [Newbie]Nitro examples/[blog|why_wiki] In-Reply-To: <45A8F1E2-B754-4EB2-8353-98A3D71409BB@free.fr> References: <45A8F1E2-B754-4EB2-8353-98A3D71409BB@free.fr> Message-ID: Le 29 d?c. 05 ? 00:02, Yvon Thoraval a ?crit : > for why_wiki i get : > [0m~/work/Ruby/Nitro/examples/why_wiki> ruby run.rb > /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:149:in `activate': > can't activate RedCloth (= 3.0.3), already activated RedCloth-3.0.4] > (Gem::Exception) > > thus that means i would have to uninstall RedCloth 3.0.4 and make use > of 3.0.3 ? > > in case you have some light !!! seems to be correct because i did a fresh ruby-1.8.4+og +RedCloth-3.0.3>>ONLY<<+nitro (in my $HOME) and examples/why_wiki is working. at the contrary, blog still fails with the same error... Yvon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051228/a211ac6b/attachment.html From vikingtux at gmail.com Wed Dec 28 23:44:58 2005 From: vikingtux at gmail.com (Alexandre Gravem) Date: Thu, 29 Dec 2005 02:44:58 -0200 Subject: [Nitro] rdog Message-ID: <40b05ebe0512282044p5a9d373bt8593ce5d882bc72a@mail.gmail.com> Hi, What is RDOG? In the context that I have read it, I guess it is a documentation project. If it is the case and help is wanted, I would be glad to join the project! yours, Gravem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051228/c5ab1c43/attachment.html From bryan.a.soto at gmail.com Thu Dec 29 02:19:56 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 28 Dec 2005 23:19:56 -0800 Subject: [Nitro] rdog In-Reply-To: <40b05ebe0512282044p5a9d373bt8593ce5d882bc72a@mail.gmail.com> References: <40b05ebe0512282044p5a9d373bt8593ce5d882bc72a@mail.gmail.com> Message-ID: Hi Gravem, I liked your writeup of pager on the wiki 8) RDOG is indeed a documentation project by manveru. It's located at http://rdog.manveru.net but it and manveru's site both appear to be down at the moment. The site's source is also available on rubyforge if you're interested, http://rubyforge.org/projects/rdog http://rubyforge.org/pipermail/nitro-general/2005-December/002107.html is the announcement for more info. As I recall, the idea was that it displayed the RDoc from the source code in combination with a wiki so people could add additional comments. bryan On 12/28/05, Alexandre Gravem wrote: > > Hi, > > What is RDOG? In the context that I have read it, I guess it is a > documentation project. If it is the case and help is wanted, I would be glad > to join the project! > > yours, > Gravem > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051229/bf7eb3ca/attachment.html From vikingtux at gmail.com Thu Dec 29 02:27:39 2005 From: vikingtux at gmail.com (Alexandre Gravem) Date: Thu, 29 Dec 2005 05:27:39 -0200 Subject: [Nitro] rdog In-Reply-To: References: <40b05ebe0512282044p5a9d373bt8593ce5d882bc72a@mail.gmail.com> Message-ID: <40b05ebe0512282327o60916ea6m715a7f68d261df54@mail.gmail.com> Hi, Thanks Byan ... I will look up the links =) Glad you enjoyed the pager entry ... I am browsing the source files of nitro and will post any relevant info I can gather! yours, Gravem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051229/c76d3bb8/attachment.html From bryan.a.soto at gmail.com Thu Dec 29 03:15:39 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Thu, 29 Dec 2005 00:15:39 -0800 Subject: [Nitro] Oddity with scaffolding Message-ID: Hi, I'm trying to get Nitro in Flames up to date and found that the scaffolding controller created in nitro/lib/nitro/scaffolding.rb doesn't default to index action. http://localhost:9999/items/ will bring up the error page while typing out the full http://localhost:9999/items/index works fine. bryan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051229/37fc3861/attachment.html From bryan.a.soto at gmail.com Thu Dec 29 03:20:03 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Thu, 29 Dec 2005 00:20:03 -0800 Subject: [Nitro] rdog In-Reply-To: <40b05ebe0512282327o60916ea6m715a7f68d261df54@mail.gmail.com> References: <40b05ebe0512282044p5a9d373bt8593ce5d882bc72a@mail.gmail.com> <40b05ebe0512282327o60916ea6m715a7f68d261df54@mail.gmail.com> Message-ID: I know I'm not alone when I say thank you and good work. I'm looking forward to seeing what else you do. 8) On 12/28/05, Alexandre Gravem wrote: > > Hi, > > Thanks Byan ... I will look up the links =) > > Glad you enjoyed the pager entry ... I am browsing the source files of > nitro and will post any relevant info I can gather! > > > yours, > Gravem > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051229/45bb14f1/attachment.html From george.moschovitis at gmail.com Thu Dec 29 05:05:31 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 29 Dec 2005 12:05:31 +0200 Subject: [Nitro] The status of Nitro/Og - some personal thoughts In-Reply-To: <43B31842.2060008@neurogami.com> References: <20051228152331.GC20090@localhost> <200512282026.41151.m.fellinger@gmail.com> <43B31842.2060008@neurogami.com> Message-ID: Ok, the point was taken! I and some other core developers have tried a lot to make Nitro/Og easier and more accessible for newcomers. The new series of videos is a step in this direction. We are at a time where I am mostly happy with the feature set. The only think I would like to add is some sort of integrated file uploads/image support (something like OgFile/OgImage) and integration with the latest facets. Apart from that I plan to work only on bug fixes, polishing, rdocs and some articles. I would like to ask James and Michael not to abandon this project but to help with docs instead. I will go over the bug reports I received over the last month and make sure everything gets fixed (incl. cgi, nitrogen, ep' inheritance prob). James I would like to ask you to try and find some time to update your tutorial. The API will NOT change a lot from now on. best regards, George. On 12/29/05, James Britt wrote: > Michael Fellinger wrote: > ... > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu Dec 29 06:14:21 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 29 Dec 2005 13:14:21 +0200 Subject: [Nitro] in... vain... In-Reply-To: References: Message-ID: > 81 # next line should work, but it does not > 82 foo_foobars = foo1.bars.foobars > 83 foo_foobars.class Wrong, this should NOT work. I have already answered this: require 'glue/accumulate' foo1.bars.accumulate.foobars will work... regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu Dec 29 06:43:57 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 29 Dec 2005 13:43:57 +0200 Subject: [Nitro] in... vain... In-Reply-To: References: Message-ID: Anyway, since you are such a nice guy (and a donator ;-)) I added auto-accumulation in Og collections: foo1.bars.foobars works in the latest repo version ;-) enjoy, George. On 12/29/05, George Moschovitis wrote: > > 81 # next line should work, but it does not > > 82 foo_foobars = foo1.bars.foobars > > 83 foo_foobars.class > > Wrong, this should NOT work. I have already answered this: > > require 'glue/accumulate' > > foo1.bars.accumulate.foobars > > will work... > > regards, > George. > > -- > http://www.gmosx.com > http://www.navel.gr > http://www.nitrohq.com > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu Dec 29 06:46:00 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 29 Dec 2005 13:46:00 +0200 Subject: [Nitro] AdminController In-Reply-To: <20051228152331.GC20090@localhost> References: <20051228152331.GC20090@localhost> Message-ID: Hmm, I have not tried the admin controller with 30 classes. Perhaps I could add a special annotation to controllers to avoid reloading. And annotate the Admin controller by default, anyone else has a better solution? regards, George. On 12/28/05, Tim Larson wrote: > When using the AdminController (tested with both 0.26.0 and > glycerin) the scaffolding for all the enchanted classes gets > rebuilt on every page request. I have not had time to look > for the cause, but I thought I should at least report the > effect in case someone else gets a chance to look at it :) > In my case this makes the admin pages unusable, since I have > 28 enchanted classes and growing and each page load takes > about 30 seconds to a minute. > > --Tim Larson > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From james_b at neurogami.com Thu Dec 29 10:16:18 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 29 Dec 2005 08:16:18 -0700 Subject: [Nitro] The status of Nitro/Og - some personal thoughts In-Reply-To: References: <20051228152331.GC20090@localhost> <200512282026.41151.m.fellinger@gmail.com> <43B31842.2060008@neurogami.com> Message-ID: <43B3FDC2.3030202@neurogami.com> George Moschovitis wrote: > Ok, the point was taken! > > I and some other core developers have tried a lot to make Nitro/Og > easier and more accessible for newcomers. The new series of videos is > a step in this direction. We are at a time where I am mostly happy > with the feature set. The only think I would like to add is some sort > of integrated file uploads/image support (something like > OgFile/OgImage) and integration with the latest facets. Is this needed? Is there not already a reasonable clear way for people to code this themselves, or to write a module or add-on for this? > > Apart from that I plan to work only on bug fixes, polishing, rdocs and > some articles. I would like to ask James and Michael not to abandon > this project but to help with docs instead. I will go over the bug > reports I received over the last month and make sure everything gets > fixed (incl. cgi, nitrogen, ep' inheritance prob). James I would like > to ask you to try and find some time to update your tutorial. The API > will NOT change a lot from now on. Well, I've not given up completely, though my time is very limited. I'll take a full look at the videos and try them myself, and then see if I can code stuff up without out headaches. -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools From george.moschovitis at gmail.com Thu Dec 29 10:39:34 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 29 Dec 2005 17:39:34 +0200 Subject: [Nitro] The status of Nitro/Og - some personal thoughts In-Reply-To: <43B3FDC2.3030202@neurogami.com> References: <20051228152331.GC20090@localhost> <200512282026.41151.m.fellinger@gmail.com> <43B31842.2060008@neurogami.com> <43B3FDC2.3030202@neurogami.com> Message-ID: > Is this needed? Is there not already a reasonable clear way for people > to code this themselves, or to write a module or add-on for this? There is, Michael Fellinger has code OgFile/OgImage, and he will release the source code in the new NIXEL project on Rubyforge. however I think I can improve this much more by better integrating this into the Nitro. Make this a bit more magic ;-) And I strongly need such features for my projects. > Well, I've not given up completely, though my time is very limited. great to hear :) > I'll take a full look at the videos and try them myself, and then see if > I can code stuff up without out headaches. See the videos NOW ;-) Especially the third one (till the end, where the interesting stuff happens) regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From paul.hanchett at gmail.com Thu Dec 29 10:50:19 2005 From: paul.hanchett at gmail.com (Paul Hanchett) Date: Thu, 29 Dec 2005 07:50:19 -0800 Subject: [Nitro] SchemaInheritance and Foreign Keys In-Reply-To: References: Message-ID: <43B405BB.8010007@gmail.com> Where can I learn about all these interesting :tags? :-) Bryan Soto wrote: > Hi, > > :evolve_schema will just add fields to your tables, nothing more. > > deletes are a separate setting, :evolve_schema_cautious, I believe. > > bryan > > On 12/28/05, *Kashia Buch* > wrote: > > Reply to myself: > > damn am I dumb :) > read error messages more thoroghly. > > DEBUG -- : Table ogfile already exists > INFO -- : WARNING: Table 'ogfile' is missing field 'rgroup_oid > integer' > and :evolve_schema is not set to true! > > which leads us to the obvious > > :evolve_schema => true > > and it already works. > > Question now, are there any sideeffects to this evolve_schema > option other > than what it just did? > > Kash > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > >------------------------------------------------------------------------ > >_______________________________________________ >Nitro-general mailing list >Nitro-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/nitro-general > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051229/5601313c/attachment.html From tim at keow.org Thu Dec 29 11:44:29 2005 From: tim at keow.org (Tim Larson) Date: Thu, 29 Dec 2005 16:44:29 +0000 Subject: [Nitro] AdminController In-Reply-To: References: <20051228152331.GC20090@localhost> Message-ID: <20051229164429.GF19774@localhost> On Thu, Dec 29, 2005 at 01:46:00PM +0200, George Moschovitis wrote: > Hmm, I have not tried the admin controller with 30 classes. Perhaps I > could add a special annotation to controllers to avoid reloading. And > annotate the Admin controller by default, anyone else has a better > solution? > > regards, > George. George fixed/optimized this in glycerin by only reloading the controller when a watched file (any watched file, *.rb, *.xhtml) is changed, causing the admin screens to now be quite snappy :) --Tim Larson > On 12/28/05, Tim Larson wrote: > > When using the AdminController (tested with both 0.26.0 and > > glycerin) the scaffolding for all the enchanted classes gets > > rebuilt on every page request. I have not had time to look > > for the cause, but I thought I should at least report the > > effect in case someone else gets a chance to look at it :) > > In my case this makes the admin pages unusable, since I have > > 28 enchanted classes and growing and each page load takes > > about 30 seconds to a minute. > > > > --Tim Larson From kashia at vfemail.net Thu Dec 29 13:21:12 2005 From: kashia at vfemail.net (Kashia Buch) Date: Thu, 29 Dec 2005 19:21:12 +0100 Subject: [Nitro] SchemaInheritance and Foreign Keys In-Reply-To: <43B405BB.8010007@gmail.com> References: <43B405BB.8010007@gmail.com> Message-ID: Hi, On Thu, 29 Dec 2005 16:50:19 +0100, Paul Hanchett wrote: > Where can I learn about all these interesting :tags? :-) Well, on my searches I found a few in og.rb starting line 57, you might want to have a look, there are also descriptions on what they do. quick list of the settings I found and where they are used. :store (manager) :name (sql) :passw (sql) :check_implicit_graph_changes (og) :table_prefix (og) :create_schema (og) :raise_store_exceptions (og) :thread_safe (og) :evolve_schema (manager/sql) :evolve_schema_purge_tables (manager/sql) :leave_constraints (sql) :table_type (mysql) and there's also: Og.create_schema (sql) which I whonder, does that work as a normal option as well? couldn't find anything in the code. Question, would this be the complete list? (including what the stores use.) Would be good for beginners to get available options more quickly, any way to do that? Kash -- Feel the love http://pinkjuice.com/pics/ruby.png From paul.hanchett at gmail.com Thu Dec 29 13:49:32 2005 From: paul.hanchett at gmail.com (Paul Hanchett) Date: Thu, 29 Dec 2005 10:49:32 -0800 Subject: [Nitro] SchemaInheritance and Foreign Keys In-Reply-To: References: <43B405BB.8010007@gmail.com> Message-ID: <43B42FBC.5040502@gmail.com> Thanks, Kashia... There must be more because I've seen some other stuff mentioned on this list... And I guess I'm not really talking about only the symbolic values. There are things like "is", "has_one", "has_many" and the like. og/relation.rb seems to define many of these adjectives, but it would be really nice to have a list of "all" the available words (at least that come from Nitro and og) and what they mean. For some reason, I find ruby RDoc documentation to be "difficult" to use. Am I just weird, or is this a common feeling? :-\ Paul Kashia Buch wrote: >Hi, > >On Thu, 29 Dec 2005 16:50:19 +0100, Paul Hanchett > wrote: > > >>Where can I learn about all these interesting :tags? :-) >> >> > >Well, on my searches I found a few in og.rb starting line 57, you might >want to have a look, there are also descriptions on what they do. > >quick list of the settings I found and where they are used. > > :store (manager) > :name (sql) > :passw (sql) > :check_implicit_graph_changes (og) > :table_prefix (og) > :create_schema (og) > :raise_store_exceptions (og) > :thread_safe (og) > :evolve_schema (manager/sql) > :evolve_schema_purge_tables (manager/sql) > > :leave_constraints (sql) > :table_type (mysql) > >and there's also: > Og.create_schema (sql) >which I whonder, does that work as a normal option as well? couldn't find >anything in the code. > >Question, would this be the complete list? (including what the stores >use.) Would be good for beginners to get available options more quickly, >any way to do that? > >Kash > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051229/fea8d54e/attachment.html From kashia at vfemail.net Thu Dec 29 13:58:05 2005 From: kashia at vfemail.net (Kashia Buch) Date: Thu, 29 Dec 2005 19:58:05 +0100 Subject: [Nitro] Nitro Apache2 CGI/FCGI (again) Message-ID: Hi, trying to get nitro to run on apache. (lets hope I can successfully reply to myself again in a few minutes ;)) error: DEBUG -- : Using memory sessions. [error] [client 127.0.0.1] malformed header from script. Bad header=nil: fcgi.rb INFO -- : Og uses the Psql store. and a error 500 to the browser ("Nitro failed to start properly") setup is following: httpd.conf ------------------- ServerName nitro DocumentRoot /path/to/app/public/ ErrorLog /path/to/app/log/apache.log ErrorDocument 500 "

Application error

Nitro failed to start properly" Options +FollowSymLinks +ExecCGI Options ExecCGI FollowSymLinks AllowOverride all Allow from all Order allow,deny
and in /path/to/app/public/.htaccess ------------------- RewriteEngine On RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ cgi.rb [QSA,L] well, I seem to be missing something important, is that .htaccess approach even possible? Kash -- Feel the love http://pinkjuice.com/pics/ruby.png From kashia at vfemail.net Thu Dec 29 14:19:34 2005 From: kashia at vfemail.net (Kashia Buch) Date: Thu, 29 Dec 2005 20:19:34 +0100 Subject: [Nitro] SchemaInheritance and Foreign Keys In-Reply-To: <43B42FBC.5040502@gmail.com> References: <43B405BB.8010007@gmail.com> <43B42FBC.5040502@gmail.com> Message-ID: On Thu, 29 Dec 2005 19:49:32 +0100, Paul Hanchett wrote: > Thanks, Kashia... > > There must be more because I've seen some other stuff mentioned on this > list... And I guess I'm not really talking about only the symbolic > values. There are things like "is", "has_one", "has_many" and the like. If you're just looking for relations, http://www.nitrohq.com/view/Relations/Og should be complete. > og/relation.rb seems to define many of these adjectives, but it would be > really nice to have a list of "all" the available words (at least that > come from Nitro and og) and what they mean. A list of all those... well, one could start a list of sort of "commonly used magic functions" on wiki... maybe like a Q/A style, function/description for just those magic thingys. but I'm not sure if they are not already there.. somewhere hidden in the wiki... > For some reason, I find ruby RDoc documentation to be "difficult" to > use. Am I just weird, or is this a common feeling? :-\ Well, rdoc is (IMHO) mainly for looking up, what a known function does. I always hope for examples (like those uber cool videos from George, many thx btw) I can adapt to use for my apps. Kash -- Feel the love http://pinkjuice.com/pics/ruby.png From james_b at neurogami.com Thu Dec 29 15:51:25 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 29 Dec 2005 13:51:25 -0700 Subject: [Nitro] Nitro Apache2 CGI/FCGI (again) In-Reply-To: References: Message-ID: <43B44C4D.7090302@neurogami.com> Kashia Buch wrote: > Hi, > > trying to get nitro to run on apache. (lets hope I can successfully reply > to myself again in a few minutes ;)) > > error: > > DEBUG -- : Using memory sessions. > [error] [client 127.0.0.1] malformed header from script. Bad header=nil: > fcgi.rb > INFO -- : Og uses the Psql store. > > and a error 500 to the browser ("Nitro failed to start properly") > I *believe* you should be able to run the cgi script form the command line, which might give you some more useful error info. The 'malformed header' stuff is the ultimate in useless error messages. It tends to come from the actual error info being sent out to Apache, which in turn complains about the data not being all nice and header-like (while not bothering to emit the actual bad header data in its message). James From erik at kommunicate.net Thu Dec 29 14:01:03 2005 From: erik at kommunicate.net (Erik Howard) Date: Thu, 29 Dec 2005 13:01:03 -0600 Subject: [Nitro] Nitro Apache2 CGI/FCGI (again) In-Reply-To: References: Message-ID: <43B4326F.3030907@kommunicate.net> Kashia Buch wrote: >Hi, > >trying to get nitro to run on apache. (lets hope I can successfully reply >to myself again in a few minutes ;)) > >error: > >DEBUG -- : Using memory sessions. >[error] [client 127.0.0.1] malformed header from script. Bad header=nil: >fcgi.rb >INFO -- : Og uses the Psql store. > >and a error 500 to the browser ("Nitro failed to start properly") > >setup is following: > >httpd.conf >------------------- > > ServerName nitro > DocumentRoot /path/to/app/public/ > ErrorLog /path/to/app/log/apache.log > ErrorDocument 500 "

Application error

Nitro failed to start >properly" > > Options +FollowSymLinks +ExecCGI > > > Options ExecCGI FollowSymLinks > AllowOverride all > Allow from all > Order allow,deny > >
> >and in /path/to/app/public/.htaccess >------------------- >RewriteEngine On >RewriteRule ^$ index.html [QSA] >RewriteRule ^([^.]+)$ $1.html [QSA] >RewriteCond %{REQUEST_FILENAME} !-f >RewriteRule ^(.*)$ cgi.rb [QSA,L] > > >well, I seem to be missing something important, is that .htaccess approach >even possible? > >Kash > > Take a look at the last line of your rewrite rules. RewriteRule ^(.*)$ *cgi.rb* [QSA,L] should be RewriteRule ^(.*)$ *fcgi.rb* [QSA,L] Also make sure fcgi.rb is executable by the Apache user. I have Nitro running on Apache2/FCGI with no problems. Hope this helps. -Erik From kashia at vfemail.net Thu Dec 29 16:12:36 2005 From: kashia at vfemail.net (Kashia Buch) Date: Thu, 29 Dec 2005 22:12:36 +0100 Subject: [Nitro] Nitro Apache2 CGI/FCGI (again) In-Reply-To: <43B44C4D.7090302@neurogami.com> References: <43B44C4D.7090302@neurogami.com> Message-ID: Hi, On Thu, 29 Dec 2005 21:51:25 +0100, James Britt wrote: > I *believe* you should be able to run the cgi script form the command > line, which might give you some more useful error info. The 'malformed > header' stuff is the ultimate in useless error messages. It tends to > come from the actual error info being sent out to Apache, which in turn > complains about the data not being all nice and header-like (while not > bothering to emit the actual bad header data in its message). I agree with you.. very useless indeed $ ruby cgi.rb D, [2005-12-29T21:57:40.163325 #14122] DEBUG -- : Using memory sessions. .... (offline mode: enter name=value pairs on standard input) ^D /sw/var/lib/gems/1.8/gems/nitro-0.26.0/lib/nitro/cgi/request.rb:106:in `method': undefined method `downcase' for nil:NilClass (NoMethodError) from /sw/var/lib/gems/1.8/gems/nitro-0.26.0/lib/nitro/cgi.rb:165:in `parse_params' from /sw/var/lib/gems/1.8/gems/nitro-0.26.0/lib/nitro/cgi.rb:34:in `process' from /sw/var/lib/gems/1.8/gems/nitro-0.26.0/lib/nitro/adapter/cgi.rb:22:in `start' from /sw/var/lib/gems/1.8/gems/nitro-0.26.0/lib/nitro/server/runner.rb:257:in `invoke' from /sw/var/lib/gems/1.8/gems/nitro-0.26.0/lib/nitro/server.rb:124:in `run' from /sw/var/lib/gems/1.8/gems/nitro-0.26.0/lib/nitro.rb:73:in `start' from ./../run.rb:24 from cgi.rb:5 in request.rb line 106 @headers['REQUEST_METHOD'] does not seem to be set. but, now, does that have anything to do with the cgi problem... guess it does, will investigate a bit Thank you very much for the help :D Kash -- Feel the love http://pinkjuice.com/pics/ruby.png From kashia at vfemail.net Thu Dec 29 16:14:43 2005 From: kashia at vfemail.net (Kashia Buch) Date: Thu, 29 Dec 2005 22:14:43 +0100 Subject: [Nitro] Nitro Apache2 CGI/FCGI (again) In-Reply-To: <43B4326F.3030907@kommunicate.net> References: <43B4326F.3030907@kommunicate.net> Message-ID: Hi, On Thu, 29 Dec 2005 20:01:03 +0100, Erik Howard wrote: > RewriteRule ^(.*)$ *fcgi.rb* [QSA,L] This produces exactly the same error. Kash -- Feel the love http://pinkjuice.com/pics/ruby.png From erik at kommunicate.net Thu Dec 29 14:49:21 2005 From: erik at kommunicate.net (Erik Howard) Date: Thu, 29 Dec 2005 13:49:21 -0600 Subject: [Nitro] Nitro Apache2 CGI/FCGI (again) In-Reply-To: References: <43B4326F.3030907@kommunicate.net> Message-ID: <43B43DC1.9040907@kommunicate.net> Kashia Buch wrote: >Hi, > >On Thu, 29 Dec 2005 20:01:03 +0100, Erik Howard >wrote: > > >>RewriteRule ^(.*)$ *fcgi.rb* [QSA,L] >> >> > >This produces exactly the same error. > >Kash > > Here's the revelant bits i have in my httpd.conf file *httpd.conf* LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so User apacheuser Group apachegroup # Important. The following directives come *after* # User and Group FastCgiIpcDir /var/tmp/fcgi FastCgiConfig -initial-env 'RUBYOPT=-rubygems AddHandler fastcgi-script fcgi fpl rb # No peeking at my .htaccess files Order allow,deny Deny from all NameVirtualHost *:80 ServerName exaple.com ServerAlias www.example.com DocumentRoot /path/to/docroot Options FollowSymLinks +ExecCGI AllowOverride All Order allow,deny Allow from all *.htaccess* RewriteEngine On RewriteRule ^/$ /index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /fcgi.rb [QSA,L] To test if you have FastCGI working correctly, you can try the following script. Dont forget to make the script executable. *test.fcgi* #!/usr/bin/env ruby require 'cgi' require 'fcgi' def print_env(title,env) str = "#{title}:
\n
\n"
   env.each do |k,v|
     str<<"#{k}=#{v}\n"
   end
   str<< "

\n" end count = 0 FCGI.each_cgi do |cgi| count += 1 content = "FastCGI echo

FastCGI echo

\n" content<< sprintf("Request number %d, Process ID: %d

\n", count, Process.$ content<< print_env("Request environment", cgi.env_table) cgi.out{content} end From kashia at vfemail.net Thu Dec 29 17:14:24 2005 From: kashia at vfemail.net (Kashia Buch) Date: Thu, 29 Dec 2005 23:14:24 +0100 Subject: [Nitro] Nitro Apache2 CGI/FCGI (again) In-Reply-To: <43B43DC1.9040907@kommunicate.net> References: <43B4326F.3030907@kommunicate.net> <43B43DC1.9040907@kommunicate.net> Message-ID: Yaaay ^__^ Thank you very much Erik, I'm now getting overrun by spawned ruby processes, but it works :D I don't know which of the options now really did the trick.. I will edit the wiki page on Apache2/Nitro later tomorrow, to save other people that hassle... Right now, I'm gonna get my hands dirty on the actual coding after those setup issues are solved... really, thank you very much Erik :) Kash -- Feel the love http://pinkjuice.com/pics/ruby.png From erik at kommunicate.net Thu Dec 29 15:35:26 2005 From: erik at kommunicate.net (Erik Howard) Date: Thu, 29 Dec 2005 14:35:26 -0600 Subject: [Nitro] Nitro Apache2 CGI/FCGI (again) In-Reply-To: References: <43B4326F.3030907@kommunicate.net> <43B43DC1.9040907@kommunicate.net> Message-ID: <43B4488E.1010503@kommunicate.net> Kashia Buch wrote: >Yaaay ^__^ > >Thank you very much Erik, I'm now getting overrun by spawned ruby >processes, but it works :D >I don't know which of the options now really did the trick.. > >I will edit the wiki page on Apache2/Nitro later tomorrow, to save other >people that hassle... Right now, I'm gonna get my hands dirty on the >actual coding after those setup issues are solved... > >really, thank you very much Erik :) > >Kash > > > Kash, Glad things are working for you now. :) -Erik From george.moschovitis at gmail.com Fri Dec 30 04:28:19 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 30 Dec 2005 11:28:19 +0200 Subject: [Nitro] AdminController In-Reply-To: <20051229164429.GF19774@localhost> References: <20051228152331.GC20090@localhost> <20051229164429.GF19774@localhost> Message-ID: > George fixed/optimized this in glycerin by only reloading the > controller when a watched file (any watched file, *.rb, *.xhtml) > is changed, causing the admin screens to now be quite snappy :) btw, I improved/fixed this further. Moreover, since it is so fast now, I have enabled it by default on the live (production) setup (with 2 mins sleep though...) thanks for the tip Tim :) -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Fri Dec 30 06:55:33 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 30 Dec 2005 13:55:33 +0200 Subject: [Nitro] [Newbie]Nitro examples/[blog|why_wiki] In-Reply-To: References: <45A8F1E2-B754-4EB2-8353-98A3D71409BB@free.fr> Message-ID: > at the contrary, blog still fails with the same error... hello yvon, glad to hear you got why_wiki working... there are some issues with the blog example, will be fixed in 0.27.0 (to be released next week). regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Fri Dec 30 07:02:30 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 30 Dec 2005 14:02:30 +0200 Subject: [Nitro] Dispaying ruby vars in Nitro templates In-Reply-To: <40b05ebe0512252148m4df28743u44eea19d715cbadc@mail.gmail.com> References: <40b05ebe0512252148m4df28743u44eea19d715cbadc@mail.gmail.com> Message-ID: have a look here: http://www.nitrohq.com/view/FAQ%3AWhat_are_those_funny_interpolation_operators -g. On 12/26/05, Alexandre Gravem wrote: > I am not sure it is a Nitro question, if I am asking in the wrong place > please forgive me! > To learn Nitro I decided to set up a multi-user blog system based on the > blog example provided. When checking on templates/view.xhtml I notice 3 ways > to display the value of ruby vars: #{var}, #(var) and #|var| ... > Firstly I thought the three worked same way, but when displaying text > marked up with Textile the #{var} 'operator' showed the raw text while the > #|var| transform it to HTML. > > My questions are: > 1) How to use each correctly > 2) There are others 'operators' like those? > > Again, I am sorry if I am asking in the wrong place! > > Gravem > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Fri Dec 30 07:20:35 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 30 Dec 2005 14:20:35 +0200 Subject: [Nitro] Posible belongs_to problem/bug In-Reply-To: References: <37fd0c50512280650h113ec744m59bdccd9190e8697@mail.gmail.com> Message-ID: For the roles you shold probably use a many_to_many relation. -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From humberaquino at gmail.com Fri Dec 30 07:39:57 2005 From: humberaquino at gmail.com (Humber Aquino) Date: Fri, 30 Dec 2005 09:39:57 -0300 Subject: [Nitro] Posible belongs_to problem/bug In-Reply-To: References: <37fd0c50512280650h113ec744m59bdccd9190e8697@mail.gmail.com> Message-ID: <37fd0c50512300439i4572dc27xb4d2cc042b94881a@mail.gmail.com> On 12/30/05, George Moschovitis wrote: > For the roles you shold probably use a many_to_many relation. > > -g. You're right George.. The thing is that my code is in spanish and when i post a problem i usually make an example in english so everyone can follow it without much trouble It was just a bad example +) sorry! But thanks anyway ;-) Humber From george.moschovitis at gmail.com Fri Dec 30 07:50:30 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 30 Dec 2005 14:50:30 +0200 Subject: [Nitro] Posible belongs_to problem/bug In-Reply-To: <37fd0c50512300439i4572dc27xb4d2cc042b94881a@mail.gmail.com> References: <37fd0c50512280650h113ec744m59bdccd9190e8697@mail.gmail.com> <37fd0c50512300439i4572dc27xb4d2cc042b94881a@mail.gmail.com> Message-ID: I will read a bit more careful the example though... best regards, George On 12/30/05, Humber Aquino wrote: > On 12/30/05, George Moschovitis wrote: > > For the roles you shold probably use a many_to_many relation. > > > > -g. > > You're right George.. The thing is that my code is in spanish and when > i post a problem i usually make an example in english so everyone can > follow it without much trouble > > It was just a bad example +) sorry! > > But thanks anyway ;-) > Humber > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From vikingtux at gmail.com Fri Dec 30 07:54:21 2005 From: vikingtux at gmail.com (Alexandre Gravem) Date: Fri, 30 Dec 2005 10:54:21 -0200 Subject: [Nitro] Dispaying ruby vars in Nitro templates In-Reply-To: References: <40b05ebe0512252148m4df28743u44eea19d715cbadc@mail.gmail.com> Message-ID: <40b05ebe0512300454w62670f0cqb2bfb6b5b3d46167@mail.gmail.com> Thanks G. but it seems to me that the #|...| operator does the markup (not the #(...) as said in the wiki) ... and if ain't asking too much, how/where can I customize them? yours, Gravem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051230/92e6ddff/attachment.html From george.moschovitis at gmail.com Fri Dec 30 08:01:00 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 30 Dec 2005 15:01:00 +0200 Subject: [Nitro] Dispaying ruby vars in Nitro templates In-Reply-To: <40b05ebe0512300454w62670f0cqb2bfb6b5b3d46167@mail.gmail.com> References: <40b05ebe0512252148m4df28743u44eea19d715cbadc@mail.gmail.com> <40b05ebe0512300454w62670f0cqb2bfb6b5b3d46167@mail.gmail.com> Message-ID: You can overload Markup#sanitize and Markup#markup, there are even some helpers provided... You can even generate your own compiler, have a look at lib/nitro/compiler/* lib/nitro/compiler/markup (the markup compiler) for examples ;-) -g. On 12/30/05, Alexandre Gravem wrote: > Thanks G. > > but it seems to me that the #|...| operator does the markup (not the #(...) > as said in the wiki) ... and if ain't asking too much, how/where can I > customize them? > > yours, > Gravem > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From vikingtux at gmail.com Fri Dec 30 08:21:03 2005 From: vikingtux at gmail.com (Alexandre Gravem) Date: Fri, 30 Dec 2005 11:21:03 -0200 Subject: [Nitro] Dispaying ruby vars in Nitro templates In-Reply-To: References: <40b05ebe0512252148m4df28743u44eea19d715cbadc@mail.gmail.com> <40b05ebe0512300454w62670f0cqb2bfb6b5b3d46167@mail.gmail.com> Message-ID: <40b05ebe0512300521y32a90ad7ia2c7f879a9122f6e@mail.gmail.com> Many Thanks G. both for the answer and for nitro yours, Gravem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051230/cad40fe4/attachment.html From thoraval.yvon at free.fr Fri Dec 30 08:45:16 2005 From: thoraval.yvon at free.fr (Yvon Thoraval) Date: Fri, 30 Dec 2005 14:45:16 +0100 Subject: [Nitro] [Newbie]Nitro examples/[blog|why_wiki] In-Reply-To: References: <45A8F1E2-B754-4EB2-8353-98A3D71409BB@free.fr> Message-ID: Le 30 d?c. 05 ? 12:55, George Moschovitis a ?crit : > hello yvon, glad to hear you got why_wiki working... > there are some issues with the blog example, will be fixed in 0.27.0 > (to be released next week). ok, thanks for your reply ;-) i had to re-install everything from scratsh yesterday eve', including MacOS X itself )) i've retry nitro too, was working, but no more today )) although i've : >ls /usr/local/lib/ruby/gems/1.8/ gems/ ruby run.rb References: <45A8F1E2-B754-4EB2-8353-98A3D71409BB@free.fr> Message-ID: <200512301452.55751.m.fellinger@gmail.com> Am Freitag, 30. Dezember 2005 14:45 schrieb Yvon Thoraval: > Le 30 d?c. 05 ? 12:55, George Moschovitis a ?crit : > > hello yvon, glad to hear you got why_wiki working... > > there are some issues with the blog example, will be fixed in 0.27.0 > > (to be released next week). > > ok, thanks for your reply ;-) > i had to re-install everything from scratsh yesterday eve', including > MacOS X itself )) > > i've retry nitro too, was working, but no more today )) > > although i've : > >ls /usr/local/lib/ruby/gems/1.8/ > > gems/ > gen-0.26.0 nitro-0.26.0 ruby- > breakpoint-0.5.0 wee-0.10.0 > cmdparse-2.0.0 facets-2005.10.30 > glue-0.26.0 og-0.26.0 sources-0.0.1 > > and running ewamples/wee gaves to me : > ~/work/Ruby/Nitro/examples/wee>ruby > run.rb > 21:in `require__': no such file to load -- nitro (LoadError) > from /usr/local/lib/ruby/site_ruby/1.8/rubygems/ > custom_require.rb:21:in `require' > from run.rb:2 > > > it seems that, today, rubygems is unable to find back what it has > installed yesterday... Is it possible that you have to set the env-variable for rubygems? RUBYOPT=-rubygems or control it by putting a require 'rubygems' in run.rb yourself. > > the only new things i've installed since yesterday are mod_ruby and > eruby > > do they interact, badly, with nitro ? > > mod_ruby is working well with apache 1.3.x, however not eruby, > something strange if i want to point a browser to a *.rhtml file it > gaves me the option to download it, not to see the result... > > i'm using ruby 1.8.4 now. > > best, > > Yvon -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051230/5fa47077/attachment.bin From thoraval.yvon at free.fr Fri Dec 30 09:12:53 2005 From: thoraval.yvon at free.fr (Yvon Thoraval) Date: Fri, 30 Dec 2005 15:12:53 +0100 Subject: [Nitro] [Newbie]Nitro examples/[blog|why_wiki] In-Reply-To: <200512301452.55751.m.fellinger@gmail.com> References: <45A8F1E2-B754-4EB2-8353-98A3D71409BB@free.fr> <200512301452.55751.m.fellinger@gmail.com> Message-ID: <033A7C35-4F0A-42C5-80AF-4EBB40820D9B@free.fr> Le 30 d?c. 05 ? 14:52, Michael Fellinger a ?crit : > Is it possible that you have to set the env-variable for rubygems? > RUBYOPT=-rubygems good point i don't if i have to set : export RUBYOPT=-rrubygems (actual value) export RUBYOPT=-rubygems OR export RUBYOPT=rubygems OR > or control it by putting a require 'rubygems' in run.rb yourself. It was a misstake of me, i didn't put the correct GEM_HOME, right now nitro is warking back even with why_wiki export GEM_HOME=/usr/local/lib/ruby/gems/1.8 (actual value) Yvon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051230/961a8bb3/attachment.html From bryan.a.soto at gmail.com Fri Dec 30 16:10:18 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Fri, 30 Dec 2005 13:10:18 -0800 Subject: [Nitro] PATCH: bugfix_scaffold Message-ID: * bugfix_scaffold Specifies Nitro namespace so scaffolding can correctly fill Og objects if user didn't include Nitro namespace in his app. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051230/b5644e2f/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: bugfix_scaffold Type: application/octet-stream Size: 3848 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051230/b5644e2f/attachment.obj