From epiperak at softlab.ece.ntua.gr Tue Nov 1 00:43:40 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 1 Nov 2005 07:43:40 +0200 (EET) Subject: [Nitro] date_select Message-ID: Hi all, I think I found something here if you object has a property Date and you try to fill the object you get the following... fill does not convert the hash to date correctly? (does it only convert to Time?) Thanx ;-) undefined method `year' for {"month"=>"11", "day"=>"1", "year"=>"2005"}:Hash /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/store/sql.rb:34:in `date' (eval):5:in `og_insert' /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/store.rb:121:in `save' /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/entity.rb:16:in `save' ./src/controller.rb:164:in `project_save' (eval):13:in `project_save_action' /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/controller.rb:104:in `method_missing' /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/render.rb:125:in `render' /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/adapter/webrick.rb:142:in `do_POST' /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib/ruby/1.8/webrick/server.rb:82:in `start' /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/adapter/webrick.rb:53:in `start' /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server/runner.rb:282:in `invoke_server' /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server/runner.rb:248:in `invoke' /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server.rb:123:in `run' /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro.rb:65:in `run' run.rb:41 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 Tue Nov 1 02:29:03 2005 From: james_b at neurogami.com (James Britt) Date: Tue, 01 Nov 2005 00:29:03 -0700 Subject: [Nitro] class CgiUtils missing? In-Reply-To: <607b35037102446438aed765137aa577@oggu.de> References: <607b35037102446438aed765137aa577@oggu.de> Message-ID: <4367193F.6080802@neurogami.com> Fabian Buch wrote: > Am 29.10.2005 um 20:59 schrieb George Moschovitis: > > >>>Anyway, thanks that you'll have a look into the CGI adapter. >> >>If you rename CgiUtils tou Cgi in adapter/cgi.rb it will work! > > > Okay, did that. Now I get the following: > Is there a real solution for this? I really want to get some Nitro apps up and running, as CGI under Apache 2, but while code runs fine on Windows, it barfs on Linux. I've tried some hacks; apparently, if you change CgiUtils to Cgi in adapter/cgi.rb , then a later call to cgi.env fails; cgi itself is something of a header hash, so I copied it and passed it on to context.headers (which the call that broke). Later code then fails when trying to extract certain header values that are empty; the call to downcase never checks if the target is not nil. And forcing an empty header to an empty string then makes the next call to intern break. Trying to stomp on each error as it comes up after hacking the previous error ultimately doesn't work, because my index.xhtml file now renders like crap, because an action that used to return an XML string for some DHTML transclusion now returns the entire main page. Seems something else in Nitro has changed besides the CGI adapter. Anyway, some suggestions on getting a real solution for the CGI issue would be much appreciated. Thanks, James PS My current working solution is: require 'rubygems' require_gem 'nitro', '<0.24.0' From george.moschovitis at gmail.com Tue Nov 1 03:40:37 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 1 Nov 2005 10:40:37 +0200 Subject: [Nitro] class CgiUtils missing? In-Reply-To: <4367193F.6080802@neurogami.com> References: <607b35037102446438aed765137aa577@oggu.de> <4367193F.6080802@neurogami.com> Message-ID: > Is there a real solution for this? > > I really want to get some Nitro apps up and running, as CGI under Apache > 2, but while code runs fine on Windows, it barfs on Linux. > >... > > Anyway, some suggestions on getting a real solution for the CGI issue > would be much appreciated. Hello James, Is it possible that you could investigate this further? As I am not using CGI and cannot easily setup an environment to test this, it would be really helpful. GGI is only problematic on Linux? regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From epiperak at softlab.ece.ntua.gr Tue Nov 1 03:58:06 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 1 Nov 2005 10:58:06 +0200 (EET) Subject: [Nitro] bugfix Message-ID: In xhtml.rb function date_select please change the line 93 from: #{options(:labels => Date::MONTHNAMES, :values => (1..12).to_a, :selected => (date.month))} to #{options(:labels => Date::MONTHNAMES.compact, :values => (1..12).to_a, :selected => (date.month))} unfortunately Date::MONTHNAMES adds a nil element at the beginning of the array that spoils up the numbering of the months. compact fixes that ;-) Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From chris at motionpath.com Tue Nov 1 04:16:44 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Tue, 1 Nov 2005 09:16:44 +0000 Subject: [Nitro] date_select In-Reply-To: References: Message-ID: <6982C7B9-7763-4793-9A6B-46990FC09691@motionpath.com> Yeah we added fixes to this (and the other problems with date/tags) it's on our darcs version here (http://nitro.lego.motionpath.com) if you want to pull in the changes. :) Chris Farmiloe Design & Development. Motionpath Digital Media Ltd. St Georges road, Brighton, BN2 1ED. Office: 01273 608708 | Mobile: 07791 179481 On 1 Nov 2005, at 05:43, Emmanuel Piperakis wrote: > Hi all, > I think I found something here if you object has a property Date > and you try to fill the object you get the following... fill does not > convert the hash to date correctly? (does it only convert to Time?) > > Thanx ;-) > > > undefined method `year' for {"month"=>"11", "day"=>"1", > "year"=>"2005"}:Hash > > /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/store/sql.rb:34:in `date' > (eval):5:in `og_insert' > /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/store.rb:121:in `save' > /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/entity.rb:16:in `save' > ./src/controller.rb:164:in `project_save' > (eval):13:in `project_save_action' > /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/controller.rb: > 104:in > `method_missing' > /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/render.rb:125:in > `render' > /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/adapter/ > webrick.rb:142:in > `do_POST' > /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service' > /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' > /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' > /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' > /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' > /usr/lib/ruby/1.8/webrick/server.rb:95:in `start' > /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' > /usr/lib/ruby/1.8/webrick/server.rb:23:in `start' > /usr/lib/ruby/1.8/webrick/server.rb:82:in `start' > /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/adapter/ > webrick.rb:53:in > `start' > /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server/runner.rb: > 282:in > `invoke_server' > /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server/runner.rb: > 248:in > `invoke' > /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server.rb:123:in > `run' > /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro.rb:65:in `run' > run.rb:41 > > 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/20051101/24a406cd/attachment.html From george.moschovitis at gmail.com Tue Nov 1 04:19:44 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 1 Nov 2005 11:19:44 +0200 Subject: [Nitro] date_select In-Reply-To: <6982C7B9-7763-4793-9A6B-46990FC09691@motionpath.com> References: <6982C7B9-7763-4793-9A6B-46990FC09691@motionpath.com> Message-ID: can you send me a bundle? -g. On 11/1/05, Chris Farmiloe wrote: > > > Yeah we added fixes to this (and the other problems with date/tags) > > it's on our darcs version here > (http://nitro.lego.motionpath.com) if you > want to pull in the changes. :) > > > > > > > Chris Farmiloe > Design & Development. > > Motionpath Digital Media Ltd. > St Georges road, Brighton, BN2 1ED. > Office: 01273 608708 | Mobile: 07791 179481 > > > > > > > On 1 Nov 2005, at 05:43, Emmanuel Piperakis wrote: > > Hi all, > I think I found something here if you object has a property Date > and you try to fill the object you get the following... fill does not > convert the hash to date correctly? (does it only convert to Time?) > > Thanx ;-) > > > undefined method `year' for {"month"=>"11", "day"=>"1", > "year"=>"2005"}:Hash > > /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/store/sql.rb:34:in `date' > (eval):5:in `og_insert' > /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/store.rb:121:in `save' > /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/entity.rb:16:in `save' > ./src/controller.rb:164:in `project_save' > (eval):13:in `project_save_action' > /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/controller.rb:104:in > `method_missing' > /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/render.rb:125:in > `render' > /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/adapter/webrick.rb:142:in > `do_POST' > /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in > `service' > /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' > /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' > /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' > /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' > /usr/lib/ruby/1.8/webrick/server.rb:95:in `start' > /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' > /usr/lib/ruby/1.8/webrick/server.rb:23:in `start' > /usr/lib/ruby/1.8/webrick/server.rb:82:in `start' > /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/adapter/webrick.rb:53:in > `start' > /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server/runner.rb:282:in > `invoke_server' > /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server/runner.rb:248:in > `invoke' > /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server.rb:123:in > `run' > /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro.rb:65:in > `run' > run.rb:41 > > 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 > > > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From epiperak at softlab.ece.ntua.gr Tue Nov 1 04:47:43 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 1 Nov 2005 11:47:43 +0200 (EET) Subject: [Nitro] date_select In-Reply-To: References: <6982C7B9-7763-4793-9A6B-46990FC09691@motionpath.com> Message-ID: George can you please include those changes? It is important to be able to use dates!! Thanx :-) > can you send me a bundle? > > -g. > > > On 11/1/05, Chris Farmiloe wrote: >> >> >> Yeah we added fixes to this (and the other problems with date/tags) >> >> it's on our darcs version here >> (http://nitro.lego.motionpath.com) if you >> want to pull in the changes. :) >> >> >> >> >> >> >> Chris Farmiloe >> Design & Development. >> >> Motionpath Digital Media Ltd. >> St Georges road, Brighton, BN2 1ED. >> Office: 01273 608708 | Mobile: 07791 179481 >> >> >> >> >> >> >> On 1 Nov 2005, at 05:43, Emmanuel Piperakis wrote: >> >> Hi all, >> I think I found something here if you object has a property Date >> and you try to fill the object you get the following... fill does not >> convert the hash to date correctly? (does it only convert to Time?) >> >> Thanx ;-) >> >> >> undefined method `year' for {"month"=>"11", "day"=>"1", >> "year"=>"2005"}:Hash >> >> /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/store/sql.rb:34:in `date' >> (eval):5:in `og_insert' >> /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/store.rb:121:in `save' >> /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/entity.rb:16:in `save' >> ./src/controller.rb:164:in `project_save' >> (eval):13:in `project_save_action' >> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/controller.rb:104:in >> `method_missing' >> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/render.rb:125:in >> `render' >> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/adapter/webrick.rb:142:in >> `do_POST' >> /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in >> `service' >> /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' >> /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' >> /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' >> /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' >> /usr/lib/ruby/1.8/webrick/server.rb:95:in `start' >> /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' >> /usr/lib/ruby/1.8/webrick/server.rb:23:in `start' >> /usr/lib/ruby/1.8/webrick/server.rb:82:in `start' >> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/adapter/webrick.rb:53:in >> `start' >> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server/runner.rb:282:in >> `invoke_server' >> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server/runner.rb:248:in >> `invoke' >> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server.rb:123:in >> `run' >> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro.rb:65:in >> `run' >> run.rb:41 >> >> 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 >> >> >> > > > -- > 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 Nov 1 05:02:22 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 1 Nov 2005 12:02:22 +0200 (EET) Subject: [Nitro] date_select In-Reply-To: <6982C7B9-7763-4793-9A6B-46990FC09691@motionpath.com> References: <6982C7B9-7763-4793-9A6B-46990FC09691@motionpath.com> Message-ID: > > Yeah we added fixes to this (and the other problems with date/tags) > > it's on our darcs version here (http://nitro.lego.motionpath.com) if you > want to pull in the changes. :) Thanx, I check the patches and they do not solve the problem As I mentioned before Date::MONTHNAMES adds a nil at the beginning of the table. Also, you treat Date as Time, with the sideeffect of showing timestamps instead of dates. Finally the problem with even the patched fill is that is passes the Hash to Og, not a Date... > > > > > > Chris Farmiloe > Design & Development. > > Motionpath Digital Media Ltd. > St Georges road, Brighton, BN2 1ED. > Office: 01273 608708 | Mobile: 07791 179481 > > > > > On 1 Nov 2005, at 05:43, Emmanuel Piperakis wrote: > >> Hi all, >> I think I found something here if you object has a property Date >> and you try to fill the object you get the following... fill does not >> convert the hash to date correctly? (does it only convert to Time?) >> >> Thanx ;-) >> >> >> undefined method `year' for {"month"=>"11", "day"=>"1", >> "year"=>"2005"}:Hash >> >> /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/store/sql.rb:34:in `date' >> (eval):5:in `og_insert' >> /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/store.rb:121:in `save' >> /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/entity.rb:16:in `save' >> ./src/controller.rb:164:in `project_save' >> (eval):13:in `project_save_action' >> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/controller.rb:104:in >> `method_missing' >> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/render.rb:125:in >> `render' >> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/adapter/ >> webrick.rb:142:in >> `do_POST' >> /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service' >> /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' >> /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' >> /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' >> /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' >> /usr/lib/ruby/1.8/webrick/server.rb:95:in `start' >> /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' >> /usr/lib/ruby/1.8/webrick/server.rb:23:in `start' >> /usr/lib/ruby/1.8/webrick/server.rb:82:in `start' >> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/adapter/webrick.rb:53:in >> `start' >> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server/runner.rb:282:in >> `invoke_server' >> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server/runner.rb:248:in >> `invoke' >> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server.rb:123:in `run' >> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro.rb:65:in `run' >> run.rb:41 >> >> 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 chris at motionpath.com Tue Nov 1 05:03:52 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Tue, 1 Nov 2005 10:03:52 +0000 Subject: [Nitro] date_select In-Reply-To: References: <6982C7B9-7763-4793-9A6B-46990FC09691@motionpath.com> Message-ID: <90DF6784-B0D5-475F-B72F-D1C9073E75F9@motionpath.com> bundle in the post. Chris Farmiloe Design & Development. Motionpath Digital Media Ltd. St Georges road, Brighton, BN2 1ED. Office: 01273 608708 | Mobile: 07791 179481 On 1 Nov 2005, at 09:47, Emmanuel Piperakis wrote: > George can you please include those changes? It is important to be > able to > use dates!! > > Thanx :-) > > > >> can you send me a bundle? >> >> -g. >> >> >> On 11/1/05, Chris Farmiloe wrote: >> >>> >>> >>> Yeah we added fixes to this (and the other problems with date/tags) >>> >>> it's on our darcs version here >>> (http://nitro.lego.motionpath.com) if you >>> want to pull in the changes. :) >>> >>> >>> >>> >>> >>> >>> Chris Farmiloe >>> Design & Development. >>> >>> Motionpath Digital Media Ltd. >>> St Georges road, Brighton, BN2 1ED. >>> Office: 01273 608708 | Mobile: 07791 179481 >>> >>> >>> >>> >>> >>> >>> On 1 Nov 2005, at 05:43, Emmanuel Piperakis wrote: >>> >>> Hi all, >>> I think I found something here if you object has a property Date >>> and you try to fill the object you get the following... fill does >>> not >>> convert the hash to date correctly? (does it only convert to Time?) >>> >>> Thanx ;-) >>> >>> >>> undefined method `year' for {"month"=>"11", "day"=>"1", >>> "year"=>"2005"}:Hash >>> >>> /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/store/sql.rb:34:in >>> `date' >>> (eval):5:in `og_insert' >>> /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/store.rb:121:in `save' >>> /usr/lib/ruby/gems/1.8/gems/og-0.24.0/lib/og/entity.rb:16:in `save' >>> ./src/controller.rb:164:in `project_save' >>> (eval):13:in `project_save_action' >>> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/controller.rb: >>> 104:in >>> `method_missing' >>> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/render.rb:125:in >>> `render' >>> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/adapter/ >>> webrick.rb:142:in >>> `do_POST' >>> /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in >>> `service' >>> /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' >>> /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' >>> /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' >>> /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' >>> /usr/lib/ruby/1.8/webrick/server.rb:95:in `start' >>> /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' >>> /usr/lib/ruby/1.8/webrick/server.rb:23:in `start' >>> /usr/lib/ruby/1.8/webrick/server.rb:82:in `start' >>> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/adapter/ >>> webrick.rb:53:in >>> `start' >>> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server/ >>> runner.rb:282:in >>> `invoke_server' >>> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server/ >>> runner.rb:248:in >>> `invoke' >>> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server.rb:123:in >>> `run' >>> /usr/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro.rb:65:in >>> `run' >>> run.rb:41 >>> >>> 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 >>> >>> >>> >>> >> >> >> -- >> 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} > _______________________________________________ > 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/20051101/35d6abb2/attachment.html From george.moschovitis at gmail.com Tue Nov 1 05:08:57 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 1 Nov 2005 12:08:57 +0200 Subject: [Nitro] Repository Message-ID: The new (and final) url for the repository will be: http://repo.nitrohq.com Many thanks to the fellow naveler Tasos Koutoumanos for helping out with this ;-) I will sync this repo with my development version later today. I would like to integrate some patches from Tom first. regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue Nov 1 05:10:41 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 1 Nov 2005 12:10:41 +0200 Subject: [Nitro] 0.25.0 Message-ID: Dear devs, for 0.25.0 we plan to concentrate on bug fixes, code cleanup and code refactoring. I would like to ask for one volunteer to go over the source code and add RDoc comments on all methods. Anyone would like to donate some of his time for our project? regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From chris at motionpath.com Tue Nov 1 05:17:36 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Tue, 1 Nov 2005 10:17:36 +0000 Subject: [Nitro] Repository In-Reply-To: References: Message-ID: <252954B5-45CD-4990-B39C-1ABB31ACFE96@motionpath.com> can't wait Chris Farmiloe Design & Development. Motionpath Digital Media Ltd. St Georges road, Brighton, BN2 1ED. Office: 01273 608708 | Mobile: 07791 179481 On 1 Nov 2005, at 10:08, George Moschovitis wrote: > The new (and final) url for the repository will be: > > http://repo.nitrohq.com > > Many thanks to the fellow naveler Tasos Koutoumanos for helping out > with this ;-) > > I will sync this repo with my development version later today. I would > like to integrate some patches from Tom first. > > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051101/9c453cf4/attachment.html From m.fellinger at gmail.com Tue Nov 1 05:26:56 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Tue, 1 Nov 2005 11:26:56 +0100 Subject: [Nitro] 0.25.0 In-Reply-To: References: Message-ID: <200511011127.01132.m.fellinger@gmail.com> Hey George, If noone else wants to do this - i could spend some limited time on it... but i think it would be better if more people joined this efforts (wich should be no problem with darcs now) in every case, i will add some comments in the next few days... but i have lot of stuff running atm, so don't count on me being overly active (haven't even finished the tutorial... shame on me) (btw, this 0.25 version is feature-freezed now? i would like to see this, as 0.24 seems to have more bugs introduced and there needs to be a bit of slowdown and look-around what is possible with nitro now and where all the bugs are) so long... manveru Am Dienstag 01 November 2005 11:10 schrieb George Moschovitis: > Dear devs, > > for 0.25.0 we plan to concentrate on bug fixes, code cleanup and code > refactoring. > > I would like to ask for one volunteer to go over the source code and > add RDoc comments on all methods. Anyone would like to donate some of > his time for our project? > > 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 -------------- 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/20051101/8559037e/attachment.bin From george.moschovitis at gmail.com Tue Nov 1 05:29:30 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 1 Nov 2005 12:29:30 +0200 Subject: [Nitro] 0.25.0 In-Reply-To: <200511011127.01132.m.fellinger@gmail.com> References: <200511011127.01132.m.fellinger@gmail.com> Message-ID: > (btw, this 0.25 version is feature-freezed now? i would like to see this, as > 0.24 seems to have more bugs introduced and there needs to be a bit of > slowdown and look-around what is possible with nitro now and where all the > bugs are) Yeap, Nitro is feature freezed at the moment. The next couple of releases will concentrate on bug fixes, clean up, refactoring, and documentation. We really need the community support for this to work out. regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue Nov 1 05:46:10 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 1 Nov 2005 12:46:10 +0200 Subject: [Nitro] Repository Message-ID: Ok, the repository has the latest code, please read the updated darcs page on the Wiki for patch submission guidelines. thanks, George. PS: Please can you resend me your bundle against the latest repository? -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue Nov 1 07:33:47 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 1 Nov 2005 14:33:47 +0200 Subject: [Nitro] 0.25.0 In-Reply-To: <200511011127.01132.m.fellinger@gmail.com> References: <200511011127.01132.m.fellinger@gmail.com> Message-ID: > If noone else wants to do this - i could spend some limited time on it... but > i think it would be better if more people joined this efforts (wich should be > no problem with darcs now) Great go on, grab the latest code from repo.nitrohq.com and send me the patch bundles ;-) Something like this will do: # This is a very interesting method that does this and that. # # === Input # # * val1 - The first parameter. # * val2 - The second parameter. # # === Output # # * ret - The output is. def mymethod(val1, val2) return ret1 end In general, please try to follow the coding conventions. regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue Nov 1 07:45:22 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 1 Nov 2005 14:45:22 +0200 Subject: [Nitro] Morphing compiler Message-ID: Hello Guill, as you can see I added the xhtml compiler as morphing compiler in 0.25.0 lib/nitro/compiler/morphing.rb this compiler expands code like this:
koko
koko
koko
At the moment, this is implemented using some simple regexp magic. However, this does not work correctly when you have nested tags. I wonder if you have some time to investigate reimplementing this for example using rexml or something like this? I am posting this to the mailing list, perhaps someone other has more time and can work on this. thanks, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From m.fellinger at gmail.com Tue Nov 1 11:40:17 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Tue, 1 Nov 2005 17:40:17 +0100 Subject: [Nitro] flare and fcgi Message-ID: <200511011740.20408.m.fellinger@gmail.com> hey List, i just tried flare now on fcgi (lighttpd) and keep getting some nasty errors... (nothing changed to the code) the fix for the following would be a line like: allow_comments = ((val == "on" or val == "true") ? true : val.to_i > 0) but i can't even figure out where it is... so i guess this is created on the fly and changed from 0.22 (where i think flare is from)... could someone please investigate this? manver... /usr/lib/ruby/gems/1.8/gems/glue-0.24.0/lib/glue/property.rb:172:in `module_eval': (eval):9:in `module_eval': compile error (SyntaxError) (eval):3: syntax error, unexpected ')', expecting kTHEN or ':' or '\n' or ';' self.allow_comments=(if (val == "on" or val == "true") ? true : val.to_i > 0) ^ (eval):9: syntax error, unexpected $end, expecting ')' from /usr/lib/ruby/gems/1.8/gems/glue-0.24.0/lib/glue/property.rb:172:in `eval_helpers' from (eval):27:in `property' from (eval):21:in `property' from ./src/model.rb:58 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from /var/www/flare/public/../run.rb:9 from /var/www/flare/public/fcgi.rb:6 /usr/lib/ruby/gems/1.8/gems/glue-0.24.0/lib/glue/property.rb:172:in `module_eval': (eval):9:in `module_eval': compile error (SyntaxError) (eval):3: syntax error, unexpected ')', expecting kTHEN or ':' or '\n' or ';' self.allow_comments=(if (val == "on" or val == "true") ? true : val.to_i > 0) -------------- 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/20051101/86ca146d/attachment.bin From george.moschovitis at gmail.com Tue Nov 1 12:06:47 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 1 Nov 2005 19:06:47 +0200 Subject: [Nitro] flare and fcgi In-Reply-To: <200511011740.20408.m.fellinger@gmail.com> References: <200511011740.20408.m.fellinger@gmail.com> Message-ID: > the fix for the following would be a line like: > allow_comments = ((val == "on" or val == "true") ? true : val.to_i > 0) this is generated on glue/lib/glue/property.rb -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From rob at motionpath.com Tue Nov 1 12:20:26 2005 From: rob at motionpath.com (Rob Pitt) Date: Tue, 01 Nov 2005 17:20:26 +0000 Subject: [Nitro] 0.25.0 In-Reply-To: <200511011127.01132.m.fellinger@gmail.com> References: <200511011127.01132.m.fellinger@gmail.com> Message-ID: <4367A3DA.50706@motionpath.com> I will contribute a little time also after Chris has finished reconsiling our patchset against the general Nitro darcs repo. Michael Fellinger wrote: >Hey George, > >If noone else wants to do this - i could spend some limited time on it... but >i think it would be better if more people joined this efforts (wich should be >no problem with darcs now) >in every case, i will add some comments in the next few days... but i have lot >of stuff running atm, so don't count on me being overly active (haven't even >finished the tutorial... shame on me) > >(btw, this 0.25 version is feature-freezed now? i would like to see this, as >0.24 seems to have more bugs introduced and there needs to be a bit of >slowdown and look-around what is possible with nitro now and where all the >bugs are) > >so long... >manveru > >Am Dienstag 01 November 2005 11:10 schrieb George Moschovitis: > > >>Dear devs, >> >>for 0.25.0 we plan to concentrate on bug fixes, code cleanup and code >>refactoring. >> >>I would like to ask for one volunteer to go over the source code and >>add RDoc comments on all methods. Anyone would like to donate some of >>his time for our project? >> >>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 >> >> >>------------------------------------------------------------------------ >> >>_______________________________________________ >>Nitro-general mailing list >>Nitro-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/nitro-general >> >> From james_b at neurogami.com Tue Nov 1 12:20:54 2005 From: james_b at neurogami.com (James Britt) Date: Tue, 01 Nov 2005 10:20:54 -0700 Subject: [Nitro] class CgiUtils missing? In-Reply-To: References: <607b35037102446438aed765137aa577@oggu.de> <4367193F.6080802@neurogami.com> Message-ID: <4367A3F6.2020604@neurogami.com> George Moschovitis wrote: >>Is there a real solution for this? >> >>I really want to get some Nitro apps up and running, as CGI under Apache >>2, but while code runs fine on Windows, it barfs on Linux. >> >>... >> >>Anyway, some suggestions on getting a real solution for the CGI issue >>would be much appreciated. > > > > Hello James, > > Is it possible that you could investigate this further? Unlikely, at least for the time being. My application is not terribly complex, and I don't really have the time or inclination right now to track down assorted issues. For now, I'm setting it to a particular version of the Nitro gem. My best guess on the problem is that assorted CGI code needs to access HTTP headers. The code calls context.headers = cgi.env, but there is no env in the CGI object. The code should perhaps get what headers it needs right from the cgi object (which I think as them), or from ENV directly. James From m.fellinger at gmail.com Tue Nov 1 12:21:25 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Tue, 1 Nov 2005 18:21:25 +0100 Subject: [Nitro] flare and fcgi In-Reply-To: References: <200511011740.20408.m.fellinger@gmail.com> Message-ID: <200511011821.29311.m.fellinger@gmail.com> oh, didn't look in there - since i thought it was generated on the fly and passed through the eval... i'll fix that in there now Am Dienstag 01 November 2005 18:06 schrieb George Moschovitis: > > the fix for the following would be a line like: > > allow_comments = ((val == "on" or val == "true") ? true : val.to_i > 0) > > this is generated on > > glue/lib/glue/property.rb > > -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 -------------- 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/20051101/b3107a78/attachment.bin From george.moschovitis at gmail.com Tue Nov 1 12:26:32 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 1 Nov 2005 19:26:32 +0200 Subject: [Nitro] 0.25.0 In-Reply-To: <4367A3DA.50706@motionpath.com> References: <200511011127.01132.m.fellinger@gmail.com> <4367A3DA.50706@motionpath.com> Message-ID: > I will contribute a little time also after Chris has finished Thanks > reconsiling our patchset against the general Nitro darcs repo. Hmm, I am afraid I moved a lot of stuff arround in order to simplify, refactor some things. If there are problems I will manually apply the patch. regards, George. > > Michael Fellinger wrote: > > >Hey George, > > > >If noone else wants to do this - i could spend some limited time on it... but > >i think it would be better if more people joined this efforts (wich should be > >no problem with darcs now) > >in every case, i will add some comments in the next few days... but i have lot > >of stuff running atm, so don't count on me being overly active (haven't even > >finished the tutorial... shame on me) > > > >(btw, this 0.25 version is feature-freezed now? i would like to see this, as > >0.24 seems to have more bugs introduced and there needs to be a bit of > >slowdown and look-around what is possible with nitro now and where all the > >bugs are) > > > >so long... > >manveru > > > >Am Dienstag 01 November 2005 11:10 schrieb George Moschovitis: > > > > > >>Dear devs, > >> > >>for 0.25.0 we plan to concentrate on bug fixes, code cleanup and code > >>refactoring. > >> > >>I would like to ask for one volunteer to go over the source code and > >>add RDoc comments on all methods. Anyone would like to donate some of > >>his time for our project? > >> > >>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 > >> > >> > >>------------------------------------------------------------------------ > >> > >>_______________________________________________ > >>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 Tue Nov 1 15:03:04 2005 From: rob at motionpath.com (Rob Pitt) Date: Tue, 01 Nov 2005 20:03:04 +0000 Subject: [Nitro] 0.25.0 In-Reply-To: References: <200511011127.01132.m.fellinger@gmail.com> <4367A3DA.50706@motionpath.com> Message-ID: <4367C9F8.2030804@motionpath.com> Thanks for the offer, but there is no need. We have developed a little system which leverages subversion to assist us - we used the same method to generage patches to Nitro 0.24 from our 0.23 adaptions. He said it wouldn't take him long (think he is doing it tomorrow). He mentioned the hardest bit was because we both have an automatic habit of deleting those spaces lying around at the end of lines and on blank lines. George Moschovitis wrote: >>I will contribute a little time also after Chris has finished >> >> > >Thanks > > > >>reconsiling our patchset against the general Nitro darcs repo. >> >> > >Hmm, I am afraid I moved a lot of stuff arround in order to simplify, >refactor some things. >If there are problems I will manually apply the patch. > >regards, >George. > > > > > >>Michael Fellinger wrote: >> >> >> >>>Hey George, >>> >>>If noone else wants to do this - i could spend some limited time on it... but >>>i think it would be better if more people joined this efforts (wich should be >>>no problem with darcs now) >>>in every case, i will add some comments in the next few days... but i have lot >>>of stuff running atm, so don't count on me being overly active (haven't even >>>finished the tutorial... shame on me) >>> >>>(btw, this 0.25 version is feature-freezed now? i would like to see this, as >>>0.24 seems to have more bugs introduced and there needs to be a bit of >>>slowdown and look-around what is possible with nitro now and where all the >>>bugs are) >>> >>>so long... >>>manveru >>> >>>Am Dienstag 01 November 2005 11:10 schrieb George Moschovitis: >>> >>> >>> >>> >>>>Dear devs, >>>> >>>>for 0.25.0 we plan to concentrate on bug fixes, code cleanup and code >>>>refactoring. >>>> >>>>I would like to ask for one volunteer to go over the source code and >>>>add RDoc comments on all methods. Anyone would like to donate some of >>>>his time for our project? >>>> >>>>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 >>>> >>>> >>>>------------------------------------------------------------------------ >>>> >>>>_______________________________________________ >>>>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 > > From rainhead at gmail.com Tue Nov 1 18:33:40 2005 From: rainhead at gmail.com (Peter Abrahamsen) Date: Tue, 1 Nov 2005 15:33:40 -0800 Subject: [Nitro] Repository In-Reply-To: References: Message-ID: <1ACADFD9-21CB-4582-900C-677F9E9E6B58@gmail.com> Should this already be up? I'm not seeing any such dns entry. Thanks, Peter On Nov 1, 2005, at 2:46 AM, George Moschovitis wrote: > the repository has the latest code, please read the updated darcs page > on the Wiki for patch submission guidelines. -------------- 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/20051101/b60b865f/attachment.bin From rainhead at gmail.com Tue Nov 1 19:55:56 2005 From: rainhead at gmail.com (Peter Abrahamsen) Date: Tue, 1 Nov 2005 16:55:56 -0800 Subject: [Nitro] Wiki-based Documentation In-Reply-To: <200510291756.26689.m.fellinger@gmail.com> References: <4b6f054f0510290445h1f5e3a2ewe0abdbeeccd3776e@mail.gmail.com> <200510291756.26689.m.fellinger@gmail.com> Message-ID: Michael, Though I didn't volunteer to be the wiki admin, I've been adding various bits of documentation to the Wiki, and re-arranging things a bit. I don't step on your toes by doing so. I'm happy to discuss strategy, goals, organization, or whatever by email or on IRC. It'd be good to make sure that everyone's on the same page so there's no wasted effort. Cheers, 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/20051101/f35f78b2/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/20051101/f35f78b2/attachment-0001.bin From guillaume.pierronnet at gmail.com Tue Nov 1 20:10:33 2005 From: guillaume.pierronnet at gmail.com (guillaume pierronnet) Date: Wed, 2 Nov 2005 02:10:33 +0100 Subject: [Nitro] Morphing compiler In-Reply-To: References: Message-ID: <6a7d49ca0511011710w22006eceq@mail.gmail.com> hi George, everybody, no pb, i'll try to improve that. Stabilizing og/nitro is a very good idea at this time. regards 2005/11/1, George Moschovitis : > Hello Guill, > > as you can see I added the xhtml compiler as morphing compiler in 0.25.0 > > lib/nitro/compiler/morphing.rb > > this compiler expands code like this: > >
koko
> >
koko
>
koko
> > At the moment, this is implemented using some simple regexp magic. > However, this does not work correctly when you have nested tags. I > wonder if you have some time to investigate reimplementing this for > example using rexml or something like this? I am posting this to the > mailing list, perhaps someone other has more time and can work on > this. > > thanks, > 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 > From m.fellinger at gmail.com Wed Nov 2 02:35:38 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Wed, 2 Nov 2005 08:35:38 +0100 Subject: [Nitro] fcgi multiple vhosts Message-ID: <200511020835.41515.m.fellinger@gmail.com> Hi List, time for yet another request. I want to setup multiple vhosts for lighttpd - now doing that is totally simple (that is what i thought) - and i set out to do that. my problem is now obviously the url.rewrite (afaik) - and i try to get some idea what is happening there. I was using this bit from the examples for lighttpd.confs, but they are mostly for standalone-apps with only different ports, but this one is different... everytime i try to access now http://example.com/foo i get a method_missing from nitro - it cannot find the method 'foo', wich is still in the request - i want to get rid from it, but seems i can't... i would be thankful for a solution or some idea, my regexpFu and knowledge about the fcgi-handler/adapter is not that strong... :) thank you in advance, manveru #my lighttpd.conf: $HTTP["url"] =~ "^/foo" { server.document-root = "/home/www-net/nitro/rep/public" server.errorlog = "/home/www-net/logs/foo_lighttpd.errors.log" server.indexfiles = ( "index.html" ) url.access-deny = ( "~", ".inc", ".bak" ) url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" ) server.error-handler-404 = "/fcgi.rb" fastcgi.server = ( ".rb" => ( "foo" => ( "min-procs" => 1, "max-procs" => 5, "socket" => "/tmp/foo.fcgi.socket", "bin-path" => "/home/www-net/nitro/rep/public/fcgi.rb", "bin-environment" => ( "NITRO_ENV" => "development" ) ) ) ) } -------------- 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/20051102/7032b510/attachment.bin From aglarond at gmail.com Wed Nov 2 02:58:40 2005 From: aglarond at gmail.com (Dimitri Aivaliotis) Date: Wed, 2 Nov 2005 08:58:40 +0100 Subject: [Nitro] fcgi multiple vhosts In-Reply-To: <200511020835.41515.m.fellinger@gmail.com> References: <200511020835.41515.m.fellinger@gmail.com> Message-ID: <55c107bf0511012358x66a804c0t27650f0fd6e2aedf@mail.gmail.com> Don't know if this will help or not... On 11/2/05, Michael Fellinger wrote: > > > url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" ) > You might want to add a slash here: "^/([^.]+)$" => "$1.html" Then, it'll look for foo.html in the document root, which I'm guessing you've got. I'm not sure about the rest, as I have no fcgi/lighttpd experience. - Dimitri -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051102/523f8002/attachment.html From george.moschovitis at gmail.com Wed Nov 2 03:26:45 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 2 Nov 2005 10:26:45 +0200 Subject: [Nitro] 0.25.0 In-Reply-To: <4367C9F8.2030804@motionpath.com> References: <200511011127.01132.m.fellinger@gmail.com> <4367A3DA.50706@motionpath.com> <4367C9F8.2030804@motionpath.com> Message-ID: can you send me that code that got rid of these spaces again? thanks, -g. On 11/1/05, Rob Pitt wrote: > Thanks for the offer, but there is no need. We have developed a little > system which leverages subversion to assist us - we used the same method > to generage patches to Nitro 0.24 from our 0.23 adaptions. He said it > wouldn't take him long (think he is doing it tomorrow). > > He mentioned the hardest bit was because we both have an automatic habit > of deleting those spaces lying around at the end of lines and on blank > lines. > > George Moschovitis wrote: > > >>I will contribute a little time also after Chris has finished > >> > >> > > > >Thanks > > > > > > > >>reconsiling our patchset against the general Nitro darcs repo. > >> > >> > > > >Hmm, I am afraid I moved a lot of stuff arround in order to simplify, > >refactor some things. > >If there are problems I will manually apply the patch. > > > >regards, > >George. > > > > > > > > > > > >>Michael Fellinger wrote: > >> > >> > >> > >>>Hey George, > >>> > >>>If noone else wants to do this - i could spend some limited time on it... but > >>>i think it would be better if more people joined this efforts (wich should be > >>>no problem with darcs now) > >>>in every case, i will add some comments in the next few days... but i have lot > >>>of stuff running atm, so don't count on me being overly active (haven't even > >>>finished the tutorial... shame on me) > >>> > >>>(btw, this 0.25 version is feature-freezed now? i would like to see this, as > >>>0.24 seems to have more bugs introduced and there needs to be a bit of > >>>slowdown and look-around what is possible with nitro now and where all the > >>>bugs are) > >>> > >>>so long... > >>>manveru > >>> > >>>Am Dienstag 01 November 2005 11:10 schrieb George Moschovitis: > >>> > >>> > >>> > >>> > >>>>Dear devs, > >>>> > >>>>for 0.25.0 we plan to concentrate on bug fixes, code cleanup and code > >>>>refactoring. > >>>> > >>>>I would like to ask for one volunteer to go over the source code and > >>>>add RDoc comments on all methods. Anyone would like to donate some of > >>>>his time for our project? > >>>> > >>>>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 > >>>> > >>>> > >>>>------------------------------------------------------------------------ > >>>> > >>>>_______________________________________________ > >>>>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 > > > > > > _______________________________________________ > 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 Wed Nov 2 10:02:10 2005 From: rob at motionpath.com (Rob Pitt) Date: Wed, 02 Nov 2005 15:02:10 +0000 Subject: [Nitro] superflous spaces and random windows linefeeds in the source Message-ID: <4368D4F2.9070206@motionpath.com> A request to the devs, can we not have any windows linefeeds in nitro code? AFAIK they are unnecessary and when we edit files with macs, linux or bsd systems our text editors remove them when we change lines and cause a lot of problems trying to generate darcs patches. There are many powerful text editors for windows that do not require these spaces, my favorite being UltraEdit32. Here is a little script that will kill windows linefeeds and superflous spaces on the end of lines out of a file: #!/usr/bin/env ruby f=File.open(ARGV[0],"r") new_lines = Array.new begin f.readlines.each do |line| new_lines << line.gsub(/ +$/,"").delete(13.chr) end ensure f.close end f=File.open(ARGV[0],"w") f.write new_lines f.close From james_b at neurogami.com Wed Nov 2 10:14:59 2005 From: james_b at neurogami.com (James Britt) Date: Wed, 02 Nov 2005 08:14:59 -0700 Subject: [Nitro] Broken link on Nitro Wiki Message-ID: <4368D7F3.6020907@neurogami.com> THe main page of nitrhq has a link to the mailing list home page, but it is malformed: http://http//rubyforge.org/pipermail/nitro-general/ James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys From george.moschovitis at gmail.com Wed Nov 2 10:29:04 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 2 Nov 2005 17:29:04 +0200 Subject: [Nitro] superflous spaces and random windows linefeeds in the source In-Reply-To: <4368D4F2.9070206@motionpath.com> References: <4368D4F2.9070206@motionpath.com> Message-ID: Hello Rob, I totaly agree with you. Saddly I am forced to use a windows machine (I cannot believe that people use this user-unfriendly OS) at the moment and I have recorded some patches before aplying my code cleanup fix. Will try to be more careful in the future. regards, George. On 11/2/05, Rob Pitt wrote: > A request to the devs, can we not have any windows linefeeds in nitro > code? AFAIK they are unnecessary and when we edit files with macs, linux > or bsd systems our text editors remove them when we change lines and > cause a lot of problems trying to generate darcs patches. There are many > powerful text editors for windows that do not require these spaces, my > favorite being UltraEdit32. Here is a little script that will kill > windows linefeeds and superflous spaces on the end of lines out of a file: > > #!/usr/bin/env ruby > f=File.open(ARGV[0],"r") > new_lines = Array.new > begin > f.readlines.each do |line| > new_lines << line.gsub(/ +$/,"").delete(13.chr) > end > ensure > f.close > end > f=File.open(ARGV[0],"w") > f.write new_lines > f.close > > _______________________________________________ > 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 m.fellinger at gmail.com Wed Nov 2 10:30:00 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Wed, 2 Nov 2005 16:30:00 +0100 Subject: [Nitro] Broken link on Nitro Wiki In-Reply-To: <4368D7F3.6020907@neurogami.com> References: <4368D7F3.6020907@neurogami.com> Message-ID: <200511021630.03212.m.fellinger@gmail.com> beautified and fixed :) Am Mittwoch 02 November 2005 16:14 schrieb James Britt: > THe main page of nitrhq has a link to the mailing list home page, but it > is malformed: > > http://http//rubyforge.org/pipermail/nitro-general/ > > > > > 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/20051102/75b21440/attachment.bin From george.moschovitis at gmail.com Wed Nov 2 10:33:04 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 2 Nov 2005 17:33:04 +0200 Subject: [Nitro] Broken link on Nitro Wiki In-Reply-To: <200511021630.03212.m.fellinger@gmail.com> References: <4368D7F3.6020907@neurogami.com> <200511021630.03212.m.fellinger@gmail.com> Message-ID: nice mr. admin :) -g. On 11/2/05, Michael Fellinger wrote: > beautified and fixed :) > > Am Mittwoch 02 November 2005 16:14 schrieb James Britt: > > THe main page of nitrhq has a link to the mailing list home page, but it > > is malformed: > > > > http://http//rubyforge.org/pipermail/nitro-general/ > > > > > > > > > > James > > > _______________________________________________ > 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 rainhead at gmail.com Wed Nov 2 13:59:05 2005 From: rainhead at gmail.com (Peter Abrahamsen) Date: Wed, 2 Nov 2005 10:59:05 -0800 Subject: [Nitro] Broken link on Nitro Wiki In-Reply-To: <4368D7F3.6020907@neurogami.com> References: <4368D7F3.6020907@neurogami.com> Message-ID: <08223DDA-42B0-4E02-B481-FCAC9BF06F9D@gmail.com> Also, the term "ORM" should probably be expanded. P On Nov 2, 2005, at 7:14 AM, James Britt wrote: > THe main page of nitrhq has a link to the mailing list home page, > but it > is malformed: > > http://http//rubyforge.org/pipermail/nitro-general/ -------------- 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/20051102/1525c37c/attachment.bin From transfire at gmail.com Wed Nov 2 15:45:46 2005 From: transfire at gmail.com (TRANS) Date: Wed, 2 Nov 2005 15:45:46 -0500 Subject: [Nitro] Documentation again... In-Reply-To: <435DD769.30309@bdebl.de> References: <435DD769.30309@bdebl.de> Message-ID: <4b6f054f0511021245g59df12favcaa4d7598dc87d5a@mail.gmail.com> On 10/25/05, Martin Bernd Schmeil wrote: > Hi all, > > since Nitro / Og 0.24.0 and it's docs haven't been out last weekend I > started reading the IMO excellent Pragmatic Programmers book Agile Web > Development With Rails. > > As I said many times before, without knowing the Big Picture I'm not > able to start coding. Now, assuming that the Rails tutorial is a > "feature complete introducion" _and_ the topics are migratable to > Nitro/Og: May this be an idea to build a documentation skeleton (for > migrating the code snippets plus adding some minimum explanation)? > > This way we would not just be able to build an introducion, but also a > Rails To Nitor/Og migration guide. > > What do you think? Now that the wiki's bakc, If you want to add a page to the wiki, I say go for it! T. From rainhead at gmail.com Wed Nov 2 19:32:30 2005 From: rainhead at gmail.com (Peter Abrahamsen) Date: Wed, 2 Nov 2005 16:32:30 -0800 Subject: [Nitro] Broken link on Nitro Wiki In-Reply-To: <200511021630.03212.m.fellinger@gmail.com> References: <4368D7F3.6020907@neurogami.com> <200511021630.03212.m.fellinger@gmail.com> Message-ID: It points to the rubygems list archive. Perhaps it should point to: http://rubyforge.org/mailman/listinfo/nitro-general With an "Archives" link to http://rubyforge.org/pipermail/nitro-general/ Peter On 11/2/05, Michael Fellinger wrote:> beautified and fixed :)>> Am Mittwoch 02 November 2005 16:14 schrieb James Britt:> > THe main page of nitrhq has a link to the mailing list home page, but it> > is malformed:> >> > http://http//rubyforge.org/pipermail/nitro-general/> >> >> >> >> > James>>> _______________________________________________> Nitro-general mailing list> Nitro-general at rubyforge.org> http://rubyforge.org/mailman/listinfo/nitro-general>>>> From rainhead at gmail.com Wed Nov 2 20:04:19 2005 From: rainhead at gmail.com (Peter Abrahamsen) Date: Wed, 2 Nov 2005 17:04:19 -0800 Subject: [Nitro] Facets version conflict Message-ID: Hi, I just updated the gems on a box, and tried to get spark running. Itseems that Nitro requires facets 2005.10.15, but if the latest version2005.10.30 is installed, then something else (nano?) loads thatversion before facets requires 2005.10.15, resulting in a versionconflict. Is 2005.10.30 actually incompatible with nitro 0.24? P From transfire at gmail.com Wed Nov 2 20:40:44 2005 From: transfire at gmail.com (TRANS) Date: Wed, 2 Nov 2005 20:40:44 -0500 Subject: [Nitro] Facets version conflict In-Reply-To: References: Message-ID: <4b6f054f0511021740k7cd9bfcak43782ff7466d4dd8@mail.gmail.com> On 11/2/05, Peter Abrahamsen wrote: > Hi, > I just updated the gems on a box, and tried to get spark running. Itseems that Nitro requires facets 2005.10.15, but if the latest version2005.10.30 is installed, then something else (nano?) loads thatversion before facets requires 2005.10.15, resulting in a versionconflict. > Is 2005.10.30 actually incompatible with nitro 0.24? I'm pretty sure 10.30 would work, having only minor changes since 15, but George uses strict "= version" dependencies, so Nitro won't let you. You could change the gemspec's in your gems repository. T. From george.moschovitis at gmail.com Thu Nov 3 02:43:45 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 3 Nov 2005 09:43:45 +0200 Subject: [Nitro] Documentation again... In-Reply-To: <4b6f054f0511021245g59df12favcaa4d7598dc87d5a@mail.gmail.com> References: <435DD769.30309@bdebl.de> <4b6f054f0511021245g59df12favcaa4d7598dc87d5a@mail.gmail.com> Message-ID: The focus for the next couple of releases are: * bugfixes, * refactoring * cleanup * documentation so I guess it is the right time to contribute :) regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu Nov 3 02:45:35 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 3 Nov 2005 09:45:35 +0200 Subject: [Nitro] Facets version conflict In-Reply-To: <4b6f054f0511021740k7cd9bfcak43782ff7466d4dd8@mail.gmail.com> References: <4b6f054f0511021740k7cd9bfcak43782ff7466d4dd8@mail.gmail.com> Message-ID: > but George uses strict "= version" dependencies, so Nitro won't let ehm, history shows that strict dependencies on facets is necessary ;-) regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From bernd at bdebl.de Thu Nov 3 03:10:18 2005 From: bernd at bdebl.de (Martin Bernd Schmeil) Date: Thu, 03 Nov 2005 09:10:18 +0100 Subject: [Nitro] Documentation again... In-Reply-To: References: <435DD769.30309@bdebl.de> <4b6f054f0511021245g59df12favcaa4d7598dc87d5a@mail.gmail.com> Message-ID: <4369C5EA.8090708@bdebl.de> Hi all, yup, currently I don't have permissions to change anything. George, would you please create a wiki account for me (or whatever is neccesary). I'd like to go under "theBernd". - Bernd From citizen428 at gentoo.org Thu Nov 3 03:10:47 2005 From: citizen428 at gentoo.org (Michael Kohl) Date: Thu, 3 Nov 2005 09:10:47 +0100 Subject: [Nitro] Facets version conflict In-Reply-To: References: Message-ID: <20051103091047.5c2d0616@localhost> On Wed, 2 Nov 2005 17:04:19 -0800 Peter Abrahamsen wrote: > I just updated the gems on a box, and tried to get spark running. > Itseems that Nitro requires facets 2005.10.15, but if the latest > version2005.10.30 is installed, then something else (nano?) loads > thatversion before facets requires 2005.10.15, resulting in a > versionconflict. I've posted the same question to the list 3 days ago, and haven't really received an answer. Trans is right though, changing the gem specification for glue does the trick. If you're using Linux, the file should be something like: /usr/lib/ruby/gems/1.8/specifications/glue-0.24.0.gemspec Cheers, Michael -- web at citizen428.net citizen428 at gentoo.org http://citizen428.net/ http://dev.gentoo.org/~citizen428/ GnuPG key: 0x90CA09E3/4D21 916E DBCE 72B8 CDC5 BD87 DE2D 91A2 90CA 09E3 -------------- 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/20051103/58c24471/attachment.bin From george.moschovitis at gmail.com Thu Nov 3 03:16:35 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 3 Nov 2005 10:16:35 +0200 Subject: [Nitro] Documentation again... In-Reply-To: <4369C5EA.8090708@bdebl.de> References: <435DD769.30309@bdebl.de> <4b6f054f0511021245g59df12favcaa4d7598dc87d5a@mail.gmail.com> <4369C5EA.8090708@bdebl.de> Message-ID: Only the homepage is 'locked' you can change the other pages. -g. On 11/3/05, Martin Bernd Schmeil wrote: > Hi all, > > yup, currently I don't have permissions to change anything. > > George, would you please create a wiki account for me (or whatever is > neccesary). I'd like to go under "theBernd". > > - Bernd > > _______________________________________________ > 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 Nov 3 04:00:06 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 3 Nov 2005 11:00:06 +0200 Subject: [Nitro] Generators Message-ID: Question: Do the two generators (gen app, gen form) work as expected in your Gem installations? Any problems? Any ideas for improvement? regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From transfire at gmail.com Thu Nov 3 07:45:26 2005 From: transfire at gmail.com (TRANS) Date: Thu, 3 Nov 2005 07:45:26 -0500 Subject: [Nitro] Facets version conflict In-Reply-To: References: <4b6f054f0511021740k7cd9bfcak43782ff7466d4dd8@mail.gmail.com> Message-ID: <4b6f054f0511030445j4f4c0ffcxcaf1624e15832163@mail.gmail.com> On 11/3/05, George Moschovitis wrote: > > but George uses strict "= version" dependencies, so Nitro won't let > > > ehm, history shows that strict dependencies on facets is necessary ;-) Very funny :-) Time and Wine.... T. From rob at motionpath.com Thu Nov 3 08:05:37 2005 From: rob at motionpath.com (Rob Pitt) Date: Thu, 03 Nov 2005 13:05:37 +0000 Subject: [Nitro] Join tables Message-ID: <436A0B21.2090204@motionpath.com> After updating to the latest nitro dev repository I ran delete_all on a class that had a join table with itself. Once all records were deleted there were numbers left over lying around in the join table. I never noticed this before because I had patched the old version to add PostgreSQL foreign key constraints on join tables. I will put these constraints back into our version here which will take care of the problem for us and possibly look at why that happens later but I thought everyone else might like a heads up. From transfire at gmail.com Thu Nov 3 08:07:40 2005 From: transfire at gmail.com (TRANS) Date: Thu, 3 Nov 2005 08:07:40 -0500 Subject: [Nitro] Generators In-Reply-To: References: Message-ID: <4b6f054f0511030507r7a0169cke3bf29131d69614a@mail.gmail.com> On 11/3/05, George Moschovitis wrote: > Question: Do the two generators (gen app, gen form) work as expected > in your Gem installations? Any problems? Any ideas for improvement? I don't like that it is Yet Another Separate Project. It is expressly tired to nitro and og, so I don't understand why you you've made another project. Also I liked 'nitrogen' better --that has a much clearer meaning. T. From george.moschovitis at gmail.com Thu Nov 3 08:08:44 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 3 Nov 2005 15:08:44 +0200 Subject: [Nitro] Join tables In-Reply-To: <436A0B21.2090204@motionpath.com> References: <436A0B21.2090204@motionpath.com> Message-ID: please send me the full patch with the foreign table constraints. This was something I planned to add for ages. regards, Geoge. On 11/3/05, Rob Pitt wrote: > After updating to the latest nitro dev repository I ran delete_all on a > class that had a join table with itself. Once all records were deleted > there were numbers left over lying around in the join table. I never > noticed this before because I had patched the old version to add > PostgreSQL foreign key constraints on join tables. I will put these > constraints back into our version here which will take care of the > problem for us and possibly look at why that happens later but I thought > everyone else might like a heads up. > _______________________________________________ > 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 Nov 3 08:12:15 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 3 Nov 2005 15:12:15 +0200 Subject: [Nitro] Generators In-Reply-To: <4b6f054f0511030507r7a0169cke3bf29131d69614a@mail.gmail.com> References: <4b6f054f0511030507r7a0169cke3bf29131d69614a@mail.gmail.com> Message-ID: The idea was to make this more generally reusable. This should evolve into a geneal ruby code generator. At the moment it is an initial release to get some feedback from the community. So if you have ideas about how to make this more generic let me know. And I f we cannot make this usable out of Nitro I 'll remove the project. regards, George. On 11/3/05, TRANS wrote: > On 11/3/05, George Moschovitis wrote: > > Question: Do the two generators (gen app, gen form) work as expected > > in your Gem installations? Any problems? Any ideas for improvement? > > I don't like that it is Yet Another Separate Project. It is expressly > tired to nitro and og, so I don't understand why you you've made > another project. Also I liked 'nitrogen' better --that has a much > clearer meaning. > > 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 transfire at gmail.com Thu Nov 3 09:00:43 2005 From: transfire at gmail.com (TRANS) Date: Thu, 3 Nov 2005 09:00:43 -0500 Subject: [Nitro] Generators In-Reply-To: References: <4b6f054f0511030507r7a0169cke3bf29131d69614a@mail.gmail.com> Message-ID: <4b6f054f0511030600o1e3ba82ctfe753d435153462b@mail.gmail.com> On 11/3/05, George Moschovitis wrote: > The idea was to make this more generally reusable. This should evolve > into a geneal ruby code generator. At the moment it is an initial > release to get some feedback from the community. So if you have ideas > about how to make this more generic let me know. And I f we cannot > make this usable out of Nitro I 'll remove the project. I think that's a fair notion, I just think you should move it out of Nitro when the time is right rather then plan too far ahead. The future is astoundingly unpredictable ;-) It's important that a new project have intrinsic value because creating a separate project entails a great deal more work and has a wider effect on the community as a whole. We have to maintain this separate package, it's directory structure, documentation, testcases, versioning etc, independently and yet in sync with it's dependencies. Moreover it takes up a namespace 'gen' in the community pool. We need another rubyforge project and all that goes with that, etc. So my humble opnion is simply "no wine before it's time": Gen might have a bright independent future ahead but she doesn't have enough intrinsic value to justify all the extra work and responsibility of a separate project at this time. T. From george.moschovitis at gmail.com Thu Nov 3 11:43:32 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 3 Nov 2005 18:43:32 +0200 Subject: [Nitro] Generators In-Reply-To: <4b6f054f0511030600o1e3ba82ctfe753d435153462b@mail.gmail.com> References: <4b6f054f0511030507r7a0169cke3bf29131d69614a@mail.gmail.com> <4b6f054f0511030600o1e3ba82ctfe753d435153462b@mail.gmail.com> Message-ID: Well, you have a point, let me think about this :) thanks for the comments, George. On 11/3/05, TRANS wrote: > On 11/3/05, George Moschovitis wrote: > > The idea was to make this more generally reusable. This should evolve > > into a geneal ruby code generator. At the moment it is an initial > > release to get some feedback from the community. So if you have ideas > > about how to make this more generic let me know. And I f we cannot > > make this usable out of Nitro I 'll remove the project. > > I think that's a fair notion, I just think you should move it out of > Nitro when the time is right rather then plan too far ahead. The > future is astoundingly unpredictable ;-) It's important that a new > project have intrinsic value because creating a separate project > entails a great deal more work and has a wider effect on the community > as a whole. We have to maintain this separate package, it's directory > structure, documentation, testcases, versioning etc, independently and > yet in sync with it's dependencies. Moreover it takes up a namespace > 'gen' in the community pool. We need another rubyforge project and all > that goes with that, etc. > > So my humble opnion is simply "no wine before it's time": Gen might > have a bright independent future ahead but she doesn't have enough > intrinsic value to justify all the extra work and responsibility of a > separate project at this time. > > 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 rob at motionpath.com Thu Nov 3 12:29:22 2005 From: rob at motionpath.com (Rob Pitt) Date: Thu, 03 Nov 2005 17:29:22 +0000 Subject: [Nitro] Join tables In-Reply-To: References: <436A0B21.2090204@motionpath.com> Message-ID: <436A48F2.6080007@motionpath.com> I have pushed a patch that does this to the motionpath darcs repo (depends on a couple of others relating to schema evolution also pushed by me today). Unfortunately it is a little slower on startup as I could not think how to get around the problem that some of the tables to be joined could be missing when the join table is made without violating the "each og entitiy manages it's own store" paradigm there seems to be. This meant that sometimes you would have to start the program twice in order to have all the foreign key constraints added. So, I came up with a solution. I added a OgManagedClass.resolve_remote_relations method that returns a list of all relations that point *to* OgManagedClass from within other classed managed by Og. Then, when making join tables, the constraints try to recursively be added to all other already known about classes that point at the current class (because now both tables will exist and the join table constraints can be made). This works fine but is not really ideal. There is a new function called create_join_table_foreign_key_constraints(klass,info) that if someone came up of a better place to put it, could still be leveraged there instead. Enjoy... George Moschovitis wrote: >please send me the full patch with the foreign table constraints. This >was something I planned to add for ages. > >regards, >Geoge. > >On 11/3/05, Rob Pitt wrote: > > >>After updating to the latest nitro dev repository I ran delete_all on a >>class that had a join table with itself. Once all records were deleted >>there were numbers left over lying around in the join table. I never >>noticed this before because I had patched the old version to add >>PostgreSQL foreign key constraints on join tables. I will put these >>constraints back into our version here which will take care of the >>problem for us and possibly look at why that happens later but I thought >>everyone else might like a heads up. >>_______________________________________________ >>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 > > From george.moschovitis at gmail.com Thu Nov 3 12:31:19 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 3 Nov 2005 19:31:19 +0200 Subject: [Nitro] Join tables In-Reply-To: <436A48F2.6080007@motionpath.com> References: <436A0B21.2090204@motionpath.com> <436A48F2.6080007@motionpath.com> Message-ID: Rob, please.... a diff would REALLy help me... -g. On 11/3/05, Rob Pitt wrote: > I have pushed a patch that does this to the motionpath darcs repo > (depends on a couple of others relating to schema evolution also pushed > by me today). > > Unfortunately it is a little slower on startup as I could not think how > to get around the problem that some of the tables to be joined could be > missing when the join table is made without violating the "each og > entitiy manages it's own store" paradigm there seems to be. This meant > that sometimes you would have to start the program twice in order to > have all the foreign key constraints added. > > So, I came up with a solution. I added a > OgManagedClass.resolve_remote_relations method that returns a list of > all relations that point *to* OgManagedClass from within other classed > managed by Og. Then, when making join tables, the constraints try to > recursively be added to all other already known about classes that point > at the current class (because now both tables will exist and the join > table constraints can be made). > > This works fine but is not really ideal. There is a new function called > create_join_table_foreign_key_constraints(klass,info) that if someone > came up of a better place to put it, could still be leveraged there instead. > > Enjoy... > > George Moschovitis wrote: > > >please send me the full patch with the foreign table constraints. This > >was something I planned to add for ages. > > > >regards, > >Geoge. > > > >On 11/3/05, Rob Pitt wrote: > > > > > >>After updating to the latest nitro dev repository I ran delete_all on a > >>class that had a join table with itself. Once all records were deleted > >>there were numbers left over lying around in the join table. I never > >>noticed this before because I had patched the old version to add > >>PostgreSQL foreign key constraints on join tables. I will put these > >>constraints back into our version here which will take care of the > >>problem for us and possibly look at why that happens later but I thought > >>everyone else might like a heads up. > >>_______________________________________________ > >>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 > > > > > > _______________________________________________ > 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 Thu Nov 3 12:37:39 2005 From: rob at motionpath.com (Rob Pitt) Date: Thu, 03 Nov 2005 17:37:39 +0000 Subject: [Nitro] Patchset Message-ID: <436A4AE3.3080200@motionpath.com> Here is our differences against the main nitro repo. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: patchset.diff Url: http://rubyforge.org/pipermail/nitro-general/attachments/20051103/9a007b5f/attachment.pl From rob at motionpath.com Thu Nov 3 12:38:24 2005 From: rob at motionpath.com (Rob Pitt) Date: Thu, 03 Nov 2005 17:38:24 +0000 Subject: [Nitro] Join tables In-Reply-To: References: <436A0B21.2090204@motionpath.com> <436A48F2.6080007@motionpath.com> Message-ID: <436A4B10.6060509@motionpath.com> I put a patchset with all mine and Chris' changes in a file and mailed them to you. George Moschovitis wrote: >Rob, please.... > >a diff would REALLy help me... > >-g. > > >On 11/3/05, Rob Pitt wrote: > > >>I have pushed a patch that does this to the motionpath darcs repo >>(depends on a couple of others relating to schema evolution also pushed >>by me today). >> >>Unfortunately it is a little slower on startup as I could not think how >>to get around the problem that some of the tables to be joined could be >>missing when the join table is made without violating the "each og >>entitiy manages it's own store" paradigm there seems to be. This meant >>that sometimes you would have to start the program twice in order to >>have all the foreign key constraints added. >> >>So, I came up with a solution. I added a >>OgManagedClass.resolve_remote_relations method that returns a list of >>all relations that point *to* OgManagedClass from within other classed >>managed by Og. Then, when making join tables, the constraints try to >>recursively be added to all other already known about classes that point >>at the current class (because now both tables will exist and the join >>table constraints can be made). >> >>This works fine but is not really ideal. There is a new function called >>create_join_table_foreign_key_constraints(klass,info) that if someone >>came up of a better place to put it, could still be leveraged there instead. >> >>Enjoy... >> >>George Moschovitis wrote: >> >> >> >>>please send me the full patch with the foreign table constraints. This >>>was something I planned to add for ages. >>> >>>regards, >>>Geoge. >>> >>>On 11/3/05, Rob Pitt wrote: >>> >>> >>> >>> >>>>After updating to the latest nitro dev repository I ran delete_all on a >>>>class that had a join table with itself. Once all records were deleted >>>>there were numbers left over lying around in the join table. I never >>>>noticed this before because I had patched the old version to add >>>>PostgreSQL foreign key constraints on join tables. I will put these >>>>constraints back into our version here which will take care of the >>>>problem for us and possibly look at why that happens later but I thought >>>>everyone else might like a heads up. >>>>_______________________________________________ >>>>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 >>> >>> >>> >>> >>_______________________________________________ >>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 > > From rob at motionpath.com Thu Nov 3 12:40:31 2005 From: rob at motionpath.com (Rob Pitt) Date: Thu, 03 Nov 2005 17:40:31 +0000 Subject: [Nitro] Join tables In-Reply-To: <436A4B10.6060509@motionpath.com> References: <436A0B21.2090204@motionpath.com> <436A48F2.6080007@motionpath.com> <436A4B10.6060509@motionpath.com> Message-ID: <436A4B8F.2030009@motionpath.com> Ok then so I mailed them to the whole list by accident... sorry :) Rob Pitt wrote: >I put a patchset with all mine and Chris' changes in a file and mailed >them to you. > >George Moschovitis wrote: > > > >>Rob, please.... >> >>a diff would REALLy help me... >> >>-g. >> >> >>On 11/3/05, Rob Pitt wrote: >> >> >> >> >>>I have pushed a patch that does this to the motionpath darcs repo >>>(depends on a couple of others relating to schema evolution also pushed >>>by me today). >>> >>>Unfortunately it is a little slower on startup as I could not think how >>>to get around the problem that some of the tables to be joined could be >>>missing when the join table is made without violating the "each og >>>entitiy manages it's own store" paradigm there seems to be. This meant >>>that sometimes you would have to start the program twice in order to >>>have all the foreign key constraints added. >>> >>>So, I came up with a solution. I added a >>>OgManagedClass.resolve_remote_relations method that returns a list of >>>all relations that point *to* OgManagedClass from within other classed >>>managed by Og. Then, when making join tables, the constraints try to >>>recursively be added to all other already known about classes that point >>>at the current class (because now both tables will exist and the join >>>table constraints can be made). >>> >>>This works fine but is not really ideal. There is a new function called >>>create_join_table_foreign_key_constraints(klass,info) that if someone >>>came up of a better place to put it, could still be leveraged there instead. >>> >>>Enjoy... >>> >>>George Moschovitis wrote: >>> >>> >>> >>> >>> >>>>please send me the full patch with the foreign table constraints. This >>>>was something I planned to add for ages. >>>> >>>>regards, >>>>Geoge. >>>> >>>>On 11/3/05, Rob Pitt wrote: >>>> >>>> >>>> >>>> >>>> >>>> >>>>>After updating to the latest nitro dev repository I ran delete_all on a >>>>>class that had a join table with itself. Once all records were deleted >>>>>there were numbers left over lying around in the join table. I never >>>>>noticed this before because I had patched the old version to add >>>>>PostgreSQL foreign key constraints on join tables. I will put these >>>>>constraints back into our version here which will take care of the >>>>>problem for us and possibly look at why that happens later but I thought >>>>>everyone else might like a heads up. >>>>>_______________________________________________ >>>>>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 >>>> >>>> >>>> >>>> >>>> >>>> >>>_______________________________________________ >>>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 >> >> >> >> > >_______________________________________________ >Nitro-general mailing list >Nitro-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/nitro-general > > From transfire at gmail.com Thu Nov 3 13:26:11 2005 From: transfire at gmail.com (TRANS) Date: Thu, 3 Nov 2005 13:26:11 -0500 Subject: [Nitro] Generators In-Reply-To: References: <4b6f054f0511030507r7a0169cke3bf29131d69614a@mail.gmail.com> <4b6f054f0511030600o1e3ba82ctfe753d435153462b@mail.gmail.com> Message-ID: <4b6f054f0511031026o6bc53f49j8a29ded9df93cd9b@mail.gmail.com> On 11/3/05, George Moschovitis wrote: > Well, you have a point, let me think about this :) > > thanks for the comments, No problem. Btw, rather then use cmdparser, check out facets' shellcommand.rb. It's new and could use some improvements, but it's very easy to use --very fluid with OOP practices. I haven;t documetned it yetm but here's a simple example: bin/mycommand: #!/usr/bin/ruby require 'facet/shellcommand' class MyCommand < ShellCommand # Options # verbose mode def __verbose ; $VERBOSE = true ; end alias_method :_V, :__verbose # option to display version def __version ; version ; end alias_method :_v, :__version # option to display help def __help ; help ; end alias_method :_h, :__help # Commands # default action def default help end # display version def version puts "MyCommand v.1" exit 0 end # display help def help puts "Help!" exit 0 end def dosomething if $VERBOSE puts "Doing it loudly!" else puts "Doing it." end end end MyCommand.go The on the command line: > mycommand dosomething Doing it. > mycommand -V dosomething Doing it loudly! > mycommand --verbose dosomething Doing it loudly! > mycommand help Help? > mycommand Help? so on. T. From rainhead at gmail.com Thu Nov 3 20:43:34 2005 From: rainhead at gmail.com (Peter Abrahamsen) Date: Thu, 3 Nov 2005 17:43:34 -0800 Subject: [Nitro] Generators In-Reply-To: References: Message-ID: It's not installing a binary in my path via gem. IIRC nitro used to install nitrogen in an accessible place, like /usr/bin. This is on Gentoo. No errors were printed during install. P On Nov 3, 2005, at 1:00 AM, George Moschovitis wrote: > Question: Do the two generators (gen app, gen form) work as expected > in your Gem installations? Any problems? Any ideas for improvement? -------------- 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/20051103/2fc82a45/attachment.bin From george.moschovitis at gmail.com Fri Nov 4 01:59:47 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 4 Nov 2005 08:59:47 +0200 Subject: [Nitro] Join tables In-Reply-To: <436A4B8F.2030009@motionpath.com> References: <436A0B21.2090204@motionpath.com> <436A48F2.6080007@motionpath.com> <436A4B10.6060509@motionpath.com> <436A4B8F.2030009@motionpath.com> Message-ID: thanks. On 11/3/05, Rob Pitt wrote: > Ok then so I mailed them to the whole list by accident... sorry :) > Rob Pitt wrote: > > >I put a patchset with all mine and Chris' changes in a file and mailed > >them to you. > > > >George Moschovitis wrote: > > > > > > > >>Rob, please.... > >> > >>a diff would REALLy help me... > >> > >>-g. > >> > >> > >>On 11/3/05, Rob Pitt wrote: > >> > >> > >> > >> > >>>I have pushed a patch that does this to the motionpath darcs repo > >>>(depends on a couple of others relating to schema evolution also pushed > >>>by me today). > >>> > >>>Unfortunately it is a little slower on startup as I could not think how > >>>to get around the problem that some of the tables to be joined could be > >>>missing when the join table is made without violating the "each og > >>>entitiy manages it's own store" paradigm there seems to be. This meant > >>>that sometimes you would have to start the program twice in order to > >>>have all the foreign key constraints added. > >>> > >>>So, I came up with a solution. I added a > >>>OgManagedClass.resolve_remote_relations method that returns a list of > >>>all relations that point *to* OgManagedClass from within other classed > >>>managed by Og. Then, when making join tables, the constraints try to > >>>recursively be added to all other already known about classes that point > >>>at the current class (because now both tables will exist and the join > >>>table constraints can be made). > >>> > >>>This works fine but is not really ideal. There is a new function called > >>>create_join_table_foreign_key_constraints(klass,info) that if someone > >>>came up of a better place to put it, could still be leveraged there instead. > >>> > >>>Enjoy... > >>> > >>>George Moschovitis wrote: > >>> > >>> > >>> > >>> > >>> > >>>>please send me the full patch with the foreign table constraints. This > >>>>was something I planned to add for ages. > >>>> > >>>>regards, > >>>>Geoge. > >>>> > >>>>On 11/3/05, Rob Pitt wrote: > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>>>After updating to the latest nitro dev repository I ran delete_all on a > >>>>>class that had a join table with itself. Once all records were deleted > >>>>>there were numbers left over lying around in the join table. I never > >>>>>noticed this before because I had patched the old version to add > >>>>>PostgreSQL foreign key constraints on join tables. I will put these > >>>>>constraints back into our version here which will take care of the > >>>>>problem for us and possibly look at why that happens later but I thought > >>>>>everyone else might like a heads up. > >>>>>_______________________________________________ > >>>>>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 > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>_______________________________________________ > >>>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 > >> > >> > >> > >> > > > >_______________________________________________ > >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 Fri Nov 4 05:03:03 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 4 Nov 2005 12:03:03 +0200 Subject: [Nitro] Patches Message-ID: Dear devs, when sending me dacrs patch bundles, please zip them, because gmail seems to inline the text attachments. thanks in advance, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From rob at motionpath.com Fri Nov 4 05:49:39 2005 From: rob at motionpath.com (Rob Pitt) Date: Fri, 04 Nov 2005 10:49:39 +0000 Subject: [Nitro] Patches In-Reply-To: References: Message-ID: <436B3CC3.1050204@motionpath.com> Does g-mail even allow zip attachments? George Moschovitis wrote: >Dear devs, > >when sending me dacrs patch bundles, please zip them, because gmail >seems to inline the text attachments. > >thanks in advance, >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 > > From george.moschovitis at gmail.com Fri Nov 4 05:53:30 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 4 Nov 2005 12:53:30 +0200 Subject: [Nitro] Patches In-Reply-To: <436B3CC3.1050204@motionpath.com> References: <436B3CC3.1050204@motionpath.com> Message-ID: yeah, only executables are not allowed. -g. On 11/4/05, Rob Pitt wrote: > Does g-mail even allow zip attachments? > > George Moschovitis wrote: > > >Dear devs, > > > >when sending me dacrs patch bundles, please zip them, because gmail > >seems to inline the text attachments. > > > >thanks in advance, > >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 > > > > > > _______________________________________________ > 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 Nov 4 06:38:31 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 4 Nov 2005 13:38:31 +0200 Subject: [Nitro] Fwd: patches mk2 In-Reply-To: References: <436B3D0D.2000701@motionpath.com> Message-ID: ---------- Forwarded message ---------- From: George Moschovitis Date: Nov 4, 2005 1:38 PM Subject: Re: patches mk2 To: Rob Pitt Rob, I need to ask you a favour, please follow the coding conventions ffor example: # Here comes a comment def method ... end instead of: #== # Here comes a comment #== def method ... end thanks, -g. On 11/4/05, Rob Pitt wrote: > Here is our last patchset compressed with bzip2 (if I remember rightly > gmail doesn't support zip files?) > > > -- 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 rob at motionpath.com Fri Nov 4 06:43:32 2005 From: rob at motionpath.com (Rob Pitt) Date: Fri, 04 Nov 2005 11:43:32 +0000 Subject: [Nitro] Fwd: patches mk2 In-Reply-To: References: <436B3D0D.2000701@motionpath.com> Message-ID: <436B4964.8070707@motionpath.com> Sorry. For some reason I was under the impression we we trying to add more verbose rdoc style commenting. I will stick to the single line method in future. George Moschovitis wrote: >---------- Forwarded message ---------- >From: George Moschovitis >Date: Nov 4, 2005 1:38 PM >Subject: Re: patches mk2 >To: Rob Pitt > > >Rob, > >I need to ask you a favour, please follow the coding conventions > >ffor example: > ># Here comes a comment > >def method >... >end > > >instead of: > >#== ># Here comes a comment >#== >def method >... >end > > >thanks, >-g. > > > >On 11/4/05, Rob Pitt wrote: > > >>Here is our last patchset compressed with bzip2 (if I remember rightly >>gmail doesn't support zip files?) >> >> >> >> >> > > >-- >http://www.gmosx.com >http://www.navel.gr >http://www.nitrohq.com > > >-- >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 > > From george.moschovitis at gmail.com Fri Nov 4 06:45:40 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 4 Nov 2005 13:45:40 +0200 Subject: [Nitro] Fwd: patches mk2 In-Reply-To: <436B4964.8070707@motionpath.com> References: <436B3D0D.2000701@motionpath.com> <436B4964.8070707@motionpath.com> Message-ID: No you misunderstood me... multiple line comments are great and needed. Just add an empty line between the comment and the code. And no == in the begining and end of the comment. You can of course use =, ==, === etc to format the comment. regards, George. On 11/4/05, Rob Pitt wrote: > Sorry. For some reason I was under the impression we we trying to add > more verbose rdoc style commenting. I will stick to the single line > method in future. > > George Moschovitis wrote: > > >---------- Forwarded message ---------- > >From: George Moschovitis > >Date: Nov 4, 2005 1:38 PM > >Subject: Re: patches mk2 > >To: Rob Pitt > > > > > >Rob, > > > >I need to ask you a favour, please follow the coding conventions > > > >ffor example: > > > ># Here comes a comment > > > >def method > >... > >end > > > > > >instead of: > > > >#== > ># Here comes a comment > >#== > >def method > >... > >end > > > > > >thanks, > >-g. > > > > > > > >On 11/4/05, Rob Pitt wrote: > > > > > >>Here is our last patchset compressed with bzip2 (if I remember rightly > >>gmail doesn't support zip files?) > >> > >> > >> > >> > >> > > > > > >-- > >http://www.gmosx.com > >http://www.navel.gr > >http://www.nitrohq.com > > > > > >-- > >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 > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From rob at motionpath.com Fri Nov 4 08:54:44 2005 From: rob at motionpath.com (Rob Pitt) Date: Fri, 04 Nov 2005 13:54:44 +0000 Subject: [Nitro] STI relationships Message-ID: <436B6824.30107@motionpath.com> I have just noticed if you do not explicitly set the field name in has_many relationship STI classes make an incorrect assumption about the remote field name. A fix is to change line 35 of has_many.rb to: self[:owner_singular_name] = (owner_class.schema_inheritance_child? ? owner_class.schema_inheritance_root_class : owner_class But this seems like a dirty hack and I wondered if anyone thought there was a better way. From george.moschovitis at gmail.com Sat Nov 5 05:25:38 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 5 Nov 2005 12:25:38 +0200 Subject: [Nitro] nitro-repository mailing list Message-ID: Dear devs, I just created a new mailing list: nitro-repository at rubyforge.org subscribe to this list if you want to saty updated on the latest developments in the unstable version (codenamed: Glycerin). I suggest that all commiters join this list. regards, George PS: please report any problems. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From chris at motionpath.com Mon Nov 7 12:18:12 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Mon, 7 Nov 2005 17:18:12 +0000 Subject: [Nitro] new morpher code ... and DOCTYPE's with the compiler Message-ID: <55A1407E-0C41-484B-BCB4-0D7DBCF2B461@motionpath.com> Hey all: first: Should we be posting ideas/problems about Glycerin in the new repo mailing list or is that just going to be used as a kind of release and update's feed? anyway... since the list is quite quiet at the moment I'm sure no one will shout at me for posting in the wrong place today :) The new, improved, morphing code now strips out DOCTYPE's (which puts IE into 'insane-mode'). Other bits of compiler code have done this in the past too I believe. What I'd like to ask is ...Who thinks it would be useful to have a DOCTYPE compiler module (every project should have one) and it seems like it could make a nice and simple addition to the compiler pipeline like: Compiler.setup_template_transform do |template| template = Template.transform(template) template = Morphing.transform(template) template = Doctype.add(template, XHTML_STRICT) end might not even need to be an add method?, just a useful list of doctype constants? any thoughts? ... I'll make something up if anyone else thinks this could be useful. Chris Farmiloe Design & Development. Motionpath Digital Media Ltd. St Georges road, Brighton, BN2 1ED. Office: 01273 608708 | Mobile: 07791 179481 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051107/206cc593/attachment.html From george.moschovitis at gmail.com Mon Nov 7 12:21:07 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 7 Nov 2005 19:21:07 +0200 Subject: [Nitro] new morpher code ... and DOCTYPE's with the compiler In-Reply-To: <55A1407E-0C41-484B-BCB4-0D7DBCF2B461@motionpath.com> References: <55A1407E-0C41-484B-BCB4-0D7DBCF2B461@motionpath.com> Message-ID: > first: Should we be posting ideas/problems about Glycerin in the new repo > mailing list > or is that just going to be used as a kind of release and update's feed? no, post ideas in the nitro-general list please, the other list is just a feed. -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Mon Nov 7 12:22:13 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 7 Nov 2005 19:22:13 +0200 Subject: [Nitro] new morpher code ... and DOCTYPE's with the compiler In-Reply-To: <55A1407E-0C41-484B-BCB4-0D7DBCF2B461@motionpath.com> References: <55A1407E-0C41-484B-BCB4-0D7DBCF2B461@motionpath.com> Message-ID: > might not even need to be an add method?, just a useful list of doctype > constants? > any thoughts? ... I'll make something up if anyone else thinks this could be > useful. this looks nice, go for it :) -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From james_b at neurogami.com Mon Nov 7 12:33:12 2005 From: james_b at neurogami.com (James Britt) Date: Mon, 07 Nov 2005 10:33:12 -0700 Subject: [Nitro] new morpher code ... and DOCTYPE's with the compiler In-Reply-To: <55A1407E-0C41-484B-BCB4-0D7DBCF2B461@motionpath.com> References: <55A1407E-0C41-484B-BCB4-0D7DBCF2B461@motionpath.com> Message-ID: <436F8FD8.3000908@neurogami.com> Chris Farmiloe wrote: > > Hey all: > > first: Should we be posting ideas/problems about Glycerin in the new > repo mailing list > or is that just going to be used as a kind of release and update's feed? > > anyway... since the list is quite quiet at the moment I'm sure no one > will shout at me > for posting in the wrong place today :) One question that came to mind when the new list was announced was, "Why?" Is the traffic here so great, or discussion of Glycerin so off-topic, that there needs to be two places for Nitro dev talk? James From george.moschovitis at gmail.com Mon Nov 7 12:34:27 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 7 Nov 2005 19:34:27 +0200 Subject: [Nitro] new morpher code ... and DOCTYPE's with the compiler In-Reply-To: <436F8FD8.3000908@neurogami.com> References: <55A1407E-0C41-484B-BCB4-0D7DBCF2B461@motionpath.com> <436F8FD8.3000908@neurogami.com> Message-ID: nitro-repository is a read-only list where patch application messages from darcs are automatically posted. It is only of interest for the people that submit patches. -g. On 11/7/05, James Britt wrote: > Chris Farmiloe wrote: > > > > Hey all: > > > > first: Should we be posting ideas/problems about Glycerin in the new > > repo mailing list > > or is that just going to be used as a kind of release and update's feed? > > > > anyway... since the list is quite quiet at the moment I'm sure no one > > will shout at me > > for posting in the wrong place today :) > > > One question that came to mind when the new list was announced was, > "Why?" Is the traffic here so great, or discussion of Glycerin so > off-topic, that there needs to be two places for Nitro dev talk? > > > James > _______________________________________________ > 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 Nov 7 12:35:02 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 7 Nov 2005 19:35:02 +0200 Subject: [Nitro] new morpher code ... and DOCTYPE's with the compiler In-Reply-To: References: <55A1407E-0C41-484B-BCB4-0D7DBCF2B461@motionpath.com> <436F8FD8.3000908@neurogami.com> Message-ID: Glycerin will be discussed in the nitro-general list like everything else related to Nitro. -g. On 11/7/05, George Moschovitis wrote: > nitro-repository is a read-only list where patch application messages > from darcs are automatically posted. It is only of interest for the > people that submit patches. > > -g. > > > On 11/7/05, James Britt wrote: > > Chris Farmiloe wrote: > > > > > > Hey all: > > > > > > first: Should we be posting ideas/problems about Glycerin in the new > > > repo mailing list > > > or is that just going to be used as a kind of release and update's feed? > > > > > > anyway... since the list is quite quiet at the moment I'm sure no one > > > will shout at me > > > for posting in the wrong place today :) > > > > > > One question that came to mind when the new list was announced was, > > "Why?" Is the traffic here so great, or discussion of Glycerin so > > off-topic, that there needs to be two places for Nitro dev talk? > > > > > > James > > _______________________________________________ > > 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 > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From james_b at neurogami.com Mon Nov 7 13:51:26 2005 From: james_b at neurogami.com (James Britt) Date: Mon, 07 Nov 2005 11:51:26 -0700 Subject: [Nitro] new morpher code ... and DOCTYPE's with the compiler In-Reply-To: References: <55A1407E-0C41-484B-BCB4-0D7DBCF2B461@motionpath.com> <436F8FD8.3000908@neurogami.com> Message-ID: <436FA22E.5000302@neurogami.com> George Moschovitis wrote: > Glycerin will be discussed in the nitro-general list like everything > else related to Nitro. > > -g. Ah. Thanks. James From epiperak at softlab.ece.ntua.gr Mon Nov 7 20:20:45 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 8 Nov 2005 03:20:45 +0200 (EET) Subject: [Nitro] new morpher code ... and DOCTYPE's with the compiler In-Reply-To: <436F8FD8.3000908@neurogami.com> References: <55A1407E-0C41-484B-BCB4-0D7DBCF2B461@motionpath.com> <436F8FD8.3000908@neurogami.com> Message-ID: > One question that came to mind when the new list was announced was, > "Why?" Is the traffic here so great, or discussion of Glycerin so > off-topic, that there needs to be two places for Nitro dev talk? I agreek ;-) with James... 2 lists = 2 filters on my mail client reader.. > > > James 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 Mon Nov 7 23:53:07 2005 From: james_b at neurogami.com (James Britt) Date: Mon, 07 Nov 2005 21:53:07 -0700 Subject: [Nitro] Trapping unhandled URLs Message-ID: <43702F33.3030000@neurogami.com> I'm getting ready to deploy a public Nitro app, and would like it to be as robust as possible. Right now, if one calls int a bogus URL, it displays an error, like this: Path: /sddsf undefined method `sddsf_action' for # Click here to reload. Click here to go to the referrer or the home page. I'd like to ensure that URLs that do not map to some sensible action are simply rendered as a call to the main index page, but do not know how to do this. Any suggestions? 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 Tue Nov 8 00:09:55 2005 From: james_b at neurogami.com (James Britt) Date: Mon, 07 Nov 2005 22:09:55 -0700 Subject: [Nitro] Trapping unhandled URLs In-Reply-To: <43702F33.3030000@neurogami.com> References: <43702F33.3030000@neurogami.com> Message-ID: <43703323.6080204@neurogami.com> James Britt wrote: > I'm getting ready to deploy a public Nitro app, and would like it to be > as robust as possible. Right now, if one calls int a bogus URL, it > displays an error, like this: > > > Path: /sddsf > undefined method `sddsf_action' for # > Click here to reload. > Click here to go to the referrer or the home page. > > I'd like to ensure that URLs that do not map to some sensible action are > simply rendered as a call to the main index page, but do not know how > to do this. > > Any suggestions? Here's what I figured out: def error render 'index' end in the controller raising the exception Thanks, James From george.moschovitis at gmail.com Tue Nov 8 03:14:15 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 8 Nov 2005 10:14:15 +0200 Subject: [Nitro] Trapping unhandled URLs In-Reply-To: <43703323.6080204@neurogami.com> References: <43702F33.3030000@neurogami.com> <43703323.6080204@neurogami.com> Message-ID: > def error > render 'index' > end Exactly :-) Can't wait to see this public application ;-) regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From dalegard at gmail.com Tue Nov 8 22:55:35 2005 From: dalegard at gmail.com (David Legard) Date: Wed, 9 Nov 2005 10:55:35 +0700 Subject: [Nitro] Weird one, probably simple Message-ID: <85fdb3b30511081955g45a463b1gf94d5c29bd00db7f@mail.gmail.com> I have been happily running Og on one system, and had to move my application to a new system. Rubygems installed Og 0.24.0 rather than 0.23.0 as on the previous system. Now, I run the test. require 'rubygems' require_gem 'og' db = Og.setup( #:destroy => false, :store => :mysql, :name => 'database', :user => 'myuser', :password => 'mypassword' ) And I get the error: ogtest.rb:3: uninitialized constant Og (NameError). What the.....? David Legard. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051108/6e30c320/attachment.html From george.moschovitis at gmail.com Wed Nov 9 03:21:29 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 9 Nov 2005 10:21:29 +0200 Subject: [Nitro] Weird one, probably simple In-Reply-To: <85fdb3b30511081955g45a463b1gf94d5c29bd00db7f@mail.gmail.com> References: <85fdb3b30511081955g45a463b1gf94d5c29bd00db7f@mail.gmail.com> Message-ID: why dont you try a simple: require 'og' I run my apps like this: ruby -rubygems app.rb or even better add -rubygems to RUBYOPT -g. On 11/9/05, David Legard wrote: > I have been happily running Og on one system, and had to move my application > to a new system. > > Rubygems installed Og 0.24.0 rather than 0.23.0 as on the previous system. > > Now, I run the test. > > require 'rubygems' > require_gem 'og' > db = Og.setup( > #:destroy => false, > :store => :mysql, > :name => 'database', > :user => 'myuser', > :password => 'mypassword' > ) > > And I get the error: ogtest.rb:3: uninitialized constant Og (NameError). > > What the.....? > > David Legard. > _______________________________________________ > 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 Nov 9 12:55:13 2005 From: tim at keow.org (Tim Larson) Date: Wed, 9 Nov 2005 17:55:13 +0000 Subject: [Nitro] request mangling Message-ID: <20051109175513.GA13228@localhost> I do not understand the request object... I ask for the url http://127.0.0.1:9999/report and it makes "REQUEST_URI"=>"report/" and "PATH_INFO"=>"/report/index.html" Where is it coming up with the trailing "/" and from that the trailing "index.html"? Nitro/webrick also somehow also knows the truth, because it output a debug message: Rendering '/report'. Anybody have clues about this? (Where to get the real request url "/report" and why it is stripping the leading "/" and making up its own trailing "/" and "index.html"?) --Tim Larson From james_b at neurogami.com Wed Nov 9 13:13:57 2005 From: james_b at neurogami.com (James Britt) Date: Wed, 09 Nov 2005 11:13:57 -0700 Subject: [Nitro] request mangling In-Reply-To: <20051109175513.GA13228@localhost> References: <20051109175513.GA13228@localhost> Message-ID: <43723C65.4000303@neurogami.com> Tim Larson wrote: > I do not understand the request object... > I ask for the url http://127.0.0.1:9999/report and it makes > "REQUEST_URI"=>"report/" and "PATH_INFO"=>"/report/index.html" > Where is it coming up with the trailing "/" and from that the > trailing "index.html"? .htaccess or some other web server URL rewriting? 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 Nov 9 14:00:54 2005 From: tim at keow.org (Tim Larson) Date: Wed, 9 Nov 2005 19:00:54 +0000 Subject: [Nitro] request mangling In-Reply-To: <43723C65.4000303@neurogami.com> References: <20051109175513.GA13228@localhost> <43723C65.4000303@neurogami.com> Message-ID: <20051109190054.GB13228@localhost> On Wed, Nov 09, 2005 at 11:13:57AM -0700, James Britt wrote: > Tim Larson wrote: > > I do not understand the request object... > > I ask for the url http://127.0.0.1:9999/report and it makes > > "REQUEST_URI"=>"report/" and "PATH_INFO"=>"/report/index.html" > > Where is it coming up with the trailing "/" and from that the > > trailing "index.html"? > > .htaccess or some other web server URL rewriting? No, just using nitro-out-of-the-box with its built-in integration with webrick (just type "run.rb" to start). So unless that is doing something funny... --Tim Larson From akonsu at gmail.com Wed Nov 9 16:16:57 2005 From: akonsu at gmail.com (akonsu) Date: Wed, 9 Nov 2005 13:16:57 -0800 Subject: [Nitro] request mangling In-Reply-To: <20051109190054.GB13228@localhost> References: <20051109175513.GA13228@localhost> <43723C65.4000303@neurogami.com> <20051109190054.GB13228@localhost> Message-ID: I recall I have seen code in either nitro or the related gems where it adds "/index.html". just grep for "index.html". i think it has something to do with nitro trying to decide which file to serve if none is given. konstantin 2005/11/9, Tim Larson : > On Wed, Nov 09, 2005 at 11:13:57AM -0700, James Britt wrote: > > Tim Larson wrote: > > > I do not understand the request object... > > > I ask for the url http://127.0.0.1:9999/report and it makes > > > "REQUEST_URI"=>"report/" and "PATH_INFO"=>"/report/index.html" > > > Where is it coming up with the trailing "/" and from that the > > > trailing "index.html"? > > > > .htaccess or some other web server URL rewriting? > > No, just using nitro-out-of-the-box with its built-in integration > with webrick (just type "run.rb" to start). > So unless that is doing something funny... > > --Tim Larson > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From james_b at neurogami.com Wed Nov 9 17:41:10 2005 From: james_b at neurogami.com (James Britt) Date: Wed, 09 Nov 2005 15:41:10 -0700 Subject: [Nitro] request mangling In-Reply-To: References: <20051109175513.GA13228@localhost> <43723C65.4000303@neurogami.com> <20051109190054.GB13228@localhost> Message-ID: <43727B06.6040200@neurogami.com> akonsu wrote: > I recall I have seen code in either nitro or the related gems where it > adds "/index.html". just grep for "index.html". i think it has > something to do with nitro trying to decide which file to serve if > none is given. > Indeed. My copy of webrick.rb, from Nitro 0.24.0, has this as line 161 # Try to rewrite the path to a filename. def rewrite(req) if req.path == '/' req.instance_variable_set(:@path_info, '/index.html') elsif req.path =~ /^([^.]+)$/ req.instance_variable_set(:@path_info, "#{$1}/index.html") end end # Rewrite back to the original path. def unrewrite(req) if req.path == '/' req.instance_variable_set(:@path_info, '/') elsif req.path =~ /^([^.]+).html$/ req.instance_variable_set(:@path_info, $1) end end end This strikes me a Bad Thing, something that should be handled at the application level. Compulsory rewrites leave a bad taste in my mouth. -- 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 Nov 10 05:06:41 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 10 Nov 2005 12:06:41 +0200 Subject: [Nitro] request mangling In-Reply-To: <43727B06.6040200@neurogami.com> References: <20051109175513.GA13228@localhost> <43723C65.4000303@neurogami.com> <20051109190054.GB13228@localhost> <43727B06.6040200@neurogami.com> Message-ID: > This strikes me a Bad Thing, something that should be handled at the > application level. Compulsory rewrites leave a bad taste in my mouth. Ok James, do you have any suggestions, how to improve this? I 'll try to think of something better my self, nut I would like some input. thanks, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From james_b at neurogami.com Thu Nov 10 11:16:33 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 10 Nov 2005 09:16:33 -0700 Subject: [Nitro] request mangling In-Reply-To: References: <20051109175513.GA13228@localhost> <43723C65.4000303@neurogami.com> <20051109190054.GB13228@localhost> <43727B06.6040200@neurogami.com> Message-ID: <43737261.5080904@neurogami.com> George Moschovitis wrote: >>This strikes me a Bad Thing, something that should be handled at the >>application level. Compulsory rewrites leave a bad taste in my mouth. > > > Ok James, do you have any suggestions, how to improve this? I 'll try > to think of something better my self, nut I would like some input. Oh, well, it's so much easier to gripe than patch. :) No, I don't have anything concrete to offer, though some form of DirectoryIndex for Nitro feature would be nice. It seems that this 'rewrite to index.html' only happens in WEBrick; is this because other runners have their own means for URL rewriting and/or setting the directory index? A nice syntax might allow for passing this value into the runner in run.rb, but then it may have to play nice with all adapters, not just WEBrick. James Britt From bryan.a.soto at gmail.com Thu Nov 10 19:26:21 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Thu, 10 Nov 2005 16:26:21 -0800 Subject: [Nitro] request mangling In-Reply-To: <43737261.5080904@neurogami.com> References: <20051109175513.GA13228@localhost> <43723C65.4000303@neurogami.com> <20051109190054.GB13228@localhost> <43727B06.6040200@neurogami.com> <43737261.5080904@neurogami.com> Message-ID: The rewrite seems to be performed solely to check whether there is a static file to serve. I'm not sure as to correctness, but as a practical matter, the problem seems to be unrewrite isn't properly cleaning up after itself. Attached patch against nitro/adapter/webrick.rb (Version 0.24.0) seems to fix that and the OPs other problem of 'report/' vs '/report'. At least it worked for me on linux-2.6 w/ ruby-1.8.3. bryan On 11/10/05, James Britt wrote: > > George Moschovitis wrote: > >>This strikes me a Bad Thing, something that should be handled at the > >>application level. Compulsory rewrites leave a bad taste in my mouth. > > > > > > Ok James, do you have any suggestions, how to improve this? I 'll try > > to think of something better my self, nut I would like some input. > > Oh, well, it's so much easier to gripe than patch. > > :) > > > No, I don't have anything concrete to offer, though some form of > DirectoryIndex for Nitro feature would be nice. > > It seems that this 'rewrite to index.html' only happens in WEBrick; is > this because other runners have their own means for URL rewriting and/or > setting the directory index? > > A nice syntax might allow for passing this value into the runner in > run.rb, but then it may have to play nice with all adapters, not just > WEBrick. > > > > James Britt > _______________________________________________ > 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/20051110/5ac7c914/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: webrick.patch Type: text/x-patch Size: 1290 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051110/5ac7c914/attachment.bin From george.moschovitis at gmail.com Fri Nov 11 03:36:44 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 11 Nov 2005 10:36:44 +0200 Subject: [Nitro] request mangling In-Reply-To: References: <20051109175513.GA13228@localhost> <43723C65.4000303@neurogami.com> <20051109190054.GB13228@localhost> <43727B06.6040200@neurogami.com> <43737261.5080904@neurogami.com> Message-ID: Thanks Bryan, I will have a look at this. -g. On 11/11/05, Bryan Soto wrote: > The rewrite seems to be performed solely to check whether there is a static > file to serve. > > I'm not sure as to correctness, but as a practical matter, the problem > seems to be unrewrite isn't properly cleaning up after itself. > > Attached patch against nitro/adapter/webrick.rb (Version 0.24.0) seems to > fix that and the OPs other problem of 'report/' vs '/report'. At least it > worked for me on linux-2.6 w/ ruby-1.8.3. > > bryan > > > On 11/10/05, James Britt wrote: > > > > George Moschovitis wrote: > > >>This strikes me a Bad Thing, something that should be handled at the > > >>application level. Compulsory rewrites leave a bad taste in my mouth. > > > > > > > > > Ok James, do you have any suggestions, how to improve this? I 'll try > > > to think of something better my self, nut I would like some input. > > > > Oh, well, it's so much easier to gripe than patch. > > > > :) > > > > > > No, I don't have anything concrete to offer, though some form of > > DirectoryIndex for Nitro feature would be nice. > > > > It seems that this 'rewrite to index.html' only happens in WEBrick; is > > this because other runners have their own means for URL rewriting and/or > > setting the directory index? > > > > A nice syntax might allow for passing this value into the runner in > > run.rb, but then it may have to play nice with all adapters, not just > > WEBrick. > > > > > > > > James Britt > > _______________________________________________ > > 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 Fri Nov 11 03:41:44 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 11 Nov 2005 10:41:44 +0200 Subject: [Nitro] Security problems Message-ID: Dear devs, I am wondering if anyone has found (or can find) any security problems with Nitro. Moreover, If anyone can suggest any common security measures that could be wrapped in a controller helper/aspect I would like to know. Even urls for (authoritive) articles regarding web site security would be helpful. Thanks in advance, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From epiperak at softlab.ece.ntua.gr Fri Nov 11 04:47:05 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Fri, 11 Nov 2005 11:47:05 +0200 (EET) Subject: [Nitro] Security problems In-Reply-To: References: Message-ID: > Dear devs, > > I am wondering if anyone has found (or can find) any security problems > with Nitro. Moreover, If anyone can suggest any common security > measures that could be wrapped in a controller helper/aspect I would > like to know. Even urls for (authoritive) articles regarding web site > security would be helpful. I am not sure if this can be done already, but I would like the path to be hidden. I would like to show only the main page URI. I think it is a security problem if a user sees things like http://myhost.com/project/1 The users might type /2 by himself... > > Thanks in advance, > 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 george.moschovitis at gmail.com Fri Nov 11 05:01:04 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 11 Nov 2005 12:01:04 +0200 Subject: [Nitro] Security problems In-Reply-To: References: Message-ID: naah... I believe this is 'not a good thing'. You should have a proper authorization system to prevent things like that ;-) ie project/2 should be owned be a specific user. the new constrained/scoped queries feature of Og 0.25.0 are *very* helpful here, small example: Project.with_scope(:condition => "user='gmosx'") do projects = Project.all # returns projects of gmosx project = Project[id] # only returns if the id project belobgs to gmosx ... end and stuff like that... -g. On 11/11/05, Emmanuel Piperakis wrote: > > Dear devs, > > > > I am wondering if anyone has found (or can find) any security problems > > with Nitro. Moreover, If anyone can suggest any common security > > measures that could be wrapped in a controller helper/aspect I would > > like to know. Even urls for (authoritive) articles regarding web site > > security would be helpful. > > I am not sure if this can be done already, but I would like the path to be > hidden. I would like to show only the main page URI. I think it is a > security problem if a user sees things like http://myhost.com/project/1 > > The users might type /2 by himself... > > > > > Thanks in advance, > > 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} > _______________________________________________ > 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 m.fellinger at gmail.com Fri Nov 11 05:05:30 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Fri, 11 Nov 2005 11:05:30 +0100 Subject: [Nitro] Security problems In-Reply-To: References: Message-ID: <200511111105.35872.m.fellinger@gmail.com> Yeah, but that would be only the old security_by_obscurity approach - you have to apply rules anyway what every user is allowed to see, and when you've got it right, you don't have to worry about users trying to visit some pages they shouldn't see. but based on some thought about it, i would suggest a general security-system (i remember someone is building something in that direction already) like nitro-auth aimed to be. So implementing a security-layer in nitro/og that is based on permissions, levels, roles - maybe even access-times/frequenzy (between 8-9pm | 10 pageviews/minute) - bundling Og-objects with the security, so that one must have a specific aspect (everyone || >lvl9 || admin) to gain access to a specific object. this would help to apply a very application-specific security. The main-problem i see is the linkage-gap between the user-session and Og, since og almost never knows exactly what it is doing for whom and so doesn't cares. ok, this was just a quick overview about my first thougts on this topic, maybe i'll add a bit more later on. so long... manveru Am Freitag 11 November 2005 10:47 schrieb Emmanuel Piperakis: > > Dear devs, > > > > I am wondering if anyone has found (or can find) any security problems > > with Nitro. Moreover, If anyone can suggest any common security > > measures that could be wrapped in a controller helper/aspect I would > > like to know. Even urls for (authoritive) articles regarding web site > > security would be helpful. > > I am not sure if this can be done already, but I would like the path to be > hidden. I would like to show only the main page URI. I think it is a > security problem if a user sees things like http://myhost.com/project/1 > > The users might type /2 by himself... > > > Thanks in advance, > > 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} > _______________________________________________ > 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/20051111/0fd12d90/attachment.bin From george.moschovitis at gmail.com Fri Nov 11 05:22:22 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 11 Nov 2005 12:22:22 +0200 Subject: [Nitro] Many Thanks Message-ID: Dear devs, I would like to publicly thank Emanuel, for his generous monetary donation to the Nitro project. This kind of act clearly demonstrates that Nitro is useful and important for other people and gives us more reasons to work harder to improve the framework. Moreover, Emanuel is one of the first people (outside of Navel) to successfully complete a commercial application powered by Nitro. Well done! Cool Nitro powered web applications are another great motivation for the development team! George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Fri Nov 11 05:28:30 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 11 Nov 2005 12:28:30 +0200 Subject: [Nitro] Security problems In-Reply-To: <200511111105.35872.m.fellinger@gmail.com> References: <200511111105.35872.m.fellinger@gmail.com> Message-ID: > but based on some thought about it, i would suggest a general security-system this outside of the scope of Nitro. This can be a Nitro related project like nitro-auth. Different people have different opinions on how to implement this. Nitro should aim to be a low level framework. -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Fri Nov 11 06:51:32 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 11 Nov 2005 13:51:32 +0200 Subject: [Nitro] Security problems In-Reply-To: References: Message-ID: > Project.with_scope(:condition => "user='gmosx'") do > projects = Project.all # returns projects of gmosx > project = Project[id] # only returns if the id project belobgs to gmosx > ... > end or alternatively (0.25.0 again): projects = User[uid].projects.find(...) instead of projects = Project.find(..) or even (0.25.0): projects = Project.find_by_XXXX_and_user(..., 'gmosx') -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From james_b at neurogami.com Fri Nov 11 09:57:25 2005 From: james_b at neurogami.com (James Britt) Date: Fri, 11 Nov 2005 07:57:25 -0700 Subject: [Nitro] Security problems In-Reply-To: References: Message-ID: <4374B155.2060401@neurogami.com> Emmanuel Piperakis wrote: >>Dear devs, >> >>I am wondering if anyone has found (or can find) any security problems >>with Nitro. Moreover, If anyone can suggest any common security >>measures that could be wrapped in a controller helper/aspect I would >>like to know. Even urls for (authoritive) articles regarding web site >>security would be helpful. > > > I am not sure if this can be done already, but I would like the path to be > hidden. I would like to show only the main page URI. I think it is a > security problem if a user sees things like http://myhost.com/project/1 > > The users might type /2 by himself... I see that as a feature, not a bug. James From francesco.l at ymir.it Fri Nov 11 14:48:18 2005 From: francesco.l at ymir.it (Francesco Lunelli) Date: Fri, 11 Nov 2005 20:48:18 +0100 Subject: [Nitro] og troubles Message-ID: <4374F582.7060402@ymir.it> Hello to everybody, I am looking at Nitro and Og and I find them very interesting. At the moment I am trying to experiment with Og. And problems start here. I installed Og using gem on three different distributions: 1) debian amd64 2) Kubunt AMD64 3) Kubunt I386 using postgresql and mysql (and kirby) as databases. On the Kubuntu AMD64 Og works fine, I can run example or test. Instead on the Kubuntu I386 or Debian when I try to run example/run.rb I got a lot of errors. Using postgresql I got the error that database test doesn't exist. dropdb: eliminazione database fallita: ERROR: il database "test" non esiste (doesn't exist) /usr/local/lib/site_ruby/1.8/og/store/psql.rb:100:in `connect': FATAL: il database "test" non esiste (PGError) from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:100:in `initialize' from /usr/local/lib/site_ruby/1.8/og/manager.rb:51:in `initialize' from /usr/local/lib/site_ruby/1.8/og/manager.rb:50:in `times' from /usr/local/lib/site_ruby/1.8/og/manager.rb:50:in `initialize' from /usr/local/lib/site_ruby/1.8/og.rb:116:in `setup' from examples/run.rb:147 When I disable database deletion (in run.rb) and create manually the test database, run.rb goes a little but stop before reaching the end saying that there is a duplicated relation I, [2005-11-11T20:39:03.234802 #8329] INFO -- : Created table 'ogarticle'. /usr/local/lib/site_ruby/1.8/og/store/psql.rb:222:in `exec': ERROR: la relazione "ogj_article_category" esiste gi? (PGError) from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:222:in `create_table' from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:221:in `each' from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:221:in `create_table' from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:219:in `create_table' from (eval):6:in `og_create_schema' from /usr/local/lib/site_ruby/1.8/og/store/sql.rb:295:in `enchant' from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:142:in `enchant' from /usr/local/lib/site_ruby/1.8/og/manager.rb:120:in `manage' from /usr/local/lib/site_ruby/1.8/og/manager.rb:175:in `manage_classes' from /usr/local/lib/site_ruby/1.8/og/manager.rb:175:in `each' from /usr/local/lib/site_ruby/1.8/og/manager.rb:175:in `manage_classes' from /usr/local/lib/site_ruby/1.8/og.rb:117:in `setup' from examples/run.rb:147 This is the error when I try to use mysql instead then postgresql /usr/local/lib/site_ruby/1.8/og/store.rb:24:in `for_name': /usr/local/lib/site_ruby/1.8/og/store/mysql.rb:39:in `alias_method': undefined method `fetch_row' for class `Mysql::Result' (NameError) from /usr/local/lib/site_ruby/1.8/og/store/mysql.rb:39 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from (eval):2:in `for_name' from /usr/local/lib/site_ruby/1.8/og/manager.rb:46:in `eval' from /usr/local/lib/site_ruby/1.8/og/store.rb:24:in `for_name' from /usr/local/lib/site_ruby/1.8/og/manager.rb:46:in `initialize' from /usr/local/lib/site_ruby/1.8/og.rb:116:in `setup' from examples/run.rb:148 A last thing, when I use Og on the Kubuntu AMD64 run.rb works, but only if I edit it and change manually "options" parameter in class Arcticle form hash to string. If I leave run.rb without changes I got an error saying /usr/local/lib/site_ruby/1.8/og/store/psql.rb:44:in `escape': wrong argument type Hash (expected String) (TypeError) from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:44:in `escape' from (eval):7:in `og_insert' from /usr/local/lib/site_ruby/1.8/og/store.rb:121:in `save' from /usr/local/lib/site_ruby/1.8/og/entity.rb:16:in `save' from examples/run.rb:153 Thanks in advance -- Francesco Lunelli Ymir s.r.l. Viale Verona 190/11 38100 Trento From m.fellinger at gmail.com Fri Nov 11 18:42:59 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sat, 12 Nov 2005 00:42:59 +0100 Subject: [Nitro] og troubles In-Reply-To: <4374F582.7060402@ymir.it> References: <4374F582.7060402@ymir.it> Message-ID: <200511120043.03916.m.fellinger@gmail.com> Hi Francesco, It would be of great interest to me (and all the others i guess) what your run.rb and og-model looks like. The issue with psql-database-creation is known (at least to me) but not fixed yet (i created the database once and now morphing is working well for me) Please provide us with the code you tested so we can add it to the testcases and aim on fixing and of course tell you what is wrong with it. thx in advance manveru Am Freitag 11 November 2005 20:48 schrieb Francesco Lunelli: > Hello to everybody, > I am looking at Nitro and Og and I find them very interesting. > At the moment I am trying to experiment with Og. > And problems start here. > I installed Og using gem on three different distributions: > > 1) debian amd64 > 2) Kubunt AMD64 > 3) Kubunt I386 > > using postgresql and mysql (and kirby) as databases. > > On the Kubuntu AMD64 Og works fine, I can run example or test. > Instead on the Kubuntu I386 or Debian when I try to run example/run.rb I > got a lot of errors. > Using postgresql I got the error that database test doesn't exist. > > dropdb: eliminazione database fallita: ERROR: il database "test" non > esiste (doesn't exist) > /usr/local/lib/site_ruby/1.8/og/store/psql.rb:100:in `connect': FATAL: > il database "test" non esiste (PGError) > from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:100:in > `initialize' > from /usr/local/lib/site_ruby/1.8/og/manager.rb:51:in `initialize' > from /usr/local/lib/site_ruby/1.8/og/manager.rb:50:in `times' > from /usr/local/lib/site_ruby/1.8/og/manager.rb:50:in `initialize' > from /usr/local/lib/site_ruby/1.8/og.rb:116:in `setup' > from examples/run.rb:147 > > When I disable database deletion (in run.rb) and create manually the > test database, run.rb goes a little but stop before reaching the end > saying that there is a duplicated relation > > I, [2005-11-11T20:39:03.234802 #8329] INFO -- : Created table 'ogarticle'. > /usr/local/lib/site_ruby/1.8/og/store/psql.rb:222:in `exec': ERROR: la > relazione "ogj_article_category" esiste gi? (PGError) > from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:222:in > `create_table' > from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:221:in `each' > from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:221:in > `create_table' > from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:219:in > `create_table' > from (eval):6:in `og_create_schema' > from /usr/local/lib/site_ruby/1.8/og/store/sql.rb:295:in `enchant' > from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:142:in `enchant' > from /usr/local/lib/site_ruby/1.8/og/manager.rb:120:in `manage' > from /usr/local/lib/site_ruby/1.8/og/manager.rb:175:in > `manage_classes' > from /usr/local/lib/site_ruby/1.8/og/manager.rb:175:in `each' > from /usr/local/lib/site_ruby/1.8/og/manager.rb:175:in > `manage_classes' > from /usr/local/lib/site_ruby/1.8/og.rb:117:in `setup' > from examples/run.rb:147 > > This is the error when I try to use mysql instead then postgresql > > /usr/local/lib/site_ruby/1.8/og/store.rb:24:in `for_name': > /usr/local/lib/site_ruby/1.8/og/store/mysql.rb:39:in `alias_method': > undefined method `fetch_row' for class `Mysql::Result' (NameError) > from /usr/local/lib/site_ruby/1.8/og/store/mysql.rb:39 > from > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' > from (eval):2:in `for_name' > from /usr/local/lib/site_ruby/1.8/og/manager.rb:46:in `eval' > from /usr/local/lib/site_ruby/1.8/og/store.rb:24:in `for_name' > from /usr/local/lib/site_ruby/1.8/og/manager.rb:46:in `initialize' > from /usr/local/lib/site_ruby/1.8/og.rb:116:in `setup' > from examples/run.rb:148 > > A last thing, when I use Og on the Kubuntu AMD64 run.rb works, but only > if I edit it and change manually "options" parameter in class Arcticle > form hash to string. > If I leave run.rb without changes I got an error saying > > /usr/local/lib/site_ruby/1.8/og/store/psql.rb:44:in `escape': wrong > argument type Hash (expected String) (TypeError) from > /usr/local/lib/site_ruby/1.8/og/store/psql.rb:44:in `escape' from > (eval):7:in `og_insert' > from /usr/local/lib/site_ruby/1.8/og/store.rb:121:in `save' > from /usr/local/lib/site_ruby/1.8/og/entity.rb:16:in `save' > from examples/run.rb:153 > > > Thanks in advance -------------- 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/20051111/4f4b99b6/attachment.bin From Aleksi.Niemela at cs.helsinki.fi Sat Nov 12 05:54:30 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Sat, 12 Nov 2005 12:54:30 +0200 Subject: [Nitro] Security problems In-Reply-To: <4374B155.2060401@neurogami.com> References: <4374B155.2060401@neurogami.com> Message-ID: <4375C9E6.1070205@cs.helsinki.fi> James Britt wrote: >Emmanuel Piperakis wrote: > > >>>Dear devs, >>> >>>I am wondering if anyone has found (or can find) any security problems >>>with Nitro. Moreover, If anyone can suggest any common security >>>measures that could be wrapped in a controller helper/aspect I would >>>like to know. Even urls for (authoritive) articles regarding web site >>>security would be helpful. >>> >>> >>I am not sure if this can be done already, but I would like the path to be >>hidden. I would like to show only the main page URI. I think it is a >>security problem if a user sees things like http://myhost.com/project/1 >> >>The users might type /2 by himself... >> >> > >I see that as a feature, not a bug. > > > I might even add that in the case when action 'project' is activated and it needs to make authorization the usual cases are: 1) check if current user (with possible other conditions, like time/frequency what not) is allowed to access the action 2) check if current user is also coming through a path of ulrs which allows him to do it Usually 1) is quite easy to add as a checking if-clause to the beginning of the action, albeit those tend to grow and get more complex to the level it's much nicer to abstract them away. Case 2) is harder. There are at least three ways around. Consider application where you're doing checkout through path fill in billing information -> confirm billing -> review bought items -> complete transaction through message "you're done" Usually fill in stores information to the database to current order. Step 2 sends out the bill and changes order status to 'billed'. Step 3 shows billed items again and step 4 marks the whole transaction completed. People could write url 1 and click ok, then skip 2 by typing new url for step 3, clicking there ok and move on to page 4 to get transaction completed. In badly designed system they would accomplish this but at step 4 before marking the transaction 'completed' we need a bit more complex logic to check if we're really done. 2.1) One way is to check all the parameters that should have been set so far. 2.2) Another way is to store allowed next (and previous) pages to persistency, and check we're within those as actions start up. 2.3) Third way is to pass extra state in url as a parameter, a checksum which needs to match. Web application framework like Wee only supports third way, to the extent it's the only parameter send ever. Therefore for user to cheat he must come up with random checksum to proceed to the next page and he has no room to bypass the action. Skipping pages is not possible. But it is possible to jump backwards and then forwards (up to the point where he was) at will. These possibilities can be limited by specifying certain path to be transactional, allowing only one way traversal. ---------- Aside these issues I'm more worried there are some built-in ways for users to execute Ruby code written by them, or examine current state of the interpreter and variables within. I'm also a bit worried current implementation doesn't detect (or attack) sql injection through nice tricks users may apply. Also performance related attacks are currently not avoided at all, I guess. So basic "instead of this normal action run action_quick when load > 0.8 or >5 concurrent actions" would be nice. It would enable one to activate more caching or simplify contents in order to keep up even minimum level of service. - Aleksi From rob at motionpath.com Sat Nov 12 10:43:38 2005 From: rob at motionpath.com (Rob Pitt) Date: Sat, 12 Nov 2005 15:43:38 +0000 Subject: [Nitro] Security problems In-Reply-To: References: Message-ID: <9FDE8499-B1A3-48F6-A66A-AC53A60D1154@motionpath.com> I have not noticed anything. I'm sure you are aware of SQL injection, anywhere that fragments of SQL queries have a user-specifiable component in some manner they must be quoted properly. This would be my main concern but I have not noticed anything that would cause this problem... BTW on the note of commercial projects using Nitro, we have completed 2, launched one and are working on a third :) On 11 Nov 2005, at 08:41, George Moschovitis wrote: > Dear devs, > > I am wondering if anyone has found (or can find) any security problems > with Nitro. Moreover, If anyone can suggest any common security > measures that could be wrapped in a controller helper/aspect I would > like to know. Even urls for (authoritive) articles regarding web site > security would be helpful. > > Thanks in advance, > 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 From aurelianocalvo at yahoo.com.ar Sat Nov 12 19:13:44 2005 From: aurelianocalvo at yahoo.com.ar (Aureliano Calvo) Date: Sat, 12 Nov 2005 21:13:44 -0300 (ART) Subject: [Nitro] Newbie needs help Message-ID: <20051113001344.82996.qmail@web50405.mail.yahoo.com> Hi! I'm trying to run the nitro hello world example but I'm unable to start it. This is the error: E:\nitro\examples\hello>ruby -rubygems run.rb c:/ruby/lib/ruby/site_ruby/1.8/nitro/controller.rb:139: uninitialized constant Nitro::Controller::Markup (NameError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from c:/ruby/lib/ruby/site_ruby/1.8/nitro.rb:36 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from run.rb:1 I'm using the Ruby one click installer on Windows XP and installed nitro and its dependencies running "gem install nitro". I thought that I might had a wrong nitro version, and I've upgraded all the gems in the system with "gem update" but it isn't working. Can you help me? Thank's, Aureliano. ___________________________________________________________ 1GB gratis, Antivirus y Antispam Correo Yahoo!, el mejor correo web del mundo http://correo.yahoo.com.ar From james_b at neurogami.com Sun Nov 13 01:15:24 2005 From: james_b at neurogami.com (James Britt) Date: Sat, 12 Nov 2005 23:15:24 -0700 Subject: [Nitro] class CgiUtils missing? In-Reply-To: References: <607b35037102446438aed765137aa577@oggu.de> <4367193F.6080802@neurogami.com> Message-ID: <4376D9FC.3020004@neurogami.com> George Moschovitis wrote: >>Is there a real solution for this? >> >>I really want to get some Nitro apps up and running, as CGI under Apache >>2, but while code runs fine on Windows, it barfs on Linux. >> >>... >> >>Anyway, some suggestions on getting a real solution for the CGI issue >>would be much appreciated. > > > > Hello James, > > Is it possible that you could investigate this further? As I am not > using CGI and cannot easily setup an environment to test this, it > would be really helpful. GGI is only problematic on Linux? > I have problems on Windows as well. Here's what I've done (in the 0.24 gems code): In file lib/nitro/cgi.rb, changed context.headers = cgi.env to context.headers = ENV And in file lib/nitro/adapter/cgi.rb, I have Cgi.process(server, cgi, cgi, cgi) I *think* this use to be CgiUtils.process. I forgot to track all my changes. So this gets me further. But when I run a minimal app created by 'nitrogen app', I get errors in Nitro::Controller about index_action missing. DEBUG -- : Compiling action 'Nitro::Controller#index'\r ERROR -- : Error while handling '/'.\r ERROR -- : undefined method `index_action' for #\r [Sat Nov 12 23:04:42 2005] [error] [client 127.0.0.1] C:/ruby/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/controller.rb:107:in `method_missing'\r [Sat Nov 12 23:04:42 2005] [error] [client 127.0.0.1] C:/ruby/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/render.rb:125:in `send'\r [Sat Nov 12 23:04:42 2005] [error] [client 127.0.0.1] C:/ruby/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/render.rb:125:in `render'\r [Sat Nov 12 23:04:42 2005] [error] [client 127.0.0.1] C:/ruby/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/cgi.rb:35:in `process'\r [Sat Nov 12 23:04:42 2005] [error] [client 127.0.0.1] C:/ruby/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/adapter/cgi.rb:18:in `start'\r [Sat Nov 12 23:04:42 2005] [error] [client 127.0.0.1] C:/ruby/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server/runner.rb:242:in `invoke'\r [Sat Nov 12 23:04:42 2005] [error] [client 127.0.0.1] C:/ruby/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server.rb:123:in `run'\r [Sat Nov 12 23:04:42 2005] [error] [client 127.0.0.1] C:/ruby/lib/ruby/site_ruby/1.8/nitro.rb:65:in `run'\r And then the same sort of stuff for error_action. My run.rb is this: #!/usr/bin/env ruby require 'nitro' Nitro.run So it seems the default controller knows nothing about index. But I've yet to hear of anyone else mention this, so perhaps this is just a side-effect of my CGI changes. Or no one is running the default run.rb file. If I try this: #!/usr/bin/env ruby require 'nitro' class MainController < Nitro::Controller def index end end Nitro.run( MainController ) then I just get a blank page, although there is an index.xhtml file in /public. And this simply works: #!/usr/bin/env ruby require 'rubygems' require_gem 'nitro', '<0.24.0' Nitro.run Maybe I just need to replace the 0.24 cgi.rb files with those from 0.23? James From bryan.a.soto at gmail.com Sun Nov 13 01:15:12 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Sat, 12 Nov 2005 22:15:12 -0800 Subject: [Nitro] Newbie needs help In-Reply-To: <20051113001344.82996.qmail@web50405.mail.yahoo.com> References: <20051113001344.82996.qmail@web50405.mail.yahoo.com> Message-ID: Hi, can you run: gem install redcloth and try again? bryan On 11/12/05, Aureliano Calvo wrote: > > Hi! > > I'm trying to run the nitro hello world example but > I'm unable to start it. This is the error: > > E:\nitro\examples\hello>ruby -rubygems run.rb > c:/ruby/lib/ruby/site_ruby/1.8/nitro/controller.rb:139: > uninitialized constant Nitro::Controller::Markup > (NameError) > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require__' > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require' > from > c:/ruby/lib/ruby/site_ruby/1.8/nitro.rb:36 > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require__' > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require' > from run.rb:1 > > I'm using the Ruby one click installer on Windows XP > and installed nitro and its dependencies running "gem > install nitro". > > I thought that I might had a wrong nitro version, and > I've upgraded all the gems in the system with "gem > update" but it isn't working. > > Can you help me? > > Thank's, > Aureliano. > > > > > > > > > ___________________________________________________________ > 1GB gratis, Antivirus y Antispam > Correo Yahoo!, el mejor correo web del mundo > http://correo.yahoo.com.ar > > _______________________________________________ > 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/20051113/389cb62a/attachment.html From george.moschovitis at gmail.com Sun Nov 13 02:40:22 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 13 Nov 2005 09:40:22 +0200 Subject: [Nitro] Security problems In-Reply-To: <9FDE8499-B1A3-48F6-A66A-AC53A60D1154@motionpath.com> References: <9FDE8499-B1A3-48F6-A66A-AC53A60D1154@motionpath.com> Message-ID: > BTW on the note of commercial projects using Nitro, we have completed > 2, launched one and are working on a third :) hey, can you tell us urls? and perhaps add links on the wiki? thats great news to hear! -g. > > On 11 Nov 2005, at 08:41, George Moschovitis wrote: > > > Dear devs, > > > > I am wondering if anyone has found (or can find) any security problems > > with Nitro. Moreover, If anyone can suggest any common security > > measures that could be wrapped in a controller helper/aspect I would > > like to know. Even urls for (authoritive) articles regarding web site > > security would be helpful. > > > > Thanks in advance, > > 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 > > _______________________________________________ > 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 Sun Nov 13 02:41:07 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 13 Nov 2005 09:41:07 +0200 Subject: [Nitro] class CgiUtils missing? In-Reply-To: <4376D9FC.3020004@neurogami.com> References: <607b35037102446438aed765137aa577@oggu.de> <4367193F.6080802@neurogami.com> <4376D9FC.3020004@neurogami.com> Message-ID: James, thanks for the report, Guill is looking into this problem! -g. On 11/13/05, James Britt wrote: > George Moschovitis wrote: > >>Is there a real solution for this? > >> > >>I really want to get some Nitro apps up and running, as CGI under Apache > >>2, but while code runs fine on Windows, it barfs on Linux. > >> > >>... > >> > >>Anyway, some suggestions on getting a real solution for the CGI issue > >>would be much appreciated. > > > > > > > > Hello James, > > > > Is it possible that you could investigate this further? As I am not > > using CGI and cannot easily setup an environment to test this, it > > would be really helpful. GGI is only problematic on Linux? > > > > I have problems on Windows as well. > > Here's what I've done (in the 0.24 gems code): > > In file lib/nitro/cgi.rb, changed > > > context.headers = cgi.env > to > context.headers = ENV > > And in file lib/nitro/adapter/cgi.rb, I have > > Cgi.process(server, cgi, cgi, cgi) > > > I *think* this use to be CgiUtils.process. I forgot to track all my > changes. > > So this gets me further. But when I run a minimal app created by > 'nitrogen app', I get errors in Nitro::Controller about index_action > missing. > > > > DEBUG -- : Compiling action 'Nitro::Controller#index'\r > ERROR -- : Error while handling '/'.\r > ERROR -- : undefined method `index_action' for > #\r > [Sat Nov 12 23:04:42 2005] [error] [client 127.0.0.1] > C:/ruby/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/controller.rb:107:in > `method_missing'\r > [Sat Nov 12 23:04:42 2005] [error] [client 127.0.0.1] > C:/ruby/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/render.rb:125:in > `send'\r > [Sat Nov 12 23:04:42 2005] [error] [client 127.0.0.1] > C:/ruby/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/render.rb:125:in > `render'\r > [Sat Nov 12 23:04:42 2005] [error] [client 127.0.0.1] > C:/ruby/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/cgi.rb:35:in > `process'\r > [Sat Nov 12 23:04:42 2005] [error] [client 127.0.0.1] > C:/ruby/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/adapter/cgi.rb:18:in > `start'\r > [Sat Nov 12 23:04:42 2005] [error] [client 127.0.0.1] > C:/ruby/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server/runner.rb:242:in > `invoke'\r > [Sat Nov 12 23:04:42 2005] [error] [client 127.0.0.1] > C:/ruby/lib/ruby/gems/1.8/gems/nitro-0.24.0/lib/nitro/server.rb:123:in > `run'\r > [Sat Nov 12 23:04:42 2005] [error] [client 127.0.0.1] > C:/ruby/lib/ruby/site_ruby/1.8/nitro.rb:65:in `run'\r > > > > And then the same sort of stuff for error_action. > > My run.rb is this: > > > #!/usr/bin/env ruby > > require 'nitro' > > Nitro.run > > > So it seems the default controller knows nothing about index. But I've > yet to hear of anyone else mention this, so perhaps this is just a > side-effect of my CGI changes. Or no one is running the default run.rb > file. > > If I try this: > > #!/usr/bin/env ruby > require 'nitro' > > class MainController < Nitro::Controller > def index > end > end > > Nitro.run( MainController ) > > then I just get a blank page, although there is an index.xhtml file in > /public. > > > And this simply works: > > #!/usr/bin/env ruby > > require 'rubygems' > require_gem 'nitro', '<0.24.0' > Nitro.run > > > Maybe I just need to replace the 0.24 cgi.rb files with those from 0.23? > > > > James > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From aurelianocalvo at yahoo.com.ar Sun Nov 13 08:38:51 2005 From: aurelianocalvo at yahoo.com.ar (Aureliano Calvo) Date: Sun, 13 Nov 2005 10:38:51 -0300 (ART) Subject: [Nitro] Newbie needs help In-Reply-To: Message-ID: <20051113133851.63786.qmail@web50404.mail.yahoo.com> Thank you, it's working. What does the redcloth gem do? Thank you, Aureliano. > Hi, > > can you run: > > gem install redcloth > > and try again? > > bryan > > On 11/12/05, Aureliano Calvo > wrote: > > > > Hi! > > > > I'm trying to run the nitro hello world example > but > > I'm unable to start it. This is the error: > > > > E:\nitro\examples\hello>ruby -rubygems run.rb > > > c:/ruby/lib/ruby/site_ruby/1.8/nitro/controller.rb:139: > > uninitialized constant Nitro::Controller::Markup > > (NameError) > > from > > > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > `require__' > > from > > > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > `require' > > from > > c:/ruby/lib/ruby/site_ruby/1.8/nitro.rb:36 > > from > > > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > `require__' > > from > > > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > `require' > > from run.rb:1 > > > > I'm using the Ruby one click installer on Windows > XP > > and installed nitro and its dependencies running > "gem > > install nitro". > > > > I thought that I might had a wrong nitro version, > and > > I've upgraded all the gems in the system with "gem > > update" but it isn't working. > > > > Can you help me? > > > > Thank's, > > Aureliano. > > > > > > > > > > > > > > > > > > > ___________________________________________________________ > > 1GB gratis, Antivirus y Antispam > > Correo Yahoo!, el mejor correo web del mundo > > http://correo.yahoo.com.ar > > > > _______________________________________________ > > 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 > ___________________________________________________________ 1GB gratis, Antivirus y Antispam Correo Yahoo!, el mejor correo web del mundo http://correo.yahoo.com.ar From citizen428 at gentoo.org Sun Nov 13 10:05:30 2005 From: citizen428 at gentoo.org (Michael Kohl) Date: Sun, 13 Nov 2005 16:05:30 +0100 Subject: [Nitro] Newbie needs help In-Reply-To: <20051113133851.63786.qmail@web50404.mail.yahoo.com> References: <20051113133851.63786.qmail@web50404.mail.yahoo.com> Message-ID: <20051113160530.023e18bf@localhost> On Sun, 13 Nov 2005 10:38:51 -0300 (ART) Aureliano Calvo wrote: > Thank you, it's working. > What does the redcloth gem do? It's for using Textile markup: http://textism.com/tools/textile/ http://www.whytheluckystiff.net/ruby/redcloth/ -- web at citizen428.net citizen428 at gentoo.org http://citizen428.net/ http://dev.gentoo.org/~citizen428/ GnuPG key: 0x90CA09E3/4D21 916E DBCE 72B8 CDC5 BD87 DE2D 91A2 90CA 09E3 -------------- 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/20051113/fa05f8f5/attachment.bin From aurelianocalvo at yahoo.com.ar Sun Nov 13 11:01:10 2005 From: aurelianocalvo at yahoo.com.ar (Aureliano Calvo) Date: Sun, 13 Nov 2005 13:01:10 -0300 (ART) Subject: [Nitro] Newbie needs help In-Reply-To: <20051113133851.63786.qmail@web50404.mail.yahoo.com> Message-ID: <20051113160111.84385.qmail@web50407.mail.yahoo.com> One more thing. Right now, it's binding to all the ip interfases in my PC. How can I bind it to localhost only (I don't want my server to be published on the network). Thank you very much for your time, Aureliano. > Thank you, it's working. > What does the redcloth gem do? > > Thank you, > Aureliano. > > > Hi, > > > > can you run: > > > > gem install redcloth > > > > and try again? > > > > bryan > > > > On 11/12/05, Aureliano Calvo > > wrote: > > > > > > Hi! > > > > > > I'm trying to run the nitro hello world example > > but > > > I'm unable to start it. This is the error: > > > > > > E:\nitro\examples\hello>ruby -rubygems run.rb > > > > > > c:/ruby/lib/ruby/site_ruby/1.8/nitro/controller.rb:139: > > > uninitialized constant Nitro::Controller::Markup > > > (NameError) > > > from > > > > > > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > > `require__' > > > from > > > > > > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > > `require' > > > from > > > c:/ruby/lib/ruby/site_ruby/1.8/nitro.rb:36 > > > from > > > > > > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > > `require__' > > > from > > > > > > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > > `require' > > > from run.rb:1 > > > > > > I'm using the Ruby one click installer on > Windows > > XP > > > and installed nitro and its dependencies running > > "gem > > > install nitro". > > > > > > I thought that I might had a wrong nitro > version, > > and > > > I've upgraded all the gems in the system with > "gem > > > update" but it isn't working. > > > > > > Can you help me? > > > > > > Thank's, > > > Aureliano. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ___________________________________________________________ > > > 1GB gratis, Antivirus y Antispam > > > Correo Yahoo!, el mejor correo web del mundo > > > http://correo.yahoo.com.ar > > > > > > _______________________________________________ > > > 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 > > > > > > > > > > > ___________________________________________________________ > > 1GB gratis, Antivirus y Antispam > Correo Yahoo!, el mejor correo web del mundo > http://correo.yahoo.com.ar > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > ___________________________________________________________ 1GB gratis, Antivirus y Antispam Correo Yahoo!, el mejor correo web del mundo http://correo.yahoo.com.ar From m.fellinger at gmail.com Sun Nov 13 11:16:07 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sun, 13 Nov 2005 17:16:07 +0100 Subject: [Nitro] Newbie needs help In-Reply-To: <20051113160111.84385.qmail@web50407.mail.yahoo.com> References: <20051113160111.84385.qmail@web50407.mail.yahoo.com> Message-ID: <200511131716.17376.m.fellinger@gmail.com> this is easy, just add in your run.rb following line: Nitro::Server.address = '127.0.0.1' that's it, you can change the port the same way, via Nitro::Server.port = 9999 have fun :) manveru Am Sonntag 13 November 2005 17:01 schrieb Aureliano Calvo: > One more thing. > Right now, it's binding to all the ip interfases in my > PC. How can I bind it to localhost only (I don't want > my server to be published on the network). > > Thank you very much for your time, > Aureliano. > > > Thank you, it's working. > > What does the redcloth gem do? > > > > Thank you, > > Aureliano. > > > > > Hi, > > > > > > can you run: > > > > > > gem install redcloth > > > > > > and try again? > > > > > > bryan > > > > > > On 11/12/05, Aureliano Calvo > > > > > > wrote: > > > > Hi! > > > > > > > > I'm trying to run the nitro hello world example > > > > > > but > > > > > > > I'm unable to start it. This is the error: > > > > > > > > E:\nitro\examples\hello>ruby -rubygems run.rb > > c:/ruby/lib/ruby/site_ruby/1.8/nitro/controller.rb:139: > > > > uninitialized constant Nitro::Controller::Markup > > > > (NameError) > > > > from > > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > > > > `require__' > > > > from > > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > > > > `require' > > > > from > > > > c:/ruby/lib/ruby/site_ruby/1.8/nitro.rb:36 > > > > from > > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > > > > `require__' > > > > from > > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > > > > `require' > > > > from run.rb:1 > > > > > > > > I'm using the Ruby one click installer on > > > > Windows > > > > > XP > > > > > > > and installed nitro and its dependencies running > > > > > > "gem > > > > > > > install nitro". > > > > > > > > I thought that I might had a wrong nitro > > > > version, > > > > > and > > > > > > > I've upgraded all the gems in the system with > > > > "gem > > > > > > update" but it isn't working. > > > > > > > > Can you help me? > > > > > > > > Thank's, > > > > Aureliano. > > ___________________________________________________________ > > > > > 1GB gratis, Antivirus y Antispam > > > > Correo Yahoo!, el mejor correo web del mundo > > > > http://correo.yahoo.com.ar > > > > > > > > _______________________________________________ > > > > 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 > > ___________________________________________________________ > > > 1GB gratis, Antivirus y Antispam > > Correo Yahoo!, el mejor correo web del mundo > > http://correo.yahoo.com.ar > > > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > > ___________________________________________________________ > 1GB gratis, Antivirus y Antispam > Correo Yahoo!, el mejor correo web del mundo > http://correo.yahoo.com.ar > > _______________________________________________ > 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/20051113/60d2d030/attachment.bin From zimba.tm at gmail.com Sun Nov 13 13:47:07 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Sun, 13 Nov 2005 19:47:07 +0100 Subject: [Nitro] Security problems In-Reply-To: References: <9FDE8499-B1A3-48F6-A66A-AC53A60D1154@motionpath.com> Message-ID: <3ff63f9b0511131047m4dd69deek@mail.gmail.com> Another actual subject is GWA (Google Web Accelerator). GWA works by prefetching links that are found on the page and it bypasses javascript confirmations. So if you have any sensitive operations (deletes, unsubscribes, ...) that work with GET, I suggest adding a helper to transform it in a POST form like rails did (+ a server-side check that it's a POST and not a GET query). Note : I don't know if this facility already exist in Nitro On 13/11/05, George Moschovitis wrote: > > BTW on the note of commercial projects using Nitro, we have completed > > 2, launched one and are working on a third :) > > hey, can you tell us urls? and perhaps add links on the wiki? > > thats great news to hear! > > -g. > > > > > > On 11 Nov 2005, at 08:41, George Moschovitis wrote: > > > > > Dear devs, > > > > > > I am wondering if anyone has found (or can find) any security problems > > > with Nitro. Moreover, If anyone can suggest any common security > > > measures that could be wrapped in a controller helper/aspect I would > > > like to know. Even urls for (authoritive) articles regarding web site > > > security would be helpful. > > > > > > Thanks in advance, > > > 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 > > > > _______________________________________________ > > 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 rainhead at gmail.com Sun Nov 13 16:17:42 2005 From: rainhead at gmail.com (Peter Abrahamsen) Date: Sun, 13 Nov 2005 13:17:42 -0800 Subject: [Nitro] Security problems In-Reply-To: References: Message-ID: Another simple solution would be to look up by name, not number. As long as you don't expect project names to change often, URIs like / project/bills-project are far more user friendly, and make it harder for someone with no knowledge of a project to stumble upon it. This isn't real security, of course -- the other replies have covered that. But I appreciate that sometimes you don't really want to put strict access controls on something, but don't want to advertise its presence, either. I do this when I need to give someone a large file - I put it on a web server in a place where it won't be indexed, and give the person the URL. It wouldn't be a huge problem if someone found one of those files, but I'd just as soon nobody rifle through all my stuff. Meanwhile, I don't have to worry about creating a user, a password, or an ACL. P > I am not sure if this can be done already, but I would like the > path to be > hidden. I would like to show only the main page URI. I think it is a > security problem if a user sees things like http://myhost.com/ > project/1 > > The users might type /2 by himself... From epiperak at softlab.ece.ntua.gr Sun Nov 13 20:02:41 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Mon, 14 Nov 2005 03:02:41 +0200 (EET) Subject: [Nitro] Security problems In-Reply-To: References: Message-ID: > Project.with_scope(:condition => "user='gmosx'") do > projects = Project.all # returns projects of gmosx > project = Project[id] # only returns if the id project belobgs to gmosx > ... > end > > and stuff like that... Cool!!! Damn George! You can not let us rest !! Always new stuff to dream about... grrrrrr... 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 Nov 13 20:12:06 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Mon, 14 Nov 2005 03:12:06 +0200 (EET) Subject: [Nitro] Many Thanks In-Reply-To: References: Message-ID: :-) my name is Emmanouil!!! Grrr... I believe that Nitro has future, that is why I invested time/effort/money on it and the dev team. I hope other people share my point of view and donate too... that would be a good motivation for George and his team to give us more and MORE Features!!! > Dear devs, > > I would like to publicly thank Emanuel, for his generous monetary > donation to the Nitro project. This kind of act clearly demonstrates > that Nitro is useful and important for other people and gives us more > reasons to work harder to improve the framework. > > Moreover, Emanuel is one of the first people (outside of Navel) to > successfully complete a commercial application powered by Nitro. Well > done! Cool Nitro powered web applications are another great motivation > for the development team! > > > > 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 Sun Nov 13 20:27:25 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Mon, 14 Nov 2005 03:27:25 +0200 (EET) Subject: [Nitro] Security problems In-Reply-To: References: Message-ID: Guys thanx for the tones of replies... It has been most helpfull. I will develop a small security system like Michael suggests (because that fits my needs the most) Thanks again > Another simple solution would be to look up by name, not number. As > long as you don't expect project names to change often, URIs like / > project/bills-project are far more user friendly, and make it harder > for someone with no knowledge of a project to stumble upon it. > > This isn't real security, of course -- the other replies have covered > that. But I appreciate that sometimes you don't really want to put > strict access controls on something, but don't want to advertise its > presence, either. I do this when I need to give someone a large file > - I put it on a web server in a place where it won't be indexed, and > give the person the URL. It wouldn't be a huge problem if someone > found one of those files, but I'd just as soon nobody rifle through > all my stuff. Meanwhile, I don't have to worry about creating a user, > a password, or an ACL. > > P > >> I am not sure if this can be done already, but I would like the >> path to be >> hidden. I would like to show only the main page URI. I think it is a >> security problem if a user sees things like http://myhost.com/ >> project/1 >> >> The users might type /2 by himself... > _______________________________________________ > 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 zimba.tm at gmail.com Mon Nov 14 00:30:50 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Mon, 14 Nov 2005 06:30:50 +0100 Subject: [Nitro] Feedback and one question Message-ID: <3ff63f9b0511132130k763c9f93s@mail.gmail.com> Hello, I finally found some time to build a small app using nitro. It's not finished yet but I can say that in one night I have done most of it. By looking at nitro's source-code I could find out things that weren't documented and so it was not really a problem (I know not everybody does this). And I took some time enhancing the wiki. More will follow while I'm getting forward in the application. I'm using nitro-0.24.0 in gem format. I have found lots of rough edges in that version, altrough I don't know how it advanced in the current unstable (glycerin). For example the kirby adapter is not really stable. It doesn't support the Time class well. The template language doesn't support the whole rails syntax (). Many doc is missing and it looks like gmosx doesn't take much care about it. All in all, it was lot of fun using it. The ground feels really sane (look at the code ppl !). While implementing a simple user authentication, I was stuck with a problem that I couldn't solve. I needed to know which action was called in a pre_ action filter. Do you have any ideas ? Thanks for everything, time to sleep :) -- Cheers, zimba http://zimba.oree.ch From george.moschovitis at gmail.com Mon Nov 14 01:55:10 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 14 Nov 2005 08:55:10 +0200 Subject: [Nitro] Security problems In-Reply-To: <3ff63f9b0511131047m4dd69deek@mail.gmail.com> References: <9FDE8499-B1A3-48F6-A66A-AC53A60D1154@motionpath.com> <3ff63f9b0511131047m4dd69deek@mail.gmail.com> Message-ID: Such a helper is on my todo list for some time... If anyone can contribute this it would be greatly appreciated. -g. On 11/13/05, zimba-tm wrote: > Another actual subject is GWA (Google Web Accelerator). > > GWA works by prefetching links that are found on the page and it > bypasses javascript confirmations. So if you have any sensitive > operations (deletes, unsubscribes, ...) that work with GET, I suggest > adding a helper to transform it in a POST form like rails did (+ a > server-side check that it's a POST and not a GET query). > > Note : I don't know if this facility already exist in Nitro > > On 13/11/05, George Moschovitis wrote: > > > BTW on the note of commercial projects using Nitro, we have completed > > > 2, launched one and are working on a third :) > > > > hey, can you tell us urls? and perhaps add links on the wiki? > > > > thats great news to hear! > > > > -g. > > > > > > > > > > On 11 Nov 2005, at 08:41, George Moschovitis wrote: > > > > > > > Dear devs, > > > > > > > > I am wondering if anyone has found (or can find) any security problems > > > > with Nitro. Moreover, If anyone can suggest any common security > > > > measures that could be wrapped in a controller helper/aspect I would > > > > like to know. Even urls for (authoritive) articles regarding web site > > > > security would be helpful. > > > > > > > > Thanks in advance, > > > > 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 > > > > > > _______________________________________________ > > > 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 > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Mon Nov 14 02:29:29 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 14 Nov 2005 09:29:29 +0200 Subject: [Nitro] patches for 0.25.0 Message-ID: Dear devs, If anyone has any patches to submit for 0.25.0, now is the time to do it. The release of the new version will happen over the next couple of days. This will be mainly a bug fix/stabilization/refinement release. regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From chris at motionpath.com Mon Nov 14 04:26:13 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Mon, 14 Nov 2005 09:26:13 +0000 Subject: [Nitro] Feedback and one question In-Reply-To: <3ff63f9b0511132130k763c9f93s@mail.gmail.com> References: <3ff63f9b0511132130k763c9f93s@mail.gmail.com> Message-ID: Hi ya; > While implementing a simple user authentication, I was stuck with a > problem that I couldn't solve. I needed to know which action was > called in a pre_ action filter. Do you have any ideas ? @action_name contains the current action ... if your pre aspect is calling a private controller method (sure it would be) then that instance var will defiantly be available for the duration of the action. into text renders ... personaly wouldn't use them, but each to their own :) Chris Farmiloe Design & Development. Motionpath Digital Media Ltd. St Georges road, Brighton, BN2 1ED. Office: 01273 608708 | Mobile: 07791 179481 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051114/8a055db9/attachment.html From george.moschovitis at gmail.com Mon Nov 14 05:46:58 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 14 Nov 2005 12:46:58 +0200 Subject: [Nitro] Feedback and one question In-Reply-To: References: <3ff63f9b0511132130k763c9f93s@mail.gmail.com> Message-ID: > render variables / eval code. guess the template compiler could > transform into text renders ... personaly wouldn't use them, > but each to their own :) I thinks the template system already handles both <% .. %> and <%= .. %> -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From chris at motionpath.com Mon Nov 14 06:01:28 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Mon, 14 Nov 2005 11:01:28 +0000 Subject: [Nitro] Feedback and one question In-Reply-To: References: <3ff63f9b0511132130k763c9f93s@mail.gmail.com> Message-ID: <929A7F03-872E-4A57-8597-9FE652E52C52@motionpath.com> > <% .. %> gives me flashbacks to ASP /me shudders Chris Farmiloe Design & Development. Motionpath Digital Media Ltd. St Georges road, Brighton, BN2 1ED. Office: 01273 608708 | Mobile: 07791 179481 On 14 Nov 2005, at 10:46, George Moschovitis wrote: >> > render variables / eval code. guess the template compiler could >> transform into text renders ... personaly wouldn't use them, >> but each to their own :) > > > I thinks the template system already handles both > > <% .. %> > > and > > <%= .. %> > > -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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051114/168a9af8/attachment.html From george.moschovitis at gmail.com Mon Nov 14 06:14:38 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 14 Nov 2005 13:14:38 +0200 Subject: [Nitro] Feedback and one question In-Reply-To: <929A7F03-872E-4A57-8597-9FE652E52C52@motionpath.com> References: <3ff63f9b0511132130k763c9f93s@mail.gmail.com> <929A7F03-872E-4A57-8597-9FE652E52C52@motionpath.com> Message-ID: > <% .. %> Nitro is about giving options, remember? ;-) -g. PS: I find <%.. %> useful in email templates though ;-) -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From francesco.l at ymir.it Mon Nov 14 07:20:44 2005 From: francesco.l at ymir.it (Francesco Lunelli) Date: Mon, 14 Nov 2005 13:20:44 +0100 Subject: [Nitro] og troubles In-Reply-To: <200511120043.03916.m.fellinger@gmail.com> References: <4374F582.7060402@ymir.it> <200511120043.03916.m.fellinger@gmail.com> Message-ID: <4378811C.9050503@ymir.it> Michael Fellinger ha scritto: >Hi Francesco, > >It would be of great interest to me (and all the others i guess) what your >run.rb and og-model looks like. >The issue with psql-database-creation is known (at least to me) but not fixed >yet (i created the database once and now morphing is working well for me) >Please provide us with the code you tested so we can add it to the testcases >and aim on fixing and of course tell you what is wrong with it. > >thx in advance >manveru > > The code is the run.rb file included in gem distribution of Og. You can find it in example directory under og. In my linux box /usr/lib/ruby/gems/1./gems/og-0.24.0/examples Thanks -- Francesco Lunelli Ymir s.r.l. Viale Verona 190/11 38100 Trento From akonsu at gmail.com Tue Nov 15 17:21:06 2005 From: akonsu at gmail.com (akonsu) Date: Tue, 15 Nov 2005 14:21:06 -0800 Subject: [Nitro] cookie.rb ? Message-ID: hello, could someone explain this code found in cookie.rb: def expires=(t) @expires = t && (t.is_a?(Time) ? t.httpdate : t.to_s) end why does it need the "t &&" part? thanks konstantin From guillaume.pierronnet at gmail.com Tue Nov 15 17:26:46 2005 From: guillaume.pierronnet at gmail.com (guillaume pierronnet) Date: Tue, 15 Nov 2005 23:26:46 +0100 Subject: [Nitro] cookie.rb ? In-Reply-To: References: Message-ID: <6a7d49ca0511151426m4c829f39i@mail.gmail.com> this is a boolean "and" this expression is equivalent: if t @expires = t.is_a?(Time) ? t.httpdate : t.to_s end 2005/11/15, akonsu : > hello, > > could someone explain this code found in cookie.rb: > > def expires=(t) > @expires = t && (t.is_a?(Time) ? t.httpdate : t.to_s) > end > > why does it need the "t &&" part? > > thanks > konstantin > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From akonsu at gmail.com Tue Nov 15 17:34:38 2005 From: akonsu at gmail.com (akonsu) Date: Tue, 15 Nov 2005 14:34:38 -0800 Subject: [Nitro] cookie.rb ? In-Reply-To: <6a7d49ca0511151426m4c829f39i@mail.gmail.com> References: <6a7d49ca0511151426m4c829f39i@mail.gmail.com> Message-ID: thank you. is it really equivalent? the original code assigns something to @expires in any case. your code makes this assignment only if "t" evaluates to true. would you explain in more detail? i am really confused.... 2005/11/15, guillaume pierronnet : > this is a boolean "and" > > this expression is equivalent: > > if t > @expires = t.is_a?(Time) ? t.httpdate : t.to_s > end > > 2005/11/15, akonsu : > > hello, > > > > could someone explain this code found in cookie.rb: > > > > def expires=(t) > > @expires = t && (t.is_a?(Time) ? t.httpdate : t.to_s) > > end > > > > why does it need the "t &&" part? > > > > thanks > > konstantin > > > > _______________________________________________ > > 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 Aleksi.Niemela at cs.helsinki.fi Tue Nov 15 17:35:14 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Wed, 16 Nov 2005 00:35:14 +0200 Subject: [Nitro] cookie.rb ? In-Reply-To: <6a7d49ca0511151426m4c829f39i@mail.gmail.com> References: <6a7d49ca0511151426m4c829f39i@mail.gmail.com> Message-ID: <437A62A2.2050600@cs.helsinki.fi> guillaume pierronnet wrote: >this is a boolean "and" > >this expression is equivalent: > >if t > @expires = t.is_a?(Time) ? t.httpdate : t.to_s >end > > > Sure but as you can see it's a bit hard to reset expiration by assigning nil. Haven't read the code to see if there's other way around. In case nil is not expected value of the parameter checking it instead of failing through raising an exception is not common way in Ruby world. Then again, this is Nitro-world where plenty of things work under plenty of useful assumptions making coding much easier. - Aleksi From citizen428 at gentoo.org Tue Nov 15 17:38:11 2005 From: citizen428 at gentoo.org (Michael Kohl) Date: Tue, 15 Nov 2005 23:38:11 +0100 Subject: [Nitro] cookie.rb ? In-Reply-To: References: Message-ID: <20051115233811.3578c560@localhost> On Tue, 15 Nov 2005 14:21:06 -0800 akonsu wrote: > could someone explain this code found in cookie.rb: > > def expires=(t) > @expires = t && (t.is_a?(Time) ? t.httpdate : t.to_s) > end > > why does it need the "t &&" part? It's an idiom that I mostly know from shell scripts, where it's used to replace simple "if foo then bla" statements. Here's a bash example: [ -z ${var} ] && bla instead of if [ -z ${var} ] ; then bla fi Hope that helps, Michael -- web at citizen428.net citizen428 at gentoo.org http://citizen428.net/ http://dev.gentoo.org/~citizen428/ GnuPG key: 0x90CA09E3/4D21 916E DBCE 72B8 CDC5 BD87 DE2D 91A2 90CA 09E3 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051115/9f574106/attachment.bin From bryan.a.soto at gmail.com Tue Nov 15 17:42:38 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Tue, 15 Nov 2005 14:42:38 -0800 Subject: [Nitro] Security problems In-Reply-To: References: Message-ID: Hi, This web site was mentioned in the Rails book. The Open Web Application Security Project http://www.owasp.org/index.jsp I hope this is something along the lines of what you were looking for. bryan On 11/11/05, George Moschovitis wrote: > > Dear devs, > > I am wondering if anyone has found (or can find) any security problems > with Nitro. Moreover, If anyone can suggest any common security > measures that could be wrapped in a controller helper/aspect I would > like to know. Even urls for (authoritive) articles regarding web site > security would be helpful. > > Thanks in advance, > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051115/90540b0f/attachment.html From akonsu at gmail.com Tue Nov 15 17:50:32 2005 From: akonsu at gmail.com (akonsu) Date: Tue, 15 Nov 2005 14:50:32 -0800 Subject: [Nitro] cookie.rb ? In-Reply-To: <437A62A2.2050600@cs.helsinki.fi> References: <6a7d49ca0511151426m4c829f39i@mail.gmail.com> <437A62A2.2050600@cs.helsinki.fi> Message-ID: yes, the expression seems to assign nil to @expires in case 't' is nil. i think that it is not the same as having an 'if' as Guillaume wrote. so, does it look like a bug? konstantin 2005/11/15, Aleksi Niemela : > guillaume pierronnet wrote: > > >this is a boolean "and" > > > >this expression is equivalent: > > > >if t > > @expires = t.is_a?(Time) ? t.httpdate : t.to_s > >end > > > > > > > Sure but as you can see it's a bit hard to reset expiration by assigning > nil. Haven't read the code to see if there's other way around. In case > nil is not expected value of the parameter checking it instead of > failing through raising an exception is not common way in Ruby world. > Then again, this is Nitro-world where plenty of things work under plenty > of useful assumptions making coding much easier. > > - Aleksi > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From bryan.a.soto at gmail.com Tue Nov 15 18:44:47 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Tue, 15 Nov 2005 15:44:47 -0800 Subject: [Nitro] Question for Postgres users on evolve_schema. Message-ID: I've got a patch to add similar functionality for MySql, but was wondering about it's run-time behaviour. Basically, assuming Og.setup is set up to perform field additions and deletions, * At application startup, fields are added and deleted. * While the application is running, if whatever file containing Og.setup is touched, fields are added. * Fields are _not_ deleted during application run-time, only at startup. Is that the run-time behaviour for Postgres also? Thanks, bryan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051115/edfcaae5/attachment.html From george.moschovitis at gmail.com Wed Nov 16 02:12:05 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 16 Nov 2005 09:12:05 +0200 Subject: [Nitro] Security problems In-Reply-To: References: Message-ID: Interesting link, thanks! -g. On 11/16/05, Bryan Soto wrote: > Hi, > > This web site was mentioned in the Rails book. > > The Open Web Application Security Project > > http://www.owasp.org/index.jsp > > I hope this is something along the lines of what you were looking for. > > bryan > > > On 11/11/05, George Moschovitis wrote: > > > > Dear devs, > > > > I am wondering if anyone has found (or can find) any security problems > > with Nitro. Moreover, If anyone can suggest any common security > > measures that could be wrapped in a controller helper/aspect I would > > like to know. Even urls for (authoritive) articles regarding web site > > security would be helpful. > > > > Thanks in advance, > > 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 > > > > > _______________________________________________ > 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 Wed Nov 16 10:02:53 2005 From: rob at motionpath.com (Rob Pitt) Date: Wed, 16 Nov 2005 15:02:53 +0000 Subject: [Nitro] Question for Postgres users on evolve_schema. In-Reply-To: References: Message-ID: <437B4A1D.40703@motionpath.com> Hello, I wrote these patches for PostgreSQL and their run-time behaviour is as you described. Cheers, rp Bryan Soto wrote: > I've got a patch to add similar functionality for MySql, but was > wondering about it's run-time behaviour. > > Basically, assuming Og.setup is set up to perform field additions and > deletions, > > * At application startup, fields are added and deleted. > > * While the application is running, if whatever file containing > Og.setup is touched, fields are added. > > * Fields are _not_ deleted during application run-time, only at startup. > > Is that the run-time behaviour for Postgres also? > > Thanks, > > bryan > >------------------------------------------------------------------------ > >_______________________________________________ >Nitro-general mailing list >Nitro-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/nitro-general > > From rob at motionpath.com Wed Nov 16 11:58:30 2005 From: rob at motionpath.com (Rob Pitt) Date: Wed, 16 Nov 2005 16:58:30 +0000 Subject: [Nitro] Idea for improving performance Message-ID: <437B6536.8060407@motionpath.com> Hello there, I think that Og should only write back to the database fields that have changed. Every object could keep an array containing the state of each field (modified, or not) and the setter methods could modify the array. It could also be implemented by having the array store the modified properties, pushing the properties into the array when they are modified. You could then use eval to completely remove the logic that does this from the setter method causing minimal overhead. This is a feature I expect would improve performance noticably. This is just two ideas on how it could be done... what do you think? From francesco.l at ymir.it Wed Nov 16 13:44:23 2005 From: francesco.l at ymir.it (Francesco Lunelli) Date: Wed, 16 Nov 2005 19:44:23 +0100 Subject: [Nitro] og troubles In-Reply-To: <200511120043.03916.m.fellinger@gmail.com> References: <4374F582.7060402@ymir.it> <200511120043.03916.m.fellinger@gmail.com> Message-ID: <437B7E07.50707@ymir.it> Michael Fellinger ha scritto: >Hi Francesco, > >It would be of great interest to me (and all the others i guess) what your >run.rb and og-model looks like. >The issue with psql-database-creation is known (at least to me) but not fixed >yet (i created the database once and now morphing is working well for me) >Please provide us with the code you tested so we can add it to the testcases >and aim on fixing and of course tell you what is wrong with it. > >thx in advance >manveru > > > The code I am testing is the example you anc find in examples directory in og /usr/lib/ruby/gems/1.8/gems/og-0.24.0/examples I paste it a the end of my mail. What I find very strange is that the same code is working perfectly in my Kubuntu amd64 but gives me errors in Debian amd64 and in kubuntu i386. I tested it with postgresql 7.4 and 8.0 Running it after creating database test maually gives me this error: D, [2005-11-16T19:41:05.671950 #11730] DEBUG -- : Og manageable classes: [Part, UserComment, ArticleComment, Category, Article, U ser, Comment] NOTICE: CREATE TABLE will create implicit sequence "ogpart_oid_seq" for "serial" column "ogpart.oid" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ogpart_pkey" for table "ogpart" I, [2005-11-16T19:41:05.744207 #11730] INFO -- : Created table 'ogpart'. NOTICE: CREATE TABLE will create implicit sequence "ogcomment_oid_seq" for "serial" column "ogcomment.oid" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ogcomment_pkey" for table "ogcomment" I, [2005-11-16T19:41:05.811032 #11730] INFO -- : Created table 'ogcomment'. NOTICE: CREATE TABLE will create implicit sequence "ogusercomment_oid_seq" for "serial" column "ogusercomment.oid" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ogusercomment_pkey" for table "ogusercomment" I, [2005-11-16T19:41:05.884816 #11730] INFO -- : Created table 'ogusercomment'. NOTICE: CREATE TABLE will create implicit sequence "ogarticlecomment_oid_seq" for "serial" column "ogarticlecomment.oid" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ogarticlecomment_pkey" for table "ogarticlecomment" I, [2005-11-16T19:41:05.993305 #11730] INFO -- : Created table 'ogarticlecomment'. NOTICE: CREATE TABLE will create implicit sequence "ogcategory_oid_seq" for "serial" column "ogcategory.oid" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ogcategory_pkey" for table "ogcategory" I, [2005-11-16T19:41:06.071713 #11730] INFO -- : Created table 'ogcategory'. NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ogj_article_category_pkey" for table "ogj_article_category" D, [2005-11-16T19:41:06.080041 #11730] DEBUG -- : Created jointable 'ogj_article_category'. NOTICE: CREATE TABLE will create implicit sequence "ogarticle_oid_seq" for "serial" column "ogarticle.oid" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ogarticle_pkey" for table "ogarticle" I, [2005-11-16T19:41:06.222786 #11730] INFO -- : Created table 'ogarticle'. NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ogj_article_category_pkey" for table "ogj_article_category" /usr/local/lib/site_ruby/1.8/og/store/psql.rb:222:in `exec': ERROR: la relazione "ogj_article_category" esiste gi? (PGError) from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:222:in `create_table' from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:221:in `each' from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:221:in `create_table' from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:219:in `create_table' from (eval):6:in `og_create_schema' from /usr/local/lib/site_ruby/1.8/og/store/sql.rb:295:in `enchant' from /usr/local/lib/site_ruby/1.8/og/store/psql.rb:142:in `enchant' from /usr/local/lib/site_ruby/1.8/og/manager.rb:120:in `manage' from /usr/local/lib/site_ruby/1.8/og/manager.rb:175:in `manage_classes' from /usr/local/lib/site_ruby/1.8/og/manager.rb:175:in `each' from /usr/local/lib/site_ruby/1.8/og/manager.rb:175:in `manage_classes' from /usr/local/lib/site_ruby/1.8/og.rb:117:in `setup' from run.rb:147 ------------------------------- Example code----------------- # A simple example to demonstrate the Og library. require 'og' # Full debug information. $DBG = true # A child class. class Comment property :body, String def initialize(body = nil) @body = body end def to_s return @body end end # = A Parent class. class User property :name, String, :uniq => true has_many :comments, UserComment def initialize(name = nil) @name = name end def to_s return @name end end # A parent class. class Article property :title, String property :body, String # override the default O->R mapping property :level, Fixnum, :sql => "smallint DEFAULT 1" # store a Ruby Hash in the Database. YAML # is used for serializing the attribute. # no need to define the class, but you can if you want. property :options # exactly like the standard Ruby attr creates only the reader. prop :create_time, Time # define comment relation: has_many :comments, ArticleComment has_many :parts, Part # many to many relation. many_to_many Category # define author relation: belongs_to :author, User # this attribute is NOT stored in the db. attr_accessor :other_options # Managed object constructors with no args, take *args # as parameter to allow for Mixin chaining. def initialize(title = nil, body = nil) @title, @body = title, body @create_time = Time.now @options = {} @other_options = {} end def to_s return "#@title: #@body" end end # A parent class. class Category property :title, String property :body, String # define a 'many to many' relation. many_to_many Article def initialize(title = nil) @title = title end end # Article comment. class ArticleComment < Comment belongs_to Article end # User comment. class UserComment < Comment belongs_to :author, User end # Another child class. class Part property :name, String belongs_to Article def initialize(name = nil) @name = name end def to_s return @name end end # Og configuration. config = { :destroy => false, # destroy table created from earlier runs. :store => 'psql', :name => 'test', :user => "franz", :password => "franz" } # Initialize Og db = Og.setup(config) # Create some articles a1 = Article.new('Title1', 'Body1') a1.save # shortcut a2 = Article.create('Title2', 'Body2') puts "\n\n" puts "* Get and print all articles:" articles = Article.all articles.each { |a| puts a } # Create some comments c1 = ArticleComment.new('Comment 1') c1.article = a1 c1.save c2 = ArticleComment.new('Comment 2') # alternative way to set the parent. c2.article_oid = a1.oid # an alternative way to save db.store << c2 # an alternative (easier and cooler) way to add children in a # has_many relation: c3 = ArticleComment.new('Comment 3') # add_comment is automatically added by Og. a1.comments << c3 puts "\n\n" puts "* Print all all comments for article 1:" a1.comments.each { |c| puts c } # Most Og commands allow you to fine-tune the low level # SQL code by passing extra_sql parameters, here is an # example puts "\n\n" puts "* comments with sql finetunings:" # use a standard SQL limit clause a1.comments(:limit => 2).each { |c| puts c } # Change a managed object a1.title = 'Changed Title' # Og knows that this is a managed object and executes # an SQL UPDATE instead of an SQL INSERT a1.save! puts "\n\n" Article.all.each { |a| puts a } # The previous command updates the whole object. It is used # when there are many updates or you dont care about speed. # You can also update specific fields a2.title = 'A specific title' a2.update(:properties => [:title]) puts "\n\n" Article.all.each { |a| puts a } # delete an object puts '-----------------1' ArticleComment.delete(c3) puts '-----------------2' puts "\n\n" ArticleComment.all.each { |a| puts a } # Serialize a hash a1.options = { :k1 => 'val1', :k2 => 'val2' } a1.save! # lookup an object article = Article[a1.oid] puts "\n\n" puts article.options.inspect u = User.new('gmosx') u.save! article = Article[1] # you can also lookup by the name property. article.author = User.find_by_name('gmosx') article.save! part = Part.new('admin') part.article = article part.save! article.parts.each { |pa| puts pa } puts "\n\n" puts '---' c1 = Category.create('Category1') c2 = Category.create('Category2') article.categories << c1 article.categories << c2 puts '---' article.categories.each { |c| puts c.title } puts '---' c2.articles.each { |a| puts a.title } article.categories.delete(c1) puts '---' article.categories.each { |c| puts c.title } # create and save the article in one step. article = Article.create('title', 'body') puts '--', article.oid -- Francesco Lunelli Ymir s.r.l. Viale Verona 190/11 38100 Trento From m.fellinger at gmail.com Wed Nov 16 13:51:15 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Wed, 16 Nov 2005 19:51:15 +0100 Subject: [Nitro] patches for 0.25.0 In-Reply-To: References: Message-ID: <200511161951.19831.m.fellinger@gmail.com> hey George, just wanted to announce a small bug with file-uploads for following html HTMLCODEHTMLCODEHTMLCODEHTMLCODEHTMLCODEHTMLCODE
HTMLCODEHTMLCODEHTMLCODEHTMLCODEHTMLCODEHTMLCODEHTML i get the following for request.params.inspect RUBYCODERUBYCODERUBYCODERUBYCODERUBYCODERUBYCODERUBY { "ogimage"=>[ [[#, #],#] ] } RUBYCODERUBYCODERUBYCODERUBYCODERUBYCODERUBYCODERUBY this is by no means critical, since a small request.params.flatten! corrects it, but was a bit annoying and disturbs the smooth flow of files :) i would be glad if someone would fix it before 0.25 - but will try to get a fix done on my own before. mfg manveru Am Montag 14 November 2005 08:29 schrieb George Moschovitis: > Dear devs, > > If anyone has any patches to submit for 0.25.0, now is the time to do > it. The release of the new version will happen over the next couple of > days. This will be mainly a bug fix/stabilization/refinement release. > > 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 -------------- 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/20051116/56c257b9/attachment.bin From james_b at neurogami.com Thu Nov 17 00:11:30 2005 From: james_b at neurogami.com (James Britt) Date: Wed, 16 Nov 2005 22:11:30 -0700 Subject: [Nitro] Template compilation bug Message-ID: <437C1102.9010404@neurogami.com> Apologies f this was already reported, but it's the first I've seen it (I'm using Nitro 0.24 with Ruby 1.8.2 on Windows) I was trying to create a simple Web page that took the contents of a text field and coped it over to a div as the user typed. But I kept getting JavaScript errors. My template has a javascript section with this code: function process( text ) { return( text.replace( /\n/, "\n\r" ) ); } What ends up in the browser, though, is this: function process( text ) { return( text.replace( / /, " " ) ); } It seems that my newline and carriage-return text is being interpreted literally by Nitro, instead of being passed though as-is. I can work around this by sticking the script in an external file, but that should be required. 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 Thu Nov 17 02:54:06 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 17 Nov 2005 09:54:06 +0200 Subject: [Nitro] Idea for improving performance In-Reply-To: <437B6536.8060407@motionpath.com> References: <437B6536.8060407@motionpath.com> Message-ID: Well, I was thinking about something like this for a long time. I am not sure this is the right thing to add, any other opinions? In any case, a patch would help here ;-) regards, George. On 11/16/05, Rob Pitt wrote: > Hello there, > > I think that Og should only write back to the database fields that have > changed. Every object could keep an array containing the state of each > field (modified, or not) and the setter methods could modify the array. > It could also be implemented by having the array store the modified > properties, pushing the properties into the array when they are > modified. You could then use eval to completely remove the logic that > does this from the setter method causing minimal overhead. > > This is a feature I expect would improve performance noticably. This is > just two ideas on how it could be done... what do you think? > _______________________________________________ > 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 Nov 17 02:58:33 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 17 Nov 2005 09:58:33 +0200 Subject: [Nitro] Template compilation bug In-Reply-To: <437C1102.9010404@neurogami.com> References: <437C1102.9010404@neurogami.com> Message-ID: Hmm thanks for the bug report, will have a look at it. But as always a patch is really prefered :) regards, George. On 11/17/05, James Britt wrote: > Apologies f this was already reported, but it's the first I've seen it > (I'm using Nitro 0.24 with Ruby 1.8.2 on Windows) > > I was trying to create a simple Web page that took the contents of a > text field and coped it over to a div as the user typed. > > But I kept getting JavaScript errors. > > My template has a javascript section with this code: > > > function process( text ) { > return( text.replace( /\n/, "\n\r" ) ); > } > > What ends up in the browser, though, is this: > > function process( text ) { > return( text.replace( / > /, " > > " ) ); > > } > > It seems that my newline and carriage-return text is being interpreted > literally by Nitro, instead of being passed though as-is. > > I can work around this by sticking the script in an external file, but > that should be required. > > > 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 Nov 17 05:52:28 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 17 Nov 2005 12:52:28 +0200 Subject: [Nitro] Nitro + Og 0.25.0 Og scope, dynamic finders, evolution, helpers, bug fixes Message-ID: Dear devs, I am pleased to announce new versions of Nitro and Og homepage: http://www.nitrohq.com download: http://rubyforge.org/projects/nitro/ mailing list: http://rubyforge.org/mailman/listinfo/nitro-general irc: irc.freenode.net #nitro What new ======= This is the first in a series of releases focused on stability and refinement. Many bugs where fixed, the high level api was improved where needed, and we still got some small but incredibly useful new features. Enjoy! Most notable changes: * Support for constrained / scoped queries in Og, here are some examples: User.with_scope(:condition => 'age > 2') { users = User.all } Users.articles.find "title LIKE %t%" # => constrain i users articles. * Dynamic auto generators, you can now query the database in English: User.find_by_name_and_age('gmosx', 'age') User.find_or_create_by_name_and_age(...) * Added experimental version of a new schema evolution system. Assuming evolve_schema = true and evolve_schema_cautious = false * With this patch, on application startup, fields are added and deleted. * During run-time, if the file containing Og.setup is touched, fields are added. * Fields are _not_ deleted during run-time, only at application startup. a the moment this works only in the PostgreSQL store, support for more stores is coming in the next versions. Thanks to Rob Pitt and Bryan Sotto for this feature. * Template morphing now handles nested elements, an example:
* Added some useful helpers to make the code you write cleaner, here are some examples: class Article is Taggable instead of class Article include Og::Taggable or class MainController helper :pager, :javascript, :sitemap instead of class MainController include Nitro::PagerHelper include Nitro::JavascriptHelper ... and stuff like that... * New, improved, clean taggable implementation. This new implementation supports polymorphism. class Article is Taggable end class Photo is Taggable end ... t = Tag.find_by_name('new') t.articles t.photos * Added useful StaticInclude as a separate compiler module to act as the first stage in the compilation pipeline. * Integrated latest versions of Prototype, Scriptaculous, KirbyBase and facets. * General code cleanup and refactoring. * Many, many bug fixes, including security fixes. What is Nitro? ========== 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. Nitro is Web 2.0 ready, featuring excellent support for AJAX, XML, Syndication while staying standards compliant. Enjoy, George Moschovitis -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From james_b at neurogami.com Thu Nov 17 09:47:38 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 17 Nov 2005 07:47:38 -0700 Subject: [Nitro] My first public Nitro site Message-ID: <437C980A.8000509@neurogami.com> I've put up an Og/Nitro powered site at http://web2.0validator.com/ If it isn't clear from the text (and, apparently, a fair number of people either do not read the content, or have a hard time understanding the humor), this is both a jab at Web 2.0 hype and an experiment in social scripting. There's more detail at http://web2.0validator.com/thefullstory/ Oh, and the current score for nitrohq.com is 3 out of 11. But that can change from moment to moment. 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 Thu Nov 17 09:50:37 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 17 Nov 2005 16:50:37 +0200 Subject: [Nitro] My first public Nitro site In-Reply-To: <437C980A.8000509@neurogami.com> References: <437C980A.8000509@neurogami.com> Message-ID: Hello James, nice to hear about this, can I add this link to the newly added Real world Nitro page on the wiki? This webapp is really smart btw. -g. PS: off topic, I got a cgi adapter patch, will be integrated in the repository version tomorrow, hope this fixes your problems... On 11/17/05, James Britt wrote: > I've put up an Og/Nitro powered site at > > http://web2.0validator.com/ > > If it isn't clear from the text (and, apparently, a fair number of > people either do not read the content, or have a hard time understanding > the humor), this is both a jab at Web 2.0 hype and an experiment in > social scripting. > > There's more detail at > > http://web2.0validator.com/thefullstory/ > > > Oh, and the current score for nitrohq.com is 3 out of 11. > > But that can change from moment to moment. > > > 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 george.moschovitis at gmail.com Thu Nov 17 09:55:22 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 17 Nov 2005 16:55:22 +0200 Subject: [Nitro] My first public Nitro site In-Reply-To: <437C980A.8000509@neurogami.com> References: <437C980A.8000509@neurogami.com> Message-ID: >> Appears to be built using Ruby on Rails eegghh? what kind of rule is this? ;-P -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From citizen428 at gentoo.org Thu Nov 17 09:57:32 2005 From: citizen428 at gentoo.org (Michael Kohl) Date: Thu, 17 Nov 2005 15:57:32 +0100 Subject: [Nitro] My first public Nitro site In-Reply-To: <437C980A.8000509@neurogami.com> References: <437C980A.8000509@neurogami.com> Message-ID: <20051117155732.60c2140b@localhost> On Thu, 17 Nov 2005 07:47:38 -0700 James Britt wrote: > I've put up an Og/Nitro powered site at > > http://web2.0validator.com/ That's a nice project James! :) > If it isn't clear from the text (and, apparently, a fair number of > people either do not read the content, or have a hard time > understanding the humor), I've read it and really appreciate the humor. Cheers, Michael -- web at citizen428.net citizen428 at gentoo.org http://citizen428.net/ http://dev.gentoo.org/~citizen428/ GnuPG key: 0x90CA09E3/4D21 916E DBCE 72B8 CDC5 BD87 DE2D 91A2 90CA 09E3 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051117/0e5b7796/attachment.bin From james_b at neurogami.com Thu Nov 17 10:06:11 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 17 Nov 2005 08:06:11 -0700 Subject: [Nitro] Trouble installing new Nitro gem Message-ID: <437C9C63.1030606@neurogami.com> I just tried to update my copy of Nitro on my WinXP machine, and had these results: d:\development>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" update nitro Upgrading installed gems... Attempting remote upgrade of nitro Attempting remote installation of 'nitro' Install required dependency gen? [Yn] Y Install required dependency daemons? [Yn] Y ERROR: While executing gem ... (OpenURI::HTTPError) 300 Multiple Choices d:\development> Has anyone else seen this, or had gem installation issues? I'm using the "1-click" Windows isntaller of Ruby 1.8.2, and gems 0.8.10. 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 Thu Nov 17 10:07:19 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 17 Nov 2005 17:07:19 +0200 Subject: [Nitro] Trouble installing new Nitro gem In-Reply-To: <437C9C63.1030606@neurogami.com> References: <437C9C63.1030606@neurogami.com> Message-ID: I think this has something to do with ruby forge... retry until it works ;-) -g. On 11/17/05, James Britt wrote: > I just tried to update my copy of Nitro on my WinXP machine, and had > these results: > > > d:\development>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" update nitro > Upgrading installed gems... > Attempting remote upgrade of nitro > Attempting remote installation of 'nitro' > Install required dependency gen? [Yn] Y > Install required dependency daemons? [Yn] Y > ERROR: While executing gem ... (OpenURI::HTTPError) > 300 Multiple Choices > > d:\development> > > > Has anyone else seen this, or had gem installation issues? > > I'm using the "1-click" Windows isntaller of Ruby 1.8.2, and gems 0.8.10. > > > 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 james_b at neurogami.com Thu Nov 17 10:14:08 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 17 Nov 2005 08:14:08 -0700 Subject: [Nitro] Trouble installing new Nitro gem In-Reply-To: References: <437C9C63.1030606@neurogami.com> Message-ID: <437C9E40.2060600@neurogami.com> George Moschovitis wrote: > I think this has something to do with ruby forge... > retry until it works ;-) I got things working by using gem install rather than gem update, but that may be coincidence. James From jeff.darklight at gmail.com Thu Nov 17 10:57:15 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 17 Nov 2005 07:57:15 -0800 Subject: [Nitro] Trouble installing new Nitro gem In-Reply-To: <437C9E40.2060600@neurogami.com> References: <437C9C63.1030606@neurogami.com> <437C9E40.2060600@neurogami.com> Message-ID: Nope, I was getting the same thing ... it was a try, try , try, ah, it worked ... j. On 11/17/05, James Britt wrote: > George Moschovitis wrote: > > I think this has something to do with ruby forge... > > retry until it works ;-) > > I got things working by using gem install rather than gem update, but > that may be coincidence. > > James > _______________________________________________ > 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 From citizen428 at gentoo.org Thu Nov 17 11:01:49 2005 From: citizen428 at gentoo.org (Michael Kohl) Date: Thu, 17 Nov 2005 17:01:49 +0100 Subject: [Nitro] Nitro + Og 0.25.0 Og scope, dynamic finders, evolution, helpers, bug fixes In-Reply-To: References: Message-ID: <20051117170149.464f2be2@localhost> On Thu, 17 Nov 2005 12:52:28 +0200 George Moschovitis wrote: > Dear devs, > > I am pleased to announce new versions of Nitro and Og Is this me being stupid, or is there a problem with gen? Here's what I get when I try to use it (gen app ~/Projects/testapp): gen:41: undefined method `generator_dir=' for nil:NilClass (NoMethodError) Cheers, Michael -- web at citizen428.net citizen428 at gentoo.org http://citizen428.net/ http://dev.gentoo.org/~citizen428/ GnuPG key: 0x90CA09E3/4D21 916E DBCE 72B8 CDC5 BD87 DE2D 91A2 90CA 09E3 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051117/ddcf9f33/attachment.bin From jeff.darklight at gmail.com Thu Nov 17 11:03:40 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Thu, 17 Nov 2005 08:03:40 -0800 Subject: [Nitro] Nitro + Og 0.25.0 Og scope, dynamic finders, evolution, helpers, bug fixes In-Reply-To: <20051117170149.464f2be2@localhost> References: <20051117170149.464f2be2@localhost> Message-ID: Can anybody else pipe in with any experience with using postgres-pr & nitro ? I'd really like to know how much "fun" I'm digging myself into. j. On 11/17/05, Michael Kohl wrote: > On Thu, 17 Nov 2005 12:52:28 +0200 George Moschovitis > wrote: > > > Dear devs, > > > > I am pleased to announce new versions of Nitro and Og > > Is this me being stupid, or is there a problem with gen? Here's what I > get when I try to use it (gen app ~/Projects/testapp): > > gen:41: undefined method `generator_dir=' for nil:NilClass > (NoMethodError) > > Cheers, > Michael > > -- > web at citizen428.net citizen428 at gentoo.org > http://citizen428.net/ http://dev.gentoo.org/~citizen428/ > GnuPG key: 0x90CA09E3/4D21 916E DBCE 72B8 CDC5 BD87 DE2D 91A2 90CA 09E3 > > > _______________________________________________ > 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 From francesco.l at ymir.it Thu Nov 17 12:16:04 2005 From: francesco.l at ymir.it (Francesco Lunelli) Date: Thu, 17 Nov 2005 18:16:04 +0100 Subject: [Nitro] Og 0.25.0 vs Og 0.5.0 In-Reply-To: References: Message-ID: <437CBAD4.10208@ymir.it> I am still trying to use og. Og 0.5.0 (installed from gem) works for me, the only part still not working is the "create database". Instead og 0.25.0 (installed as required gem for nitro gem) still gives me the same errors then 0.24.0. I changed the example/run.rb file and I can create my table and store object but still doesn't serialize hashes. ciao -- Francesco Lunelli Ymir s.r.l. Viale Verona 190/11 38100 Trento From james_b at neurogami.com Thu Nov 17 12:18:38 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 17 Nov 2005 10:18:38 -0700 Subject: [Nitro] CGI still broken in 0.25? Message-ID: <437CBB6E.2070300@neurogami.com> I just tried to run an app created with with 0.23 or 0.24, with the Nitro 0.25 update installed. I get the now-familiar message: #> I take it, then, that 0.25 is still CGI-crippled? How are people running their Nitro apps? My next choice would be SCGI under Apache2, or perhaps fcgi with lighttpd (if I could figure out how to have multiple virtual hosts), but it seems all of these would depend on CGI working correctly. 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 fabian at oggu.de Thu Nov 17 13:24:48 2005 From: fabian at oggu.de (Fabian Buch) Date: Thu, 17 Nov 2005 19:24:48 +0100 Subject: [Nitro] CGI still broken in 0.25? In-Reply-To: <437CBB6E.2070300@neurogami.com> References: <437CBB6E.2070300@neurogami.com> Message-ID: <63d5e01b99f592c7bd9661fd04f7b34f@oggu.de> hi Am 17.11.2005 um 18:18 schrieb James Britt: > How are people running their Nitro apps? My next choice would be SCGI I totally agree. I'm waiting for working CGI since months now, before really starting development in Nitro (I don't depend on it, since my current apps run under Rails and they aren't really important anyway, but I'd really like to do future stuff in Nitro). The only thing that keeps me from developing and running real-world apps in Nitro is working CGI. I've hope though, cause George mentioned in a post to this mailing-list (today or yesterday) that he has some patch he'll commit to the DARCS repository soon. > under Apache2, or perhaps fcgi with lighttpd (if I could figure out how > to have multiple virtual hosts), but it seems all of these would depend > on CGI working correctly. I'm far from an fcgi- or other adapter-stuff- specialist, so I might be wrong for the following: I don't understand why there have to be sooo different adapters for everything (cgi, fcgi, webrick...). Isn't it (as I think we already see here) too much work to maintain so many different adapters (there might be more comming, like acgi or whatever) if something essential (or design) changes in Nitro? Wouldn't it work if everything would be developed so that it works in CGI? I thought if something works in CGI it might work everywhere with tiny changes (like wrapping in fcgi and acgi). If it were like this it wouldn't make a difference if running in cgi, fcgi on Apache or whatever random webserver with scgi or acgi as long as the webserver supports CGI. Maybe I have misleading design-ideas in my head (I never developed a web-framework, just in them or low-level), so if I'm wrong, please correct me. Fabian Buch From rainhead at gmail.com Thu Nov 17 17:32:45 2005 From: rainhead at gmail.com (Peter Abrahamsen) Date: Thu, 17 Nov 2005 14:32:45 -0800 Subject: [Nitro] Nitro + Og 0.25.0 Og scope, dynamic finders, evolution, helpers, bug fixes In-Reply-To: <20051117170149.464f2be2@localhost> References: <20051117170149.464f2be2@localhost> Message-ID: <0720A9EF-5E8E-4815-9EF7-20870E5B2C61@gmail.com> I believe we're back to using nitrogen. Right? I can't test, because (as pointed out) rubyforge seems to be borked. P On Nov 17, 2005, at 8:01 AM, Michael Kohl wrote: > On Thu, 17 Nov 2005 12:52:28 +0200 George Moschovitis > wrote: > >> Dear devs, >> >> I am pleased to announce new versions of Nitro and Og > > Is this me being stupid, or is there a problem with gen? Here's what I > get when I try to use it (gen app ~/Projects/testapp): > > gen:41: undefined method `generator_dir=' for nil:NilClass > (NoMethodError) > > Cheers, > Michael > > -- > web at citizen428.net > citizen428 at gentoo.org > http://citizen428.net/ http://dev.gentoo.org/ > ~citizen428/ > GnuPG key: 0x90CA09E3/4D21 916E DBCE 72B8 CDC5 BD87 DE2D 91A2 90CA > 09E3 > _______________________________________________ > 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: 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/20051117/5eed46dd/attachment.bin From james_b at neurogami.com Thu Nov 17 17:57:58 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 17 Nov 2005 15:57:58 -0700 Subject: [Nitro] Nitro + Og 0.25.0 Og scope, dynamic finders, evolution, helpers, bug fixes In-Reply-To: <0720A9EF-5E8E-4815-9EF7-20870E5B2C61@gmail.com> References: <20051117170149.464f2be2@localhost> <0720A9EF-5E8E-4815-9EF7-20870E5B2C61@gmail.com> Message-ID: <437D0AF6.7090008@neurogami.com> Peter Abrahamsen wrote: > I believe we're back to using nitrogen. Right? > > I can't test, because (as pointed out) rubyforge seems to be borked. I had gem install issues, but downloading by hand and doing a local install helped part of the way. As did running gem install instead of gem update. YMMV. James From transfire at gmail.com Fri Nov 18 00:58:50 2005 From: transfire at gmail.com (TRANS) Date: Fri, 18 Nov 2005 00:58:50 -0500 Subject: [Nitro] Nitro + Og 0.25.0 Og scope, dynamic finders, evolution, helpers, bug fixes In-Reply-To: References: Message-ID: <4b6f054f0511172158w1481ab91n7348b6c3aec51d62@mail.gmail.com> * Dynamic auto generators, you can now query the database in English: User.find_by_name_and_age('gmosx', 'age') User.find_or_create_by_name_and_age(...) I take it you are using #method_missing to implement this feature? While I have to say that it's very cool, at the same time I am little uneasy about it too. Maybe it's unfounded but the reason I say that is that natural langauge can be a bit ambigious. In other words how do I know what's legal syntax or not and how it will be interpreted _exactly_? In the spirit of Ruby wouldn't a notion like this be preferable? User.find_by { |usr| usr.name = 'gmox' and usr.age = 'age' } Or can that already be done? Thanks, T. From george.moschovitis at gmail.com Fri Nov 18 02:26:48 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 18 Nov 2005 09:26:48 +0200 Subject: [Nitro] Nitro + Og 0.25.0 Og scope, dynamic finders, evolution, helpers, bug fixes In-Reply-To: <4b6f054f0511172158w1481ab91n7348b6c3aec51d62@mail.gmail.com> References: <4b6f054f0511172158w1481ab91n7348b6c3aec51d62@mail.gmail.com> Message-ID: > While I have to say that it's very cool, at the same time I am little > ... > _exactly_? Well, just don't use the feature ;-) > In the spirit of Ruby wouldn't a notion like this be preferable? > User.find_by { |usr| usr.name = 'gmox' and usr.age = 'age' } > Or can that already be done? This is in the todo list ;-) -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Fri Nov 18 02:31:17 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 18 Nov 2005 09:31:17 +0200 Subject: [Nitro] CGI still broken in 0.25? In-Reply-To: <437CBB6E.2070300@neurogami.com> References: <437CBB6E.2070300@neurogami.com> Message-ID: > I take it, then, that 0.25 is still CGI-crippled? Yeap, CGI is not fixed in 0.25.0. However I just applied a CGI patch by Guill yesterday, check out the repository version and try it ;-) > under Apache2, or perhaps fcgi with lighttpd (if I could figure out how > to have multiple virtual hosts), but it seems all of these would depend > on CGI working correctly. I am using lighttpd/fcgi to run multiple sites. works perfectly. Still cannot understand why someone would use CGI in a real world application, but thankfully, Guill's fix will solve the problem for people who need this. regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Fri Nov 18 02:35:12 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 18 Nov 2005 09:35:12 +0200 Subject: [Nitro] CGI still broken in 0.25? In-Reply-To: <63d5e01b99f592c7bd9661fd04f7b34f@oggu.de> References: <437CBB6E.2070300@neurogami.com> <63d5e01b99f592c7bd9661fd04f7b34f@oggu.de> Message-ID: > I've hope though, cause George mentioned in a post to this mailing-list > (today or yesterday) that he has some patch he'll commit to the DARCS > repository soon. I have allready added this... I am also attaching the patch to this message. > I don't understand why there have to be sooo different adapters for > ... > whatever random webserver with scgi or acgi as long as the webserver > supports CGI. there is a common base for this, ie the cgi directory ;-) There seems to be a problem to CGI adapter (this file is like 5 lines of code). FCGI and SCGI work correctly. -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com -------------- next part -------------- A non-text attachment was scrubbed... Name: bundle_cgi_adapter.zip Type: application/zip Size: 13774 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051118/4fa79002/attachment.zip From george.moschovitis at gmail.com Fri Nov 18 02:42:43 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 18 Nov 2005 09:42:43 +0200 Subject: [Nitro] IRC Channel Message-ID: Btw, i would like to invite all of you to the Nitro IRC channel some guys from the list started. It's a great way to find answers to your nitro questions, meet nice people (and loose your time, IRC is addictive). irc.freenode.net #nitro regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From rob at motionpath.com Fri Nov 18 05:08:35 2005 From: rob at motionpath.com (Rob Pitt) Date: Fri, 18 Nov 2005 10:08:35 +0000 Subject: [Nitro] CGI still broken in 0.25? In-Reply-To: <437CBB6E.2070300@neurogami.com> References: <437CBB6E.2070300@neurogami.com> Message-ID: <437DA823.1030905@motionpath.com> Under apache with the fast cgi adapter. James Britt wrote: >I just tried to run an app created with with 0.23 or 0.24, with the >Nitro 0.25 update installed. I get the now-familiar message: > >#> > > >I take it, then, that 0.25 is still CGI-crippled? > >How are people running their Nitro apps? My next choice would be SCGI >under Apache2, or perhaps fcgi with lighttpd (if I could figure out how >to have multiple virtual hosts), but it seems all of these would depend >on CGI working correctly. > > > >Thanks, > >James > > > From rob at motionpath.com Fri Nov 18 05:10:40 2005 From: rob at motionpath.com (Rob Pitt) Date: Fri, 18 Nov 2005 10:10:40 +0000 Subject: [Nitro] Trouble installing new Nitro gem In-Reply-To: <437C9C63.1030606@neurogami.com> References: <437C9C63.1030606@neurogami.com> Message-ID: <437DA8A0.1000303@motionpath.com> I had no problems when I used ruby on XP the other day. I would recommend you try an OS more friendly to coders with better tools like KDE/Linux (or if your rich, OS X). Back to the problem in hand, you should be able to work around this by downloading the daemons gem file by hand and then running gem install on the file. James Britt wrote: >I just tried to update my copy of Nitro on my WinXP machine, and had >these results: > > >d:\development>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" update nitro >Upgrading installed gems... >Attempting remote upgrade of nitro >Attempting remote installation of 'nitro' >Install required dependency gen? [Yn] Y >Install required dependency daemons? [Yn] Y >ERROR: While executing gem ... (OpenURI::HTTPError) > 300 Multiple Choices > >d:\development> > > >Has anyone else seen this, or had gem installation issues? > >I'm using the "1-click" Windows isntaller of Ruby 1.8.2, and gems 0.8.10. > > >James > > > From rob at motionpath.com Fri Nov 18 06:55:57 2005 From: rob at motionpath.com (Rob Pitt) Date: Fri, 18 Nov 2005 11:55:57 +0000 Subject: [Nitro] My first public Nitro site In-Reply-To: References: <437C980A.8000509@neurogami.com> Message-ID: <437DC14D.7080803@motionpath.com> This was a bug with the original Web 2.0 specification and has now been corrected for web 2.1. George Moschovitis wrote: >>>Appears to be built using Ruby on Rails >>> >>> > >eegghh? what kind of rule is this? ;-P > >-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 > > From reid.thompson at ateb.com Fri Nov 18 08:23:48 2005 From: reid.thompson at ateb.com (Reid Thompson) Date: Fri, 18 Nov 2005 08:23:48 -0500 Subject: [Nitro] Idea for improving performance In-Reply-To: References: <437B6536.8060407@motionpath.com> Message-ID: <437DD5E4.8000403@ateb.com> George Moschovitis wrote: > Well, I was thinking about something like this for a long time. I am > not sure this is the right thing to add, any other opinions? In any > case, a patch would help here ;-) > > regards, > George. > > On 11/16/05, Rob Pitt wrote: > >>Hello there, >> >>I think that Og should only write back to the database fields that have >>changed. Every object could keep an array containing the state of each >>field (modified, or not) and the setter methods could modify the array. >>It could also be implemented by having the array store the modified >>properties, pushing the properties into the array when they are >>modified. You could then use eval to completely remove the logic that >>does this from the setter method causing minimal overhead. >> >>This is a feature I expect would improve performance noticably. This is >>just two ideas on how it could be done... what do you think? >>_______________________________________________ >>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 not sure whether it would make any difference for PostgreSQL -- If I understand correctly, an update means a delete and insert regardless of the number of fields you are updating. Seems like the only gain would be size of the sql statement i.e. not very much. From tim at keow.org Fri Nov 18 10:38:56 2005 From: tim at keow.org (Tim Larson) Date: Fri, 18 Nov 2005 15:38:56 +0000 Subject: [Nitro] TrueClass Message-ID: <20051118153856.GA4547@localhost> TrueClass/boolean/checkboxes have a bug...look at og-0.25.0/lib/og/store/sql.rb, specifically the difference between the handling of TrueClass in write_prop ('t', NULL) versus in read_prop (!=0, 0). Gotta pick one pattern to persist true/false values and stick with it! :) --Tim Larson From transfire at gmail.com Fri Nov 18 22:06:36 2005 From: transfire at gmail.com (TRANS) Date: Fri, 18 Nov 2005 22:06:36 -0500 Subject: [Nitro] Idea for improving performance In-Reply-To: <437DD5E4.8000403@ateb.com> References: <437B6536.8060407@motionpath.com> <437DD5E4.8000403@ateb.com> Message-ID: <4b6f054f0511181906k4ae25467h360930c4645297f2@mail.gmail.com> > not sure whether it would make any difference for PostgreSQL -- If I > understand correctly, an update means a delete and insert regardless of > the number of fields you are updating. Seems like the only gain would > be size of the sql statement i.e. not very much. *Postgresql* deletes and inserts on an update? Are you sure? T. From Reid.Thompson at ateb.com Sat Nov 19 06:14:20 2005 From: Reid.Thompson at ateb.com (Reid Thompson) Date: Sat, 19 Nov 2005 06:14:20 -0500 Subject: [Nitro] Idea for improving performance In-Reply-To: <4b6f054f0511181906k4ae25467h360930c4645297f2@mail.gmail.com> References: <437B6536.8060407@motionpath.com> <437DD5E4.8000403@ateb.com> <4b6f054f0511181906k4ae25467h360930c4645297f2@mail.gmail.com> Message-ID: <437F090C.9030300@ateb.com> TRANS wrote: >>not sure whether it would make any difference for PostgreSQL -- If I >>understand correctly, an update means a delete and insert regardless of >>the number of fields you are updating. Seems like the only gain would >>be size of the sql statement i.e. not very much. >> >> > >*Postgresql* deletes and inserts on an update? Are you sure? > >T. > >_______________________________________________ >Nitro-general mailing list >Nitro-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/nitro-general > > yes, read 22.1.1. Recovering disk space from http://www.postgresql.org/docs/8.1/interactive/maintenance.html -- and search the postgresql mail lists. an update 'marks' the original tuple for deletion, andinserts a new row with the updated data ( it just does it very well and very fast ) :) . That's why vacuum'ing is required --- and why it's being added as an 'auto' functionality in 8.1 see 22.1.4. The auto-vacuum daemon From george.moschovitis at gmail.com Sat Nov 19 06:32:11 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sat, 19 Nov 2005 13:32:11 +0200 Subject: [Nitro] Running multiple Nitro sites under Lighttpd/FCGI Message-ID: Ok, this is requested by many, so here you go: # General setup. server.port = 80 server.bind = "0.0.0.0" server.modules = ( "mod_rewrite", "mod_fastcgi", "mod_access", "mod_accesslog", "mod_compress", "mod_proxy" ) server.document-root = "/path/to/sites/www.nitrohq.com/public" server.pid-file = "/tmp/lighttpd.pid" #server.event-handler = "freebsd-kqueue" # www.navel.gr $HTTP["host"] =~ "navel\.gr$" { server.document-root = "/path/to/sites/www.navel.gr/public" server.indexfiles = ( "index.html" ) accesslog.filename = "/path/to/sites/www.navel.gr/log/access.log" server.errorlog = "/path/to/sites/www.navel.gr/log/error.log" url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" ) server.error-handler-404 = "/fcgi.rb" fastcgi.server = ( ".rb" => ( ( "min-procs" => 1, "max-procs" => 5, "socket" => "/tmp/navel.fcgi.socket", "bin-path" => "/path/to/sites/www.navel.gr/public/fcgi.rb", "bin-environment" => ( "NITRO_MODE" => "live" ) ) ) ) } # www.nitrohq.com $HTTP["host"] == "nitrohq\.com$" { server.document-root = "/path/to/sites/www.nitrohq.com/public" server.indexfiles = ( "index.html" ) accesslog.filename = "/path/to/sites/www.nitrohq.com/log/access.log" server.errorlog = "/path/to/sites/www.nitrohq.com/log/error.log" url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" ) server.error-handler-404 = "/fcgi.rb" fastcgi.server = ( ".rb" => ( ( "min-procs" => 1, "max-procs" => 5, "socket" => "/tmp/nitrohq.fcgi.socket", "bin-path" => "/path/to/sites/www.nitrohq.com/public/fcgi.rb", "bin-environment" => ( "NITRO_MODE" => "live" ) ) ) ) } # Mime types. mimetype.assign = ( ".rpm" => "application/x-rpm", ".pdf" => "application/pdf", ".sig" => "application/pgp-signature", ".spl" => "application/futuresplash", ".class" => "application/octet-stream", ".ps" => "application/postscript", ".torrent" => "application/x-bittorrent", ".dvi" => "application/x-dvi", ".gz" => "application/x-gzip", ".pac" => "application/x-ns-proxy-autoconfig", ".swf" => "application/x-shockwave-flash", ".tar.gz" => "application/x-tgz", ".tgz" => "application/x-tgz", ".tar" => "application/x-tar", ".zip" => "application/zip", ".mp3" => "audio/mpeg", ".m3u" => "audio/x-mpegurl", ".wma" => "audio/x-ms-wma", ".wax" => "audio/x-ms-wax", ".ogg" => "audio/x-wav", ".wav" => "audio/x-wav", ".gif" => "image/gif", ".jpg" => "image/jpeg", ".jpeg" => "image/jpeg", ".png" => "image/png", ".xbm" => "image/x-xbitmap", ".xpm" => "image/x-xpixmap", ".xwd" => "image/x-xwindowdump", ".css" => "text/css", ".html" => "text/html", ".htm" => "text/html", ".js" => "text/javascript", ".asc" => "text/plain", ".c" => "text/plain", ".conf" => "text/plain", ".text" => "text/plain", ".txt" => "text/plain", ".dtd" => "text/xml", ".xml" => "text/xml", ".xul" => "application/vnd.mozilla.xul+xml", ".mpeg" => "video/mpeg", ".mpg" => "video/mpeg", ".mov" => "video/quicktime", ".qt" => "video/quicktime", ".avi" => "video/x-msvideo", ".asf" => "video/x-ms-asf", ".asx" => "video/x-ms-asf", ".wmv" => "video/x-ms-wmv", ".bz2" => "application/x-bzip", ".tbz" => "application/x-bzip-compressed-tar", ".tar.bz2" => "application/x-bzip-compressed-tar" ) # * George Moschovitis # * Anastasios Koutoumanos There is a page on the wiki, with more details about nitro+fcgi, check this out! hope this helps, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From fabian at oggu.de Sat Nov 19 08:35:38 2005 From: fabian at oggu.de (Fabian Buch) Date: Sat, 19 Nov 2005 14:35:38 +0100 Subject: [Nitro] CGI still broken in 0.25? In-Reply-To: References: <437CBB6E.2070300@neurogami.com> <63d5e01b99f592c7bd9661fd04f7b34f@oggu.de> Message-ID: Am 18.11.2005 um 08:35 schrieb George Moschovitis: >> I've hope though, cause George mentioned in a post to this >> mailing-list >> (today or yesterday) that he has some patch he'll commit to the DARCS >> repository soon. > > I have allready added this... I am also attaching the patch to this > message. I got the latest nitro from the repo.nitrohq.com after your email and the patch wasn't applied there yet. It was no problem doing so with the one you attached though and CGI seems to work so far :). Thanks! Fabian Buch From m.fellinger at gmail.com Sat Nov 19 09:31:43 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sat, 19 Nov 2005 15:31:43 +0100 Subject: [Nitro] before-hook doesn't work anymore Message-ID: <200511191531.46712.m.fellinger@gmail.com> Hey list, I have one serious problem with switching to 0.25.0 here. when i try to use this hook: before { puts "doesn't work" }, :on [:og_delete] i get following nice error at startup, and nitro shuts down. /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:376:in `method_missing': undefined method `before' for OgFile:Class (NoMethodError) from ./src/model.rb:30 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from /var/www/current/nixel/public/../run.rb:11 from /var/www/current/nixel/public/fcgi.rb:6 well, having this error wouldn't be that bad, if it wasn't a very special error - it points to method_missing (more correct - line 376) and what is in this line: super that's it. No idea what voodoo is going on here - my ruby-instinct says me that this is an inherited class/module and takes the method_missing of the previous class in this special case. (i guess when in this method_missing no rule is defined for 'before') and now it fails even in the previous defined (if there is one defined... maybe it's only a call to an error-method?) can somebody help me on this? thx in pre, 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/20051119/5e407a03/attachment.bin From james_b at neurogami.com Sat Nov 19 09:45:27 2005 From: james_b at neurogami.com (James Britt) Date: Sat, 19 Nov 2005 07:45:27 -0700 Subject: [Nitro] Running multiple Nitro sites under Lighttpd/FCGI In-Reply-To: References: Message-ID: <437F3A87.5090405@neurogami.com> George Moschovitis wrote: > Ok, > > this is requested by many, so here you go: > Thanks! This is a big help. 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 Nov 19 11:01:57 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sat, 19 Nov 2005 17:01:57 +0100 Subject: [Nitro] Running multiple Nitro sites under Lighttpd/FCGI In-Reply-To: <437F3A87.5090405@neurogami.com> References: <437F3A87.5090405@neurogami.com> Message-ID: <200511191702.02389.m.fellinger@gmail.com> Indeed, thank you george :) I am using it already on my page, but have found some improvments while doing this. we should document the different env-vars as well as the possibilities for subdomains (will explain it further below). I really would like to support lighttpd by doing this, as many still hassle with the apache.conf-files (whoever really needs all this feature-overkill, i won't stop - but for me it's only nasty overhead) also i will put a bit more stuff in the wiki-article... following will map spark.manveru.net to one page, and both www.manveru.net and manveru.net to another one.... $HTTP["host"] == "spark.manveru.net" { ..... } $HTTP["host"] =~ "^(www\.)?manveru\.net$" { ..... } Am Samstag 19 November 2005 15:45 schrieb James Britt: > George Moschovitis wrote: > > Ok, > > > > this is requested by many, so here you go: > > Thanks! > > This is a big help. > > 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/20051119/7830bef1/attachment.bin From timh at dirtymonday.net Sat Nov 19 12:51:16 2005 From: timh at dirtymonday.net (TimH) Date: Sat, 19 Nov 2005 09:51:16 -0800 Subject: [Nitro] Running multiple Nitro sites under Lighttpd/FCGI In-Reply-To: References: Message-ID: <20051119095116.669a4b4d.timh@dirtymonday.net> I like to spawn my fcgi processes external to lighttpd using spawn-fcgi. I wrote up how I did this on my journal here: http://journal.dirtymonday.net/articles/2005/11/12/spawn-fcgi I could add this to the wiki I guess. Probably a good idea since I am going to move to Flare soon... --TimH From bryan.a.soto at gmail.com Sat Nov 19 13:05:13 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Sat, 19 Nov 2005 10:05:13 -0800 Subject: [Nitro] before-hook doesn't work anymore In-Reply-To: <200511191531.46712.m.fellinger@gmail.com> References: <200511191531.46712.m.fellinger@gmail.com> Message-ID: Hi, Only way I can get a NoMethodError for before is if I call it before any properties are defined. I don't think that's your problem since you said you're upgrading. Could you share the model.rb file? Or at least a small portion that causes the same error? Re: super, you've pretty much got it. method_missing is called if a class or it's super-classes don't define a method. That's how we get George's fun find_by_such_and_such methods without having to define them. The super call in this case means "I don't know what to do with this message." and hands it off to the super class in case it does. And if it get's to Object, Object throws that nice little error message you got. The methods are actually defined (glue/lib/glue/aspects.rb). I don't think there is any method_missing magic for aspects. bryan On 11/19/05, Michael Fellinger wrote: > > Hey list, > > I have one serious problem with switching to 0.25.0 here. > when i try to use this hook: > > before { puts "doesn't work" }, :on [:og_delete] > > i get following nice error at startup, and nitro shuts down. > > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:376:in > `method_missing': undefined method `before' for OgFile:Class > (NoMethodError) > from ./src/model.rb:30 > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require' > from /var/www/current/nixel/public/../run.rb:11 > from /var/www/current/nixel/public/fcgi.rb:6 > > > well, having this error wouldn't be that bad, if it wasn't a very special > error - it points to method_missing (more correct - line 376) and what is > in > this line: > > super > > that's it. No idea what voodoo is going on here - my ruby-instinct says me > that this is an inherited class/module and takes the method_missing of the > previous class in this special case. (i guess when in this method_missing > no > rule is defined for 'before') and now it fails even in the previous > defined > (if there is one defined... maybe it's only a call to an error-method?) > > can somebody help me on this? > > thx in pre, > manveru > > > _______________________________________________ > 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/20051119/eecd8115/attachment.html From timh at dirtymonday.net Sat Nov 19 13:05:14 2005 From: timh at dirtymonday.net (TimH) Date: Sat, 19 Nov 2005 10:05:14 -0800 Subject: [Nitro] Install issues with 0.25 Message-ID: <20051119100514.62923ec6.timh@dirtymonday.net> This was my first attempt at installing Nitro, so I have to admit to complete ignorance. However, things that were confusing me last night also confused several people in #nitro and #ruby-lang. These people helped me work out the issues, and I think some patches will be coming soon from one of them, but in the meantime this info may help others. First of all nano and mega are no longer seperate packages; they are part of facets. I don't know how interesting this info is since I had never heard of any of them. Facets looks cool however and I may use it for some other stuff, but I digress.. After installing all the nitro, og, facets, glue, etc... I tried to install and run Flare, but got the following error: /usr/local/lib/ruby/site_ruby/1.8/nitro/scaffold.rb:32:in `read': No such file or directory - /usr/local/lib/ruby/site_ruby/1.8/../proto/public/scaffold/form.xhtml (Errno::ENOENT) from /usr/local/lib/ruby/site_ruby/1.8/nitro/scaffold.rb:32:in `compile_scaffold_action' from /usr/local/lib/ruby/site_ruby/1.8/nitro/scaffold.rb:93:in `scaffold' from ./src/controller/scaffold.rb:7 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from run.rb:11 This was fixed by manually copying the proto dir from the nitro distribution to /usr/local/lib/ruby/site_ruby/. Then I tried to run Flare and got the following error: /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__': no such file to load -- part/admin (LoadError) from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from run.rb:16 This was fixed by manually copying src/part from the nitro distribution to /usr/local/lib/ruby/site_ruby/ Yen via sano --TimH From m.fellinger at gmail.com Sat Nov 19 16:49:19 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sat, 19 Nov 2005 22:49:19 +0100 Subject: [Nitro] Install issues with 0.25 In-Reply-To: <20051119100514.62923ec6.timh@dirtymonday.net> References: <20051119100514.62923ec6.timh@dirtymonday.net> Message-ID: <200511192249.22991.m.fellinger@gmail.com> Thanks for the fixes - but my way for doing this was just to delete all nitro/og/glue...whatever (be warned, only files that belong to nitro) from the /usr/local/lib/ruby/site_ruby/1.8/ it gets there when you try to install nitro as normal user first, and when you get the error for lacking permissions (happens at og or somewhere) there are files already in site_ruby wich have a higher priority than the normal nitro-gems... deleting them will read the missing stuff correctly from the real gem-directory :) Am Samstag 19 November 2005 19:05 schrieb TimH: > This was my first attempt at installing Nitro, so I have to admit to > complete ignorance. However, things that were confusing me last night also > confused several people in #nitro and #ruby-lang. These people helped me > work out the issues, and I think some patches will be coming soon from one > of them, but in the meantime this info may help others. > > First of all nano and mega are no longer seperate packages; they are part > of facets. I don't know how interesting this info is since I had never > heard of any of them. Facets looks cool however and I may use it for some > other stuff, but I digress.. > > After installing all the nitro, og, facets, glue, etc... I tried to > install and run Flare, but got the following error: > /usr/local/lib/ruby/site_ruby/1.8/nitro/scaffold.rb:32:in `read': No such > file or directory - > /usr/local/lib/ruby/site_ruby/1.8/../proto/public/scaffold/form.xhtml > (Errno::ENOENT) from > /usr/local/lib/ruby/site_ruby/1.8/nitro/scaffold.rb:32:in > `compile_scaffold_action' from > /usr/local/lib/ruby/site_ruby/1.8/nitro/scaffold.rb:93:in `scaffold' from > ./src/controller/scaffold.rb:7 > from > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require' from run.rb:11 > > This was fixed by manually copying the proto dir from the nitro > distribution to /usr/local/lib/ruby/site_ruby/. > > Then I tried to run Flare and got the following error: > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require__': no such file to load -- part/admin (LoadError) from > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require' from run.rb:16 > > This was fixed by manually copying src/part from the nitro distribution to > /usr/local/lib/ruby/site_ruby/ > > Yen via sano > --TimH > _______________________________________________ > 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/20051119/580ee1b6/attachment.bin From m.fellinger at gmail.com Sat Nov 19 17:37:17 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sat, 19 Nov 2005 23:37:17 +0100 Subject: [Nitro] before-hook doesn't work anymore In-Reply-To: References: <200511191531.46712.m.fellinger@gmail.com> Message-ID: <200511192337.21455.m.fellinger@gmail.com> Hey brian, It's a quite simple case: class OgFile is Timestamped property :filename, String property :path, String property :file, String property :filesize, Integer before %{ FileUtils.rm(@file) if $options[:rm_delete] }, :on => [:og_delete] # the *args is mainly for later additional objects. (see OgImage below) def fill(*args) file = args[0] @filename = file.original_filename @filesize = file.size @path = File.join($options[:uploads_public], @filename) @file = File.join($options[:uploads_relative], @filename) puts "copy #{file.path} to #{@file}" if $DBG FileUtils.cp(file.path, @file) end def to_s "#{@filename}" end end Am Samstag 19 November 2005 19:05 schrieb Bryan Soto: > Hi, > > Only way I can get a NoMethodError for before is if I call it before any > properties are defined. I don't think that's your problem since you said > you're upgrading. > > Could you share the model.rb file? Or at least a small portion that causes > the same error? > > Re: super, you've pretty much got it. method_missing is called if a class > or it's super-classes don't define a method. That's how we get George's fun > find_by_such_and_such methods without having to define them. The super call > in this case means "I don't know what to do with this message." and hands > it off to the super class in case it does. And if it get's to Object, > Object throws that nice little error message you got. > > The methods are actually defined (glue/lib/glue/aspects.rb). I don't think > there is any method_missing magic for aspects. > > bryan > > On 11/19/05, Michael Fellinger wrote: > > Hey list, > > > > I have one serious problem with switching to 0.25.0 here. > > when i try to use this hook: > > > > before { puts "doesn't work" }, :on [:og_delete] > > > > i get following nice error at startup, and nitro shuts down. > > > > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:376:in > > `method_missing': undefined method `before' for OgFile:Class > > (NoMethodError) > > from ./src/model.rb:30 > > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in > > `require' > > from /var/www/current/nixel/public/../run.rb:11 > > from /var/www/current/nixel/public/fcgi.rb:6 > > > > > > well, having this error wouldn't be that bad, if it wasn't a very special > > error - it points to method_missing (more correct - line 376) and what is > > in > > this line: > > > > super > > > > that's it. No idea what voodoo is going on here - my ruby-instinct says > > me that this is an inherited class/module and takes the method_missing of > > the previous class in this special case. (i guess when in this > > method_missing no > > rule is defined for 'before') and now it fails even in the previous > > defined > > (if there is one defined... maybe it's only a call to an error-method?) > > > > can somebody help me on this? > > > > thx in pre, > > manveru > > > > > > _______________________________________________ > > 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/20051119/d16fd23f/attachment.bin From jeff.darklight at gmail.com Sat Nov 19 20:48:15 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Sat, 19 Nov 2005 17:48:15 -0800 Subject: [Nitro] Would like to know more about AJAX support in Nitro ... Message-ID: I was thinking about AJAX and went looking at the SPARK source ( nice and clean ) hoping that it had some small piece of AJAX implemented, but it doesn't. Since spark is kinda one of the flagship examples of Nitro, what do you think abotu getting a bit of AJAX integrated ( like maybe in the tagging ) ??? Anyways, let me know. For a bit of history, I had found Nitro far before I started looking @ rails... What I ran into that kept me from using it was it's state of constant flux ( constantly changing ), not that I would have minded that as much if there had been good documentation available. I am happy to help with the project ( nitro/og/etc ) but I really/REALLY think we need to have a LOT more focus on documentation. Nitro is beautiful, but since people can't get started, they can't see it. Anyways, that's just my $0.02 ... -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood From george.moschovitis at gmail.com Sun Nov 20 05:20:09 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 20 Nov 2005 12:20:09 +0200 Subject: [Nitro] CGI still broken in 0.25? In-Reply-To: References: <437CBB6E.2070300@neurogami.com> <63d5e01b99f592c7bd9661fd04f7b34f@oggu.de> Message-ID: > > I got the latest nitro from the repo.nitrohq.com after your email and > the patch wasn't applied there yet. It was no problem doing so with the > one you attached though and CGI seems to work so far :). Thanks! oh i havent synchronized repo yet ;-) will do. -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Sun Nov 20 05:27:40 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 20 Nov 2005 12:27:40 +0200 Subject: [Nitro] Would like to know more about AJAX support in Nitro ... In-Reply-To: References: Message-ID: Hello Jeff, as you may have notice, we are at the momemnt try to stabilize nitro, fix some bugs, and round off the edges. The next step is the documentation. You can already find some stuff on the wiki, and I am hearing some people are about to release more examples. So stay tuned, things on the documentation front are about to improve ;-) -g. On 11/20/05, Jeff Wood wrote: > I was thinking about AJAX and went looking at the SPARK source ( nice > and clean ) hoping that it had some small piece of AJAX implemented, > but it doesn't. > > Since spark is kinda one of the flagship examples of Nitro, what do > you think abotu getting a bit of AJAX integrated ( like maybe in the > tagging ) ??? > > Anyways, let me know. > > For a bit of history, I had found Nitro far before I started looking @ > rails... What I ran into that kept me from using it was it's state of > constant flux ( constantly changing ), not that I would have minded > that as much if there had been good documentation available. > > I am happy to help with the project ( nitro/og/etc ) but I > really/REALLY think we need to have a LOT more focus on documentation. > Nitro is beautiful, but since people can't get started, they can't see > it. > > Anyways, that's just my $0.02 ... > > > -- > "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 > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Sun Nov 20 05:30:47 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 20 Nov 2005 12:30:47 +0200 Subject: [Nitro] before-hook doesn't work anymore In-Reply-To: <200511192337.21455.m.fellinger@gmail.com> References: <200511191531.46712.m.fellinger@gmail.com> <200511192337.21455.m.fellinger@gmail.com> Message-ID: Strange, will investigate this when I go to the office, howeverI have a lot of code with before aspect that works with 0.25.0... will let you know. -g. On 11/20/05, Michael Fellinger wrote: > Hey brian, > > It's a quite simple case: > > class OgFile > is Timestamped > property :filename, String > property :path, String > property :file, String > property :filesize, Integer > before %{ FileUtils.rm(@file) if $options[:rm_delete] }, :on => [:og_delete] > > # the *args is mainly for later additional objects. (see OgImage below) > > def fill(*args) > file = args[0] > @filename = file.original_filename > @filesize = file.size > @path = File.join($options[:uploads_public], @filename) > @file = File.join($options[:uploads_relative], @filename) > > puts "copy #{file.path} to #{@file}" if $DBG > FileUtils.cp(file.path, @file) > end > > def to_s > "#{@filename}" > end > end > > > Am Samstag 19 November 2005 19:05 schrieb Bryan Soto: > > Hi, > > > > Only way I can get a NoMethodError for before is if I call it before any > > properties are defined. I don't think that's your problem since you said > > you're upgrading. > > > > Could you share the model.rb file? Or at least a small portion that causes > > the same error? > > > > Re: super, you've pretty much got it. method_missing is called if a class > > or it's super-classes don't define a method. That's how we get George's fun > > find_by_such_and_such methods without having to define them. The super call > > in this case means "I don't know what to do with this message." and hands > > it off to the super class in case it does. And if it get's to Object, > > Object throws that nice little error message you got. > > > > The methods are actually defined (glue/lib/glue/aspects.rb). I don't think > > there is any method_missing magic for aspects. > > > > bryan > > > > On 11/19/05, Michael Fellinger wrote: > > > Hey list, > > > > > > I have one serious problem with switching to 0.25.0 here. > > > when i try to use this hook: > > > > > > before { puts "doesn't work" }, :on [:og_delete] > > > > > > i get following nice error at startup, and nitro shuts down. > > > > > > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:376:in > > > `method_missing': undefined method `before' for OgFile:Class > > > (NoMethodError) > > > from ./src/model.rb:30 > > > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in > > > `require' > > > from /var/www/current/nixel/public/../run.rb:11 > > > from /var/www/current/nixel/public/fcgi.rb:6 > > > > > > > > > well, having this error wouldn't be that bad, if it wasn't a very special > > > error - it points to method_missing (more correct - line 376) and what is > > > in > > > this line: > > > > > > super > > > > > > that's it. No idea what voodoo is going on here - my ruby-instinct says > > > me that this is an inherited class/module and takes the method_missing of > > > the previous class in this special case. (i guess when in this > > > method_missing no > > > rule is defined for 'before') and now it fails even in the previous > > > defined > > > (if there is one defined... maybe it's only a call to an error-method?) > > > > > > can somebody help me on this? > > > > > > thx in pre, > > > manveru > > > > > > > > > _______________________________________________ > > > 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 Sun Nov 20 05:34:07 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 20 Nov 2005 12:34:07 +0200 Subject: [Nitro] Install issues with 0.25 In-Reply-To: <20051119100514.62923ec6.timh@dirtymonday.net> References: <20051119100514.62923ec6.timh@dirtymonday.net> Message-ID: have you tried running nitro like this? gem install nitro cd flare ruby -rubygems run.rb On 11/19/05, TimH wrote: > This was my first attempt at installing Nitro, so I have to admit to complete ignorance. However, things that were confusing me last night also confused several people in #nitro and #ruby-lang. These people helped me work out the issues, and I think some patches will be coming soon from one of them, but in the meantime this info may help others. > > First of all nano and mega are no longer seperate packages; they are part of facets. I don't know how interesting this info is since I had never heard of any of them. Facets looks cool however and I may use it for some other stuff, but I digress.. > > After installing all the nitro, og, facets, glue, etc... I tried to install and run Flare, but got the following error: > /usr/local/lib/ruby/site_ruby/1.8/nitro/scaffold.rb:32:in `read': No such file or directory - /usr/local/lib/ruby/site_ruby/1.8/../proto/public/scaffold/form.xhtml (Errno::ENOENT) > from /usr/local/lib/ruby/site_ruby/1.8/nitro/scaffold.rb:32:in `compile_scaffold_action' > from /usr/local/lib/ruby/site_ruby/1.8/nitro/scaffold.rb:93:in `scaffold' > from ./src/controller/scaffold.rb:7 > from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' > from run.rb:11 > > This was fixed by manually copying the proto dir from the nitro distribution to /usr/local/lib/ruby/site_ruby/. > > Then I tried to run Flare and got the following error: > /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__': no such file to load -- part/admin (LoadError) > from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' > from run.rb:16 > > This was fixed by manually copying src/part from the nitro distribution to /usr/local/lib/ruby/site_ruby/ > > Yen via sano > --TimH > _______________________________________________ > 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 Sun Nov 20 05:34:44 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 20 Nov 2005 12:34:44 +0200 Subject: [Nitro] Running multiple Nitro sites under Lighttpd/FCGI In-Reply-To: <20051119095116.669a4b4d.timh@dirtymonday.net> References: <20051119095116.669a4b4d.timh@dirtymonday.net> Message-ID: Yeah, please add this info to the wiki. On 11/19/05, TimH wrote: > I like to spawn my fcgi processes external to lighttpd using spawn-fcgi. > > I wrote up how I did this on my journal here: http://journal.dirtymonday.net/articles/2005/11/12/spawn-fcgi > > I could add this to the wiki I guess. Probably a good idea since I am going to move to Flare soon... > > --TimH > > _______________________________________________ > 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 bryan.a.soto at gmail.com Sun Nov 20 15:17:56 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Sun, 20 Nov 2005 12:17:56 -0800 Subject: [Nitro] before-hook doesn't work anymore In-Reply-To: References: <200511191531.46712.m.fellinger@gmail.com> <200511192337.21455.m.fellinger@gmail.com> Message-ID: The problem seems to be caused by including Timestamped before any properties. The attached script shows the ancestors (method lookup) of two classes, one with Timestamped included before properties (ClassOne) and one defining properties first, then including Timestamped (ClassTwo). It looks like by including Timestamped first, it triggers this line in glue/property.rb # Line 220 of glue/property.rb m.send(:include, Glue::Aspects) unless m.ancestors.include?(Glue::Aspects) which prevents Aspects from being included in ClassOne. At least if you look at the class instance level ancestors (class << self line. Not sure what that's called), they don't include Glue::Aspects::ClassMethods. Commenting out the unless clause in Line 220 makes the method lookup match. I'm not sure if that's correct though. bryan On 11/20/05, George Moschovitis wrote: > > Strange, will investigate this when I go to the office, howeverI have > a lot of code with before aspect that works with 0.25.0... > > will let you know. > -g. > > > On 11/20/05, Michael Fellinger wrote: > > Hey brian, > > > > It's a quite simple case: > > > > class OgFile > > is Timestamped > > property :filename, String > > property :path, String > > property :file, String > > property :filesize, Integer > > before %{ FileUtils.rm(@file) if $options[:rm_delete] }, :on => > [:og_delete] > > > > # the *args is mainly for later additional objects. (see OgImage below) > > > > def fill(*args) > > file = args[0] > > @filename = file.original_filename > > @filesize = file.size > > @path = File.join($options[:uploads_public], @filename) > > @file = File.join($options[:uploads_relative], @filename) > > > > puts "copy #{file.path} to #{@file}" if $DBG > > FileUtils.cp(file.path, @file) > > end > > > > def to_s > > "#{@filename}" > > end > > end > > > > > > Am Samstag 19 November 2005 19:05 schrieb Bryan Soto: > > > Hi, > > > > > > Only way I can get a NoMethodError for before is if I call it before > any > > > properties are defined. I don't think that's your problem since you > said > > > you're upgrading. > > > > > > Could you share the model.rb file? Or at least a small portion that > causes > > > the same error? > > > > > > Re: super, you've pretty much got it. method_missing is called if a > class > > > or it's super-classes don't define a method. That's how we get > George's fun > > > find_by_such_and_such methods without having to define them. The super > call > > > in this case means "I don't know what to do with this message." and > hands > > > it off to the super class in case it does. And if it get's to Object, > > > Object throws that nice little error message you got. > > > > > > The methods are actually defined (glue/lib/glue/aspects.rb). I don't > think > > > there is any method_missing magic for aspects. > > > > > > bryan > > > > > > On 11/19/05, Michael Fellinger wrote: > > > > Hey list, > > > > > > > > I have one serious problem with switching to 0.25.0 here. > > > > when i try to use this hook: > > > > > > > > before { puts "doesn't work" }, :on [:og_delete] > > > > > > > > i get following nice error at startup, and nitro shuts down. > > > > > > > > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:376:in > > > > `method_missing': undefined method `before' for OgFile:Class > > > > (NoMethodError) > > > > from ./src/model.rb:30 > > > > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in > > > > `require' > > > > from /var/www/current/nixel/public/../run.rb:11 > > > > from /var/www/current/nixel/public/fcgi.rb:6 > > > > > > > > > > > > well, having this error wouldn't be that bad, if it wasn't a very > special > > > > error - it points to method_missing (more correct - line 376) and > what is > > > > in > > > > this line: > > > > > > > > super > > > > > > > > that's it. No idea what voodoo is going on here - my ruby-instinct > says > > > > me that this is an inherited class/module and takes the > method_missing of > > > > the previous class in this special case. (i guess when in this > > > > method_missing no > > > > rule is defined for 'before') and now it fails even in the previous > > > > defined > > > > (if there is one defined... maybe it's only a call to an > error-method?) > > > > > > > > can somebody help me on this? > > > > > > > > thx in pre, > > > > manveru > > > > > > > > > > > > _______________________________________________ > > > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051120/0880a6be/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: aspect_test.rb Type: application/octet-stream Size: 421 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051120/0880a6be/attachment.obj From aurelianocalvo at yahoo.com.ar Sun Nov 20 16:42:36 2005 From: aurelianocalvo at yahoo.com.ar (Aureliano Calvo) Date: Sun, 20 Nov 2005 21:42:36 +0000 (GMT) Subject: [Nitro] Bugs in nitrohq.com In-Reply-To: Message-ID: <20051120214237.92608.qmail@web50412.mail.yahoo.com> In a lot of places in nitrohq.com, in the code examples, shows > instead of ">" and < instead of "<". For instance in http://www.nitrohq.com/view/Tutorials:Nitro_In_Flames:Chapter2, shows Og.setup( :store => :kirby, :name => 'todo' ) instead of Og.setup( :store => :kirby, :name => 'todo' ) Looking at the source code of the page (http://www.nitrohq.com/edit/Tutorials%3ANitro_In_Flames%3AChapter2), there is no apparent issues regarding the way it was written. Also, the diff between revisions of a wiki page and there is no obvious way to see a previous version of a page. Regards, Aureliano ___________________________________________________________ 1GB gratis, Antivirus y Antispam Correo Yahoo!, el mejor correo web del mundo http://correo.yahoo.com.ar From timh at dirtymonday.net Sun Nov 20 21:46:37 2005 From: timh at dirtymonday.net (TimH) Date: Sun, 20 Nov 2005 18:46:37 -0800 Subject: [Nitro] Install issues with 0.25 In-Reply-To: References: <20051119100514.62923ec6.timh@dirtymonday.net> Message-ID: <20051120184637.565f8820.timh@dirtymonday.net> On Sun, 20 Nov 2005 12:34:07 +0200 George Moschovitis wrote: > have you tried running nitro like this? > > gem install nitro > cd flare > ruby -rubygems run.rb Of course. It failed, and then I was told by some folks in #nitro that the gem was, indeed, broken. Maybe it's fixed now? That same night at least one other guy verified all the exact same errors that I encountered. --TimH From timh at dirtymonday.net Mon Nov 21 14:27:01 2005 From: timh at dirtymonday.net (Tim Howe) Date: Mon, 21 Nov 2005 11:27:01 -0800 Subject: [Nitro] Install issues with 0.25 In-Reply-To: References: <20051119100514.62923ec6.timh@dirtymonday.net> Message-ID: <20051121112701.1bc5a65d.timh@dirtymonday.net> On Sun, 20 Nov 2005 12:34:07 +0200 George Moschovitis wrote: > have you tried running nitro like this? > > gem install nitro > cd flare > ruby -rubygems run.rb Tried again with gem on a different machine. Same thing: ----- # gem install nitro Attempting local installation of 'nitro' Local gem file not found: nitro*.gem Attempting remote installation of 'nitro' Updating Gem source index for: http://gems.rubyforge.org Install required dependency og? [Yn] Y Install required dependency glue? [Yn] Y Install required dependency facets? [Yn] Y ERROR: While executing gem ... (OpenURI::HTTPError) 300 Multiple Choices ----- So, my previous steps are still my only successful method. --TimH From jeff.darklight at gmail.com Mon Nov 21 14:42:03 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Mon, 21 Nov 2005 11:42:03 -0800 Subject: [Nitro] Install issues with 0.25 In-Reply-To: <20051121112701.1bc5a65d.timh@dirtymonday.net> References: <20051119100514.62923ec6.timh@dirtymonday.net> <20051121112701.1bc5a65d.timh@dirtymonday.net> Message-ID: If you just retry ( and retry and retry ) it will eventually get past it. j. On 11/21/05, Tim Howe wrote: > > On Sun, 20 Nov 2005 12:34:07 +0200 > George Moschovitis wrote: > > > have you tried running nitro like this? > > > > gem install nitro > > cd flare > > ruby -rubygems run.rb > > Tried again with gem on a different machine. Same thing: > > ----- > # gem install nitro > Attempting local installation of 'nitro' > Local gem file not found: nitro*.gem > Attempting remote installation of 'nitro' > Updating Gem source index for: http://gems.rubyforge.org > Install required dependency og? [Yn] Y > Install required dependency glue? [Yn] Y > Install required dependency facets? [Yn] Y > ERROR: While executing gem ... (OpenURI::HTTPError) > 300 Multiple Choices > ----- > > So, my previous steps are still my only successful method. > > --TimH > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051121/a1a3e618/attachment.html From timh at dirtymonday.net Mon Nov 21 15:02:50 2005 From: timh at dirtymonday.net (Tim Howe) Date: Mon, 21 Nov 2005 12:02:50 -0800 Subject: [Nitro] Install issues with 0.25 In-Reply-To: References: <20051119100514.62923ec6.timh@dirtymonday.net> <20051121112701.1bc5a65d.timh@dirtymonday.net> Message-ID: <20051121120250.3479faf6.timh@dirtymonday.net> On Mon, 21 Nov 2005 11:42:03 -0800 Jeff Wood wrote: > If you just retry ( and retry and retry ) it will eventually get past it. > > j. Wow. Freaky. About ten iterations did the trick. I'm still a little curious about the stuff I had to move by hand... Is manual installation broken/untested/whatever? --TimH From m.fellinger at gmail.com Mon Nov 21 15:11:57 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Mon, 21 Nov 2005 21:11:57 +0100 Subject: [Nitro] Install issues with 0.25 In-Reply-To: <20051121120250.3479faf6.timh@dirtymonday.net> References: <20051119100514.62923ec6.timh@dirtymonday.net> <20051121120250.3479faf6.timh@dirtymonday.net> Message-ID: <200511212112.03587.m.fellinger@gmail.com> You could say it's extremly untested... as a matter of fact there where only 2 testing-installations for them i know about we have to make sure that this will be more thoroughly tested for next versions, maybe an inofficial beta-release for testing? or a 0.25.5 (to finally use this last version-number) however, the release-process is atm quite inefficient and should have a bit more QA next time. so long... manveru Am Montag 21 November 2005 21:02 schrieb Tim Howe: > On Mon, 21 Nov 2005 11:42:03 -0800 > > Jeff Wood wrote: > > If you just retry ( and retry and retry ) it will eventually get past it. > > > > j. > > Wow. Freaky. About ten iterations did the trick. > > I'm still a little curious about the stuff I had to move by hand... Is > manual installation broken/untested/whatever? > > --TimH > _______________________________________________ > 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/20051121/6c894f26/attachment.bin From james_b at neurogami.com Mon Nov 21 15:16:57 2005 From: james_b at neurogami.com (James Britt) Date: Mon, 21 Nov 2005 13:16:57 -0700 Subject: [Nitro] Install issues with 0.25 In-Reply-To: <20051121120250.3479faf6.timh@dirtymonday.net> References: <20051119100514.62923ec6.timh@dirtymonday.net> <20051121112701.1bc5a65d.timh@dirtymonday.net> <20051121120250.3479faf6.timh@dirtymonday.net> Message-ID: <43822B39.7000007@neurogami.com> Tim Howe wrote: > On Mon, 21 Nov 2005 11:42:03 -0800 > Jeff Wood wrote: > > >>If you just retry ( and retry and retry ) it will eventually get past it. >> >>j. > > > Wow. Freaky. About ten iterations did the trick. I *think* this is related to the new mirrors set up for rubyforge.org. And I *think* it can be avoided by specifying a specific gem repository URL. James From ssmoot at gmail.com Mon Nov 21 18:00:12 2005 From: ssmoot at gmail.com (Sam Smoot) Date: Mon, 21 Nov 2005 17:00:12 -0600 Subject: [Nitro] Idea for improving performance Message-ID: Reid Thompson wrote: > yes, read 22.1.1. Recovering disk space from > http://www.postgresql.org/docs/8.1/interactive/maintenance.html -- and > search the postgresql mail lists. > an update 'marks' the original tuple for deletion, andinserts a new row > with the updated data ( it just does it very well and very fast ) :) > . That's why vacuum'ing is required --- and why it's being added as an > 'auto' functionality in 8.1 see 22.1.4. The auto-vacuum daemon It doesn't mark it for Deletion in the SQL sense. A better way to describe it might be that it's marked for GarbageCollection. Either way an Update query combines the existing tuple with the new data. IOW you don't need to submit the full tuple. This idea for improving performance is actually very sound, and implemented by "most" major O/R Mappers around. It's called a UnitOfWork (http://www.martinfowler.com/eaaCatalog/unitOfWork.html). From timh at dirtymonday.net Mon Nov 21 20:04:19 2005 From: timh at dirtymonday.net (Tim Howe) Date: Mon, 21 Nov 2005 17:04:19 -0800 Subject: [Nitro] Running multiple Nitro sites under Lighttpd/FCGI In-Reply-To: References: <20051119095116.669a4b4d.timh@dirtymonday.net> Message-ID: <20051121170419.0dc9dec6.timh@dirtymonday.net> On Sun, 20 Nov 2005 12:34:44 +0200 George Moschovitis wrote: > Yeah, please add this info to the wiki. Well, it appears as though I have managed to externally spawn Spark as a fastcgi process and connect to it with lighttpd. However, the ruby process, when "idle" is using about 30% of my servers cpu resources to apparently sit there and do nothing. It does the same thing if I just run it as WebRick. What's it doing? --TimH From timh at dirtymonday.net Mon Nov 21 20:15:29 2005 From: timh at dirtymonday.net (Tim Howe) Date: Mon, 21 Nov 2005 17:15:29 -0800 Subject: [Nitro] Spark FastCGI lighttpd Message-ID: <20051121171529.40dc0e23.timh@dirtymonday.net> Guess I should have changed the topic before. I am using psql with spark, and noticed that every time I start it, it tries to create the database from scratch again. Is this an og thing? Shouldn't it NOT try if the database is there? Or is this a failsafe in case something is not there completely? --TimH From m.fellinger at gmail.com Mon Nov 21 20:49:51 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Tue, 22 Nov 2005 02:49:51 +0100 Subject: [Nitro] Spark FastCGI lighttpd In-Reply-To: <20051121171529.40dc0e23.timh@dirtymonday.net> References: <20051121171529.40dc0e23.timh@dirtymonday.net> Message-ID: <200511220249.57503.m.fellinger@gmail.com> Would be a great help if you could show us your run.rb - or at least the stuff in 'Og.setup' Am Dienstag 22 November 2005 02:15 schrieb Tim Howe: > Guess I should have changed the topic before. > > I am using psql with spark, and noticed that every time I start it, it > tries to create the database from scratch again. Is this an og thing? > Shouldn't it NOT try if the database is there? Or is this a failsafe in > case something is not there completely? > > --TimH > _______________________________________________ > 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/20051121/e4bd310d/attachment.bin From timh at dirtymonday.net Mon Nov 21 21:14:40 2005 From: timh at dirtymonday.net (TimH) Date: Mon, 21 Nov 2005 18:14:40 -0800 Subject: [Nitro] Spark FastCGI lighttpd In-Reply-To: <200511220249.57503.m.fellinger@gmail.com> References: <20051121171529.40dc0e23.timh@dirtymonday.net> <200511220249.57503.m.fellinger@gmail.com> Message-ID: <20051121181440.2e304c94.timh@dirtymonday.net> I plan to post it al to the wiki shortly... --TimH On Tue, 22 Nov 2005 02:49:51 +0100 Michael Fellinger wrote: > Would be a great help if you could show us your run.rb - or at least the stuff > in 'Og.setup' > > Am Dienstag 22 November 2005 02:15 schrieb Tim Howe: > > Guess I should have changed the topic before. > > > > I am using psql with spark, and noticed that every time I start it, it > > tries to create the database from scratch again. Is this an og thing? > > Shouldn't it NOT try if the database is there? Or is this a failsafe in > > case something is not there completely? > > > > --TimH > > _______________________________________________ > > Nitro-general mailing list > > Nitro-general at rubyforge.org > > http://rubyforge.org/mailman/listinfo/nitro-general > From timh at dirtymonday.net Mon Nov 21 22:31:40 2005 From: timh at dirtymonday.net (TimH) Date: Mon, 21 Nov 2005 19:31:40 -0800 Subject: [Nitro] spawn-fcgi wiki page Message-ID: <20051122033140.GA26321@dude.dirtymonday.net> I posted to http://www.nitrohq.com/view/Spark_with_PostgreSQL%2C_Lighttpd%2C_and_spawn-fcgi I'll play with it a bit more to see if I can make any sense of the oddities I saw. The biggest problem I ran into is that when I closed my console to that server, my fcgi process die. I used a very similar setup with typo, and did not have that problem, so I was a bit suprised. Do I have to do something else to make it seperate correctly? --TimH From epiperak at softlab.ece.ntua.gr Mon Nov 21 23:25:34 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 22 Nov 2005 06:25:34 +0200 (EET) Subject: [Nitro] javascript and session Message-ID: I have a small problem, from a template file I have to call the following javascript [[update]] and the problem occurs with window.opener.location.reload(); which apparently clears the session!!! why? How can I reload my parent window (in order to reflect the changes I made in the popup edit windows) ??? 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 george.moschovitis at gmail.com Tue Nov 22 02:16:45 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 22 Nov 2005 09:16:45 +0200 Subject: [Nitro] Running multiple Nitro sites under Lighttpd/FCGI In-Reply-To: <20051121170419.0dc9dec6.timh@dirtymonday.net> References: <20051119095116.669a4b4d.timh@dirtymonday.net> <20051121170419.0dc9dec6.timh@dirtymonday.net> Message-ID: This doesnt happen for me. Can you give us some more information about your setup? I would like to investigate this. -g. On 11/22/05, Tim Howe wrote: > On Sun, 20 Nov 2005 12:34:44 +0200 > George Moschovitis wrote: > > > Yeah, please add this info to the wiki. > > Well, it appears as though I have managed to externally spawn Spark as > a fastcgi process and connect to it with lighttpd. However, the ruby process, > when "idle" is using about 30% of my servers cpu resources to apparently sit > there and do nothing. > > It does the same thing if I just run it as WebRick. What's it doing? > > --TimH > _______________________________________________ > 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 Nov 22 02:18:35 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 22 Nov 2005 09:18:35 +0200 Subject: [Nitro] Spark FastCGI lighttpd In-Reply-To: <20051121171529.40dc0e23.timh@dirtymonday.net> References: <20051121171529.40dc0e23.timh@dirtymonday.net> Message-ID: > try if the database is there? Or is this a failsafe in case something is not > there completely? Yeah Og, checks to see if you have added new classes in your application, or changed your classes to update the schema accordingly. You can skip this step: Og.create_schema = false -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue Nov 22 02:20:00 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 22 Nov 2005 09:20:00 +0200 Subject: [Nitro] spawn-fcgi wiki page In-Reply-To: <20051122033140.GA26321@dude.dirtymonday.net> References: <20051122033140.GA26321@dude.dirtymonday.net> Message-ID: You have to daemonize the ruby process. However I use a different setup, Lighttpd starts the fcgi handlers and manages them. And I see no problems whatsoever. -g. On 11/22/05, TimH wrote: > I posted to http://www.nitrohq.com/view/Spark_with_PostgreSQL%2C_Lighttpd%2C_and_spawn-fcgi > > I'll play with it a bit more to see if I can make any sense of the oddities I saw. > > The biggest problem I ran into is that when I closed my console to that server, my fcgi process die. > I used a very similar setup with typo, and did not have that problem, so I was a bit suprised. Do I have to do something else to make it seperate correctly? > > --TimH > _______________________________________________ > 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 timh at dirtymonday.net Tue Nov 22 03:01:18 2005 From: timh at dirtymonday.net (TimH) Date: Tue, 22 Nov 2005 00:01:18 -0800 Subject: [Nitro] spawn-fcgi wiki page In-Reply-To: References: <20051122033140.GA26321@dude.dirtymonday.net> Message-ID: <20051122000118.3d155b07.timh@dirtymonday.net> On Tue, 22 Nov 2005 09:20:00 +0200 George Moschovitis wrote: > You have to daemonize the ruby process. > However I use a different setup, Lighttpd starts the fcgi handlers and > manages them. And I see no problems whatsoever. I was kinda wondering if I could wrap the .fcgi launcher with daemonize or something like that. Is there a tested method? Is this capability planned for Nitro? Rails must somehow handle this on its own as I used this same technique with Typo. I have also used lighttpd to spawn the processes, however that kind of defeats my purpose of security. I want to run each user's Nitro/Rails apps under their own user permissions. If you launch as the web server, the web server user needs all the rights. --TimH From timh at dirtymonday.net Tue Nov 22 03:09:56 2005 From: timh at dirtymonday.net (TimH) Date: Tue, 22 Nov 2005 00:09:56 -0800 Subject: [Nitro] Running multiple Nitro sites under Lighttpd/FCGI In-Reply-To: References: <20051119095116.669a4b4d.timh@dirtymonday.net> <20051121170419.0dc9dec6.timh@dirtymonday.net> Message-ID: <20051122000956.5138e062.timh@dirtymonday.net> On Tue, 22 Nov 2005 09:16:45 +0200 George Moschovitis wrote: > This doesnt happen for me. Can you give us some more information about > your setup? > I would like to investigate this. > > -g. Sure. This is an OpenBSD 3.8-current machine with dual PII 350 Processors. Ruby 1.8.3, Nitro 0.25.0, Postgresql 8.1. I'm using the latest ruby-postgres extension library (which claims 8.1 support). Spark 0.7.0. I see this if I run as fcgi or just as Webrick. It seems to work fine (unless I log out :P), it just appears to be busy doing something based on it's cpu usage. Is there some special debugging I can turn on or anything? This is a server I maintain for a user group. As such, it is a semi-public shell server. So if it would help to give you an account on it or anything like that, that can be easily arranged. --TimH From george.moschovitis at gmail.com Tue Nov 22 03:15:20 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 22 Nov 2005 10:15:20 +0200 Subject: [Nitro] spawn-fcgi wiki page In-Reply-To: <20051122000118.3d155b07.timh@dirtymonday.net> References: <20051122033140.GA26321@dude.dirtymonday.net> <20051122000118.3d155b07.timh@dirtymonday.net> Message-ID: Here is the code I use to daemonize the DRB session server used by Nitro in FCGI mode: $ vi ds.rb require 'daemons' Daemons.run('/path/to/nitro/lib/nitro/session/drbserver.rb') $ ruby ds.rb start hope this helps.... regards, George. PS: please post more information about your setup and the security concerns so we can better support this in Nitro. On 11/22/05, TimH wrote: > On Tue, 22 Nov 2005 09:20:00 +0200 > George Moschovitis wrote: > > > You have to daemonize the ruby process. > > However I use a different setup, Lighttpd starts the fcgi handlers and > > manages them. And I see no problems whatsoever. > > I was kinda wondering if I could wrap the .fcgi launcher with daemonize or something like that. Is there a tested method? Is this capability planned for Nitro? Rails must somehow handle this on its own as I used this same technique with Typo. > I have also used lighttpd to spawn the processes, however that kind of defeats my purpose of security. I want to run each user's Nitro/Rails apps under their own user permissions. If you launch as the web server, the web server user needs all the rights. > > --TimH > _______________________________________________ > 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 Nov 22 04:36:00 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Tue, 22 Nov 2005 10:36:00 +0100 Subject: [Nitro] javascript and session In-Reply-To: References: Message-ID: <3ff63f9b0511220136x132bcb1by@mail.gmail.com> First, don't use popups ! Second ,it looks like your form gets submitted, so logically, the rest of the script is not executed. Could it that be it ? On 22/11/05, Emmanuel Piperakis wrote: > I have a small problem, > > from a template file I have to call the following javascript > > [[update]] > > and the problem occurs with window.opener.location.reload(); > which apparently clears the session!!! why? How can I reload my parent > window (in order to reflect the changes I made in the popup edit windows) > ??? > > Thanx > > 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 > -- Cheers, zimba http://zimba.oree.ch From m.fellinger at gmail.com Tue Nov 22 04:57:29 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Tue, 22 Nov 2005 10:57:29 +0100 Subject: [Nitro] Running multiple Nitro sites under Lighttpd/FCGI In-Reply-To: <20051122000956.5138e062.timh@dirtymonday.net> References: <20051122000956.5138e062.timh@dirtymonday.net> Message-ID: <200511221057.40836.m.fellinger@gmail.com> Hey Tim, There is a profiler built in in ruby that you can use for checking what needs most of the cpu-time and what stuff is called how often - if you want to check this, just run webrick with 'ruby -rprofile run.rb' Am Dienstag 22 November 2005 09:09 schrieb TimH: > On Tue, 22 Nov 2005 09:16:45 +0200 > > George Moschovitis wrote: > > This doesnt happen for me. Can you give us some more information about > > your setup? > > I would like to investigate this. > > > > -g. > > Sure. This is an OpenBSD 3.8-current machine with dual PII 350 > Processors. Ruby 1.8.3, Nitro 0.25.0, Postgresql 8.1. I'm using the > latest ruby-postgres extension library (which claims 8.1 support). Spark > 0.7.0. > > I see this if I run as fcgi or just as Webrick. It seems to work fine > (unless I log out :P), it just appears to be busy doing something based on > it's cpu usage. Is there some special debugging I can turn on or anything? > > This is a server I maintain for a user group. As such, it is a > semi-public shell server. So if it would help to give you an account on it > or anything like that, that can be easily arranged. > > --TimH > _______________________________________________ > 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/20051122/bec5f758/attachment.bin From Aleksi.Niemela at cs.helsinki.fi Tue Nov 22 09:42:12 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Tue, 22 Nov 2005 16:42:12 +0200 Subject: [Nitro] Running multiple Nitro sites under Lighttpd/FCGI In-Reply-To: <20051121170419.0dc9dec6.timh@dirtymonday.net> References: <20051119095116.669a4b4d.timh@dirtymonday.net> <20051121170419.0dc9dec6.timh@dirtymonday.net> Message-ID: <43832E44.60909@cs.helsinki.fi> Tim Howe wrote: > Well, it appears as though I have managed to externally spawn Spark as >a fastcgi process and connect to it with lighttpd. However, the ruby process, >when "idle" is using about 30% of my servers cpu resources to apparently sit >there and do nothing. > >It does the same thing if I just run it as WebRick. What's it doing? > > Just a though. Any chances you're still running Nitro in debug mode? That'd mean the processes go periodically check file system there are no changes in code to reload. In my Windows box under cygwin there's periodical load coming from one instance, and the load is much lighter under one-click-installed-ruby. However, disabling reloads probably affected the load. Can't recall for sure nor can I test it right now. In case you're running it in Debug mode, perhaps you'd like to say something like the following. May help. Or then again, may not help at all :). - Aleksi class Config attr_accessor :db, :webserver def initialize @db = { :address => "localhost", :destroy => false, :name => "...", :store => "psql", :user => "...", :password => "...", :connection_count => 1 } @webserver = { :BindAddress => "0.0.0.0", :Port => 1234, :log_filename => "webrick.log", :log_level => 5, ### Here's the mode for the runner :mode => :debug, } end end runner = Runner.new Runner.mode = config.webserver[:mode] runner.setup_options runner.setup_mode runner.daemonize if runner.daemon server = Server.new server.address = config.webserver[:BindAddress] server.port = config.webserver[:Port] server.start() runner.invoke(server) unless $NITRO_NO_INVOKE From chris at motionpath.com Tue Nov 22 09:47:48 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Tue, 22 Nov 2005 14:47:48 +0000 Subject: [Nitro] Multipart forms and the request parameters Message-ID: <70DEDD57-1CD8-43B8-A621-5DBC72920128@motionpath.com> Hi listers: Little query to anyone in the know.... When a multipart form gets parsed into the @params (request) hash the default value for the contents is set to be a new Array, this results in request['no_key'] => [] and more of a problem.. request['no_key'].nil? => false I have patched the request wrapper to fix this and stop the request parameters acting so differently when using multipart forms. using the fetch method but the @params hash still has the default value of an empty array. so.. Is there a legitimate reason for the @params hash to have default value of an empty array? gmosx: would you like this patch or do you think this should be fixed in cgi.rb when the params hash is built? Chris Farmiloe Design & Development. Motionpath Digital Media Ltd. St Georges road, Brighton, BN2 1ED. Office: 01273 608708 | Mobile: 07791 179481 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051122/d8cbdf40/attachment.html From tim at keow.org Tue Nov 22 10:00:24 2005 From: tim at keow.org (Tim Larson) Date: Tue, 22 Nov 2005 15:00:24 +0000 Subject: [Nitro] request parameters Message-ID: <20051122150024.GB4547@localhost> Periods '.' in request parameter names are handled specially by nitro, such that you cannot retrieve the value of a param named 'cats.and.dogs' via request['cats.and.dogs'] but instead you must use request['cats.and']['dogs'] (hope I got that right.) This might be really handy in some situations, but I would really like to also be able to retrieve via the full param name. --Tim Larson From m.fellinger at gmail.com Tue Nov 22 10:17:33 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Tue, 22 Nov 2005 16:17:33 +0100 Subject: [Nitro] Multipart forms and the request parameters In-Reply-To: <70DEDD57-1CD8-43B8-A621-5DBC72920128@motionpath.com> References: <70DEDD57-1CD8-43B8-A621-5DBC72920128@motionpath.com> Message-ID: <200511221617.37544.m.fellinger@gmail.com> I don't fully get this one, is it not simpler to do request['no_key'].empty? maybe i don't fully understand the situation, but this is what i would do. Am Dienstag 22 November 2005 15:47 schrieb Chris Farmiloe: > Hi listers: > > Little query to anyone in the know.... > > When a multipart form gets parsed into the @params (request) hash the > default value for the contents is set to be a new Array, this results in > request['no_key'] => [] > > and more of a problem.. > > request['no_key'].nil? => false > > I have patched the request wrapper to fix this and stop the request > parameters acting so differently when using multipart forms. > using the fetch method > > but the @params hash still has the default value of an empty array. > > so.. Is there a legitimate reason for the @params hash to have default > value of an empty array? > > gmosx: would you like this patch or do you think this should be fixed > in cgi.rb when the params hash is built? > > > > Chris Farmiloe > Design & Development. > > Motionpath Digital Media Ltd. > St Georges road, Brighton, BN2 1ED. > Office: 01273 608708 | Mobile: 07791 179481 -------------- 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/20051122/475b33df/attachment.bin From chris at motionpath.com Tue Nov 22 10:30:49 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Tue, 22 Nov 2005 15:30:49 +0000 Subject: [Nitro] Multipart forms and the request parameters In-Reply-To: <200511221617.37544.m.fellinger@gmail.com> References: <70DEDD57-1CD8-43B8-A621-5DBC72920128@motionpath.com> <200511221617.37544.m.fellinger@gmail.com> Message-ID: yes. I could quiet easily test for this in my nitro app, but what I don't think should be happening is that the request[] calls act differently depending on whether the form was posted with multipart data or not. if the form was multipart encoded then puts "hello" if request['no_key'] ==> "hello" if normal enc-type puts "hello" if request['no_key'] ==> just a consistency thing Chris Farmiloe Design & Development. Motionpath Digital Media Ltd. St Georges road, Brighton, BN2 1ED. Office: 01273 608708 | Mobile: 07791 179481 On 22 Nov 2005, at 15:17, Michael Fellinger wrote: > I don't fully get this one, is it not simpler to do request > ['no_key'].empty? > > maybe i don't fully understand the situation, but this is what i > would do. > > Am Dienstag 22 November 2005 15:47 schrieb Chris Farmiloe: >> Hi listers: >> >> Little query to anyone in the know.... >> >> When a multipart form gets parsed into the @params (request) hash the >> default value for the contents is set to be a new Array, this >> results in >> request['no_key'] => [] >> >> and more of a problem.. >> >> request['no_key'].nil? => false >> >> I have patched the request wrapper to fix this and stop the request >> parameters acting so differently when using multipart forms. >> using the fetch method >> >> but the @params hash still has the default value of an empty array. >> >> so.. Is there a legitimate reason for the @params hash to have >> default >> value of an empty array? >> >> gmosx: would you like this patch or do you think this should be fixed >> in cgi.rb when the params hash is built? >> >> >> >> Chris Farmiloe >> Design & Development. >> >> Motionpath Digital Media Ltd. >> St Georges road, Brighton, BN2 1ED. >> Office: 01273 608708 | Mobile: 07791 179481 > _______________________________________________ > 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/20051122/2d21cb06/attachment.html From chris at motionpath.com Tue Nov 22 10:38:58 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Tue, 22 Nov 2005 15:38:58 +0000 Subject: [Nitro] request parameters In-Reply-To: <20051122150024.GB4547@localhost> References: <20051122150024.GB4547@localhost> Message-ID: <4A4CA75E-C7DF-438B-9C52-DFF118BF60D9@motionpath.com> yeah i think the idea is that you could group separate objects together for one request just using the naming. example (pseudo html)
then from the /process method call something like Article = Property.populate_object(Article.new, @params['Article']) Comment = Property.populate_object(Comment.new, @params['Comment']) and we would have our two objects full off nice form data ready for use. I'm not sure I agree that the values should be duplicated with their full names in the request/params hash. I don't think it is much to ask that some conventions be followed in naming, _'s would visibly tie in with ruby's variables tighter too. cat_and_dog looks nicer too ;-) I would like to see further nesting of the "." hashed names... ie. cat.and.dog ----> @params['cat']['and']['dog'] since as it currently stands I think my example above would break if I had a Time or Date property :) Chris Farmiloe Design & Development. Motionpath Digital Media Ltd. St Georges road, Brighton, BN2 1ED. Office: 01273 608708 | Mobile: 07791 179481 On 22 Nov 2005, at 15:00, Tim Larson wrote: > Periods '.' in request parameter names are handled specially > by nitro, such that you cannot retrieve the value of a param > named 'cats.and.dogs' via request['cats.and.dogs'] but instead > you must use request['cats.and']['dogs'] (hope I got that right.) > This might be really handy in some situations, but I would > really like to also be able to retrieve via the full param name. > > --Tim Larson > _______________________________________________ > 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/20051122/993a0a2f/attachment.html From tim at keow.org Tue Nov 22 11:17:29 2005 From: tim at keow.org (Tim Larson) Date: Tue, 22 Nov 2005 16:17:29 +0000 Subject: [Nitro] request parameters In-Reply-To: <4A4CA75E-C7DF-438B-9C52-DFF118BF60D9@motionpath.com> References: <20051122150024.GB4547@localhost> <4A4CA75E-C7DF-438B-9C52-DFF118BF60D9@motionpath.com> Message-ID: <20051122161729.GC4547@localhost> On Tue, Nov 22, 2005 at 03:38:58PM +0000, Chris Farmiloe wrote: > yeah i think the idea is that you could group separate objects > together for one request just using the naming. ... > Article = Property.populate_object(Article.new, @params['Article']) > Comment = Property.populate_object(Comment.new, @params['Comment']) I understand the above use, but... > > I'm not sure I agree that the values should be duplicated with their > full names in the request/params hash. I don't think it is much > to ask that some conventions be followed in naming, _'s would > visibly tie in with ruby's variables tighter too. > > cat_and_dog looks nicer too ;-) ...this suggestion is not viable when the reason for the periods is to map to nested data, and underscores '_' are already in use in simple multi-word names. The point is that we should be able to use any normally legal (for CGI programming) request parameter names and be able to retrieve their values without data-structure-walking gymnastics. If the framework *also* wants to categorize the request parameters (making a tree-shaped data structure like it does now) it should be free to do so...but should not break the traditional CGI-style programs in the process. Use two different variables to get at the differently organizations of the parameters, just picking names out of the air for example: request['some.name'] and: request_tree['some']['name'] ...and since ruby has references (multiple variable names can refer to the same data,) this would _not_ have to double the memory use for storing the request parameter data. > I would like to see further nesting of the "." hashed names... > ie. cat.and.dog ----> @params['cat']['and']['dog'] > since as it currently stands I think my example above would break if > I had > a Time or Date property :) Agreed, the nested version does need more nesting. --Tim Larson From chris at motionpath.com Tue Nov 22 11:53:04 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Tue, 22 Nov 2005 16:53:04 +0000 Subject: [Nitro] request parameters In-Reply-To: <20051122161729.GC4547@localhost> References: <20051122150024.GB4547@localhost> <4A4CA75E-C7DF-438B-9C52-DFF118BF60D9@motionpath.com> <20051122161729.GC4547@localhost> Message-ID: > ...this suggestion is not viable when the reason for the periods > is to map to nested data, and underscores '_' are already in use > in simple multi-word names. Good point. > The point is that we should be able to use any normally legal > (for CGI programming) request parameter names and be able to > retrieve their values without data-structure-walking gymnastics. > > If the framework *also* wants to categorize the request parameters > (making a tree-shaped data structure like it does now) it should > be free to do so...but should not break the traditional CGI-style > programs in the process. Yeah I guess it doesn't really fit with Nitro's "Choice" ethos well ... until someone want to trek through cgi.rb, *hides* you could override the request getter methods by requiring something like this in your run.rb to give you the kinda functionality your after temporarily? module Nitro # Overides fetch and it's shortcut [] to allow access to 'this.that' params module Request def [](param) fetch(param) end def fetch(param, default = nil) if param =~ /\./ keys = param.split('.') param = @params keys.each do |k| param = param.fetch(k, default) end param else param = @params.fetch(param, default) end end end end Chris Farmiloe Design & Development. Motionpath Digital Media Ltd. St Georges road, Brighton, BN2 1ED. Office: 01273 608708 | Mobile: 07791 179481 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051122/14d137bb/attachment.html From reid.thompson at ateb.com Tue Nov 22 13:33:08 2005 From: reid.thompson at ateb.com (Reid Thompson) Date: Tue, 22 Nov 2005 13:33:08 -0500 Subject: [Nitro] Idea for improving performance In-Reply-To: References: Message-ID: <43836464.7030602@ateb.com> Sam Smoot wrote: > It doesn't mark it for Deletion in the SQL sense. A better way to > describe it might be that it's marked for GarbageCollection. Either > way an Update query combines the existing tuple with the new data. IOW > you don't need to submit the full tuple. > > This idea for improving performance is actually very sound, and > implemented by "most" major O/R Mappers around. It's called a > UnitOfWork (http://www.martinfowler.com/eaaCatalog/unitOfWork.html). So what is being stated is that currently Og( or an underlying layer ), given a table with Columns N-P, when asked to perform an update affecting only P, generates SQL along the lines of '... update table_blah set N=Nold, M=Mold, O=Oold, P=Pnew ...' instead of '... update table_blah set P=Pnew ...' and that given the above is true, that by using the second form, we know that Og ( and/or underlying layers ) will perform faster by not having to handle the non-changing values From timh at dirtymonday.net Tue Nov 22 13:56:06 2005 From: timh at dirtymonday.net (Tim Howe) Date: Tue, 22 Nov 2005 10:56:06 -0800 Subject: [Nitro] Running multiple Nitro sites under Lighttpd/FCGI In-Reply-To: <43832E44.60909@cs.helsinki.fi> References: <20051119095116.669a4b4d.timh@dirtymonday.net> <20051121170419.0dc9dec6.timh@dirtymonday.net> <43832E44.60909@cs.helsinki.fi> Message-ID: <20051122105606.7fa7c52f.timh@dirtymonday.net> On Tue, 22 Nov 2005 16:42:12 +0200 Aleksi Niemela wrote: > Just a though. Any chances you're still running Nitro in debug mode? > That'd mean the processes go periodically check file system there are no > changes in code to reload. In my Windows box under cygwin there's > periodical load coming from one instance, and the load is much lighter > under one-click-installed-ruby. However, disabling reloads probably > affected the load. Can't recall for sure nor can I test it right now. > In case you're running it in Debug mode, perhaps you'd like to say > something like the following. May help. Or then again, may not help at > all :). > > - Aleksi If debug is on by default and needs to be turned off, then I am still running in debug mode because I have not seen a debug setting. > > class Config > attr_accessor :db, :webserver > def initialize > @db = { > :address => "localhost", > ...... I can't even find this code segment anywhere. What is this? --TimH From timh at dirtymonday.net Tue Nov 22 14:13:07 2005 From: timh at dirtymonday.net (Tim Howe) Date: Tue, 22 Nov 2005 11:13:07 -0800 Subject: [Nitro] spawn-fcgi wiki page In-Reply-To: References: <20051122033140.GA26321@dude.dirtymonday.net> <20051122000118.3d155b07.timh@dirtymonday.net> Message-ID: <20051122111307.09b9a819.timh@dirtymonday.net> On Tue, 22 Nov 2005 10:15:20 +0200 George Moschovitis wrote: > Here is the code I use to daemonize the DRB session server used by > Nitro in FCGI mode: > > $ vi ds.rb > require 'daemons' > Daemons.run('/path/to/nitro/lib/nitro/session/drbserver.rb') > > $ ruby ds.rb start > > hope this helps.... Actually I'm not really sure how I would apply this to my situation, but I also don't claim to have any idea what I am doing. Should I wrap my index.fcgi script with this? I am using spawn-fcgi, which is a program that comes with lighttpd, to launch my index.fcgi program and create the socket file, etc... It appears to work, meaning that the fcgi process seems to start in the background, the socket is created with the right permissions, and the wiki works. I continue using the shell for other things (though obviously STDERR hasn't been altered). Only after I log does the ruby process die and the wiki go dead. My setup is at http://www.nitrohq.com/view/Spark_with_PostgreSQL,_Lighttpd,_and_spawn-fcgi Almost nothing there was created by me. I took various bits and parts from other howtos. --TimH From timh at dirtymonday.net Tue Nov 22 16:05:23 2005 From: timh at dirtymonday.net (Tim Howe) Date: Tue, 22 Nov 2005 13:05:23 -0800 Subject: [Nitro] spawn-fcgi wiki page SOLUTION In-Reply-To: <20051122033140.GA26321@dude.dirtymonday.net> References: <20051122033140.GA26321@dude.dirtymonday.net> Message-ID: <20051122130523.396f5185.timh@dirtymonday.net> Aleksi Niemela provided me with a modified run.rb file that solved both my issues. I have posted this to the Wiki page I was working on. http://www.nitrohq.com/view/Spark_with_PostgreSQL%2C_Lighttpd%2C_and_spawn-fcgi My current goal is to figure out why this works... Many thanks to everyone who helped. --TimH From zimba.tm at gmail.com Tue Nov 22 17:19:01 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Tue, 22 Nov 2005 23:19:01 +0100 Subject: [Nitro] [patch] lib/og/relations/refers_to.rb Message-ID: <3ff63f9b0511221419k70eeae71g@mail.gmail.com> For :Og 0.25.0 Symptom : if some classe is not defined in your model while reffering to from another, nitro throws an uninformative error. So you have to look at your whole model guessing where that could have happened. Example : class Person has_one :name_your_class end Solution : Give the atrribute and the class where the class was missing -- Cheers, zimba http://zimba.oree.ch -------------- next part -------------- A non-text attachment was scrubbed... Name: refers_to.patch Type: application/octet-stream Size: 414 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051122/b0016760/attachment.obj From m.fellinger at gmail.com Tue Nov 22 19:27:09 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Wed, 23 Nov 2005 01:27:09 +0100 Subject: [Nitro] typo in taggable.rb Message-ID: <200511230127.14390.m.fellinger@gmail.com> Hey List, I just ran into a small typo in taggable.rb that makes it impossible to use #find_by_any_tag it's on line 128 info = ogmanager.store.join_table_info(self, tag) should be info = ogmanager.store.join_table_info(self, Tag) that's all folks :) 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/20051122/51b088d6/attachment.bin From zimba.tm at gmail.com Tue Nov 22 19:29:20 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Wed, 23 Nov 2005 01:29:20 +0100 Subject: [Nitro] [patch] lib/og/store/sql.rb Message-ID: <3ff63f9b0511221629j1ab850b3i@mail.gmail.com> Another debug helper patch -- Cheers, zimba http://zimba.oree.ch -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sql.rb.diff Url: http://rubyforge.org/pipermail/nitro-general/attachments/20051122/d2a470b6/attachment.pl From george.moschovitis at gmail.com Wed Nov 23 04:05:20 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 23 Nov 2005 11:05:20 +0200 Subject: [Nitro] Idea for improving performance In-Reply-To: <43836464.7030602@ateb.com> References: <43836464.7030602@ateb.com> Message-ID: Og allows you to do both: u = User.find_by_name('gmosx') u.password = hello u.save # => updates the full row. u = User.find_by_name('gmosx') u.password = hello u.age = 3 u.update_properties :password, :age # => only updates the selected fields Some other tricks: User.update('@hits = @hits + 1', :condition => 'oid = 1') user.update_by_sql '@hits = @hits + 1' Suit yourself ;-) -g. On 11/22/05, Reid Thompson wrote: > Sam Smoot wrote: > > > It doesn't mark it for Deletion in the SQL sense. A better way to > > describe it might be that it's marked for GarbageCollection. Either > > way an Update query combines the existing tuple with the new data. IOW > > you don't need to submit the full tuple. > > > > This idea for improving performance is actually very sound, and > > implemented by "most" major O/R Mappers around. It's called a > > UnitOfWork (http://www.martinfowler.com/eaaCatalog/unitOfWork.html). > > > So what is being stated is that currently Og( or an underlying layer ), > given a table with Columns N-P, when asked to perform an update > affecting only P, generates SQL along the lines of '... update > table_blah set N=Nold, M=Mold, O=Oold, P=Pnew ...' instead of '... > update table_blah set P=Pnew ...' > > and that given the above is true, that by using the second form, we know > that Og ( and/or underlying layers ) will perform faster by not having > to handle the non-changing values > _______________________________________________ > 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 Nov 23 04:06:21 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 23 Nov 2005 11:06:21 +0200 Subject: [Nitro] spawn-fcgi wiki page SOLUTION In-Reply-To: <20051122130523.396f5185.timh@dirtymonday.net> References: <20051122033140.GA26321@dude.dirtymonday.net> <20051122130523.396f5185.timh@dirtymonday.net> Message-ID: Glad to know you got this working :) -g. On 11/22/05, Tim Howe wrote: > Aleksi Niemela provided me with a modified run.rb file that solved both my > issues. > > I have posted this to the Wiki page I was working on. > > http://www.nitrohq.com/view/Spark_with_PostgreSQL%2C_Lighttpd%2C_and_spawn-fcgi > > My current goal is to figure out why this works... > > Many thanks to everyone who helped. > > --TimH > _______________________________________________ > 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 Nov 23 04:16:45 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 23 Nov 2005 11:16:45 +0200 Subject: [Nitro] typo in taggable.rb In-Reply-To: <200511230127.14390.m.fellinger@gmail.com> References: <200511230127.14390.m.fellinger@gmail.com> Message-ID: thanx... On 11/23/05, Michael Fellinger wrote: > Hey List, > > I just ran into a small typo in taggable.rb that makes it impossible to use > #find_by_any_tag > > it's on line 128 > info = ogmanager.store.join_table_info(self, tag) > > should be > info = ogmanager.store.join_table_info(self, Tag) > > that's all folks :) > 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 george.moschovitis at gmail.com Wed Nov 23 04:53:44 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 23 Nov 2005 11:53:44 +0200 Subject: [Nitro] [patch] lib/og/store/sql.rb In-Reply-To: <3ff63f9b0511221629j1ab850b3i@mail.gmail.com> References: <3ff63f9b0511221629j1ab850b3i@mail.gmail.com> Message-ID: The password for nitrohq.com is 'nitro51' be careful ;-) -g. On 11/23/05, zimba-tm wrote: > Another debug helper patch > > -- > 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 rob at motionpath.com Wed Nov 23 11:49:29 2005 From: rob at motionpath.com (Rob Pitt) Date: Wed, 23 Nov 2005 16:49:29 +0000 Subject: [Nitro] [patch] lib/og/store/sql.rb In-Reply-To: References: <3ff63f9b0511221629j1ab850b3i@mail.gmail.com> Message-ID: <43849D99.4080101@motionpath.com> OK I will be careful (hehe) :D George Moschovitis wrote: >The password for nitrohq.com is 'nitro51' > >be careful ;-) > >-g. > > >On 11/23/05, zimba-tm wrote: > > >>Another debug helper patch >> >>-- >>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 > > From george.moschovitis at gmail.com Wed Nov 23 12:00:49 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Wed, 23 Nov 2005 19:00:49 +0200 Subject: [Nitro] [patch] lib/og/store/sql.rb In-Reply-To: <43849D99.4080101@motionpath.com> References: <3ff63f9b0511221629j1ab850b3i@mail.gmail.com> <43849D99.4080101@motionpath.com> Message-ID: Oh well ;-) shit happens :-) -g. On 11/23/05, Rob Pitt wrote: > OK I will be careful (hehe) :D > > George Moschovitis wrote: > > >The password for nitrohq.com is 'nitro51' > > > >be careful ;-) > > > >-g. > > > > > >On 11/23/05, zimba-tm wrote: > > > > > >>Another debug helper patch > >> > >>-- > >>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 > > > > > > _______________________________________________ > 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 Aleksi.Niemela at cs.helsinki.fi Wed Nov 23 15:21:33 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Wed, 23 Nov 2005 22:21:33 +0200 Subject: [Nitro] Dynamic finders having initializer, but collections have none Message-ID: <4384CF4D.30000@cs.helsinki.fi> I wrote a patch to allow dynamic finder creators to have initializator as a block. So code could look like: u = User.find_or_create_by_name('tim') {|t| t.age = 13 } But that didn't solve my problems yet. I'd like to see two improvements (was unable to provide patch for those right away). 1) Collections don't have any dynamic finders. It's not possible to write user.tags.find_by_name_and_status('foo', 'in use') So this marvellous feature should be brought into collections as well! 2) Collections don't have dynamic finder creators. With new patch one can't still write Tags.find_or_create_by_user_oid_and_name_and_status(user.oid, 'foo', 'in use') do |t| user.tags.add_tag t end or perhaps this works but nothing more complicated probably not, as in the block the object isn't properly initialized yet. I have to say I really like how Og is introducing nice features! - Aleksi From epiperak at softlab.ece.ntua.gr Wed Nov 23 20:31:26 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Thu, 24 Nov 2005 03:31:26 +0200 (EET) Subject: [Nitro] spawn-fcgi wiki page In-Reply-To: References: <20051122033140.GA26321@dude.dirtymonday.net> Message-ID: > You have to daemonize the ruby process. > However I use a different setup, Lighttpd starts the fcgi handlers and > manages them. And I see no problems whatsoever. > > -g. On this subject, I was recently discussing on the channel, that with lighttpd and nitro i see around 10 ruby processes running, 4 of which use minimum a 1.7% CPU, while nobody does any requests (that is a p4 debian machine). Is that normal? 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 Wed Nov 23 20:39:44 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Thu, 24 Nov 2005 03:39:44 +0200 (EET) Subject: [Nitro] javascript and session In-Reply-To: <3ff63f9b0511220136x132bcb1by@mail.gmail.com> References: <3ff63f9b0511220136x132bcb1by@mail.gmail.com> Message-ID: > First, don't use popups ! Why? > > Second ,it looks like your form gets submitted, so logically, the rest > of the script is not executed. Could it that be it ? The submit executes the function in the controller, yet I am sure the javascript is executed completely because if I remove the .close or the return false, then the popup does not close, and the remaining open popup loads the main page. Popups are necessary in my app. The user adds Tenants in Rent Rolls. He/She has to be able to look at the total rent roll (displayed in the main page) as he enters new tenants. The same occurs while entering loan repayment schedules, etc... Also, popups look COOL, especially to people with small or none experience. 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 Wed Nov 23 20:57:08 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Thu, 24 Nov 2005 03:57:08 +0200 (EET) Subject: [Nitro] [patch] lib/og/store/sql.rb In-Reply-To: References: <3ff63f9b0511221629j1ab850b3i@mail.gmail.com> <43849D99.4080101@motionpath.com> Message-ID: > Oh well ;-) > > shit happens :-) when you party naked :-) (sorry I had to complete that) eerieshadow From timh at dirtymonday.net Wed Nov 23 22:09:29 2005 From: timh at dirtymonday.net (TimH) Date: Wed, 23 Nov 2005 19:09:29 -0800 Subject: [Nitro] spawn-fcgi wiki page In-Reply-To: References: <20051122033140.GA26321@dude.dirtymonday.net> Message-ID: <20051123190929.3dff6500.timh@dirtymonday.net> On Thu, 24 Nov 2005 03:31:26 +0200 (EET) Emmanuel Piperakis wrote: > > You have to daemonize the ruby process. > > However I use a different setup, Lighttpd starts the fcgi handlers and > > manages them. And I see no problems whatsoever. > > > > -g. > > On this subject, I was recently discussing on the channel, that with > lighttpd and nitro i see around 10 ruby processes running, 4 of which use > minimum a 1.7% CPU, while nobody does any requests (that is a p4 debian > machine). Is that normal? Take a look at the run.rb in my Spark example on the wiki. It sets the run mode to :live, which makes my idle fcgi processes...idle. I am under the impression the majority of that run.rb can be used with any other nitro app. --TimH From itsme213 at hotmail.com Wed Nov 23 23:50:13 2005 From: itsme213 at hotmail.com (itsme213) Date: Wed, 23 Nov 2005 22:50:13 -0600 Subject: [Nitro] Og examples Message-ID: Where can I find some basic examples of using Og with Kirbybase or Filesystem store? I tried the below and it dies on the r.save. c:/ruby/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:376:in `method_missing': undefined method `ogmanager' for B:Class (NoMethodError) from c:/ruby/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:14:in `save' from C:/des/desktop/citi/idem/domain model/role_model.rb:22 Process ruby exited with code 1 Also there are errors in the testcases included in og. Thanks! ----------------------------------- require 'og' class A; end class B property :domain, A end db = Og::Store.new( :database => 'test', :adapter => 'kirby' ) r = B.new o = A.new r.domain = o puts r.domain r.save o.save From itsme213 at hotmail.com Thu Nov 24 00:06:10 2005 From: itsme213 at hotmail.com (itsme213) Date: Wed, 23 Nov 2005 23:06:10 -0600 Subject: [Nitro] Running spark, flare Message-ID: Using Nitro 0.25 and the latest spark, flare: Rinning spark: c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__': No such file to load -- syntax/convertors/html (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from ./src/controller.rb:11 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from run.rb:11 Running flare: I get a page with a search box and nothing more. Are these supposed to run with 0.25 and do something useful, or provide a good example? Thanks. From itsme213 at hotmail.com Thu Nov 24 00:32:40 2005 From: itsme213 at hotmail.com (itsme213) Date: Wed, 23 Nov 2005 23:32:40 -0600 Subject: [Nitro] Scaffolding? Message-ID: Is there a good example that uses Nitro scaffolding to (more) automatically create the web views and entry/editing forms, both for basic types and for relations? Much of the xhtml files seems a bit repetitive. Thanks From bryan.a.soto at gmail.com Thu Nov 24 00:51:56 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 23 Nov 2005 21:51:56 -0800 Subject: [Nitro] Running spark, flare In-Reply-To: References: Message-ID: Re: Spark, That would be a missing dependency for spark. gem install syntax should clear that up. Re: Flare, I'm assuming you mean the page is rather empty, not that it consists solely of a search box. If so, the readme file included the zip contains a bit more information. As an example, go to http://localhost:9999/admin and follow the links for Article, Category, etc. to add some content. bryan On 11/23/05, itsme213 wrote: > > Using Nitro 0.25 and the latest spark, flare: > > Rinning spark: > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require__': > No such file to load -- > syntax/convertors/html (LoadError) > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require' > from ./src/controller.rb:11 > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require__' > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require' > from run.rb:11 > > Running flare: > I get a page with a search box and nothing more. > > Are these supposed to run with 0.25 and do something useful, or provide a > good example? > > Thanks. > _______________________________________________ > 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/20051124/2270e606/attachment.html From bryan.a.soto at gmail.com Thu Nov 24 00:59:00 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 23 Nov 2005 21:59:00 -0800 Subject: [Nitro] Scaffolding? In-Reply-To: References: Message-ID: The scaffolding is actually generated via code by including scaffold ClassToScaffold in the controller file. There's also some new support via the gen script to write the generated scaffolding out to a file. For more info, in your shell run gen form On 11/23/05, itsme213 wrote: > > Is there a good example that uses Nitro scaffolding to (more) > automatically > create the web views and entry/editing forms, both for basic types and for > relations? Much of the xhtml files seems a bit repetitive. > > Thanks > _______________________________________________ > 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/20051124/dff2294e/attachment.html From bryan.a.soto at gmail.com Thu Nov 24 01:03:02 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 23 Nov 2005 22:03:02 -0800 Subject: [Nitro] Scaffolding? In-Reply-To: References: Message-ID: The scaffolding is actually generated via code by including scaffold ClassToScaffold in the controller file. There's also some new support via the gen script to write the generated scaffolding out to a file. It's new, so I'm sure suggestions are welcome. For more info, in your shell run gen form On 11/23/05, itsme213 wrote: > > Is there a good example that uses Nitro scaffolding to (more) > automatically > create the web views and entry/editing forms, both for basic types and for > relations? Much of the xhtml files seems a bit repetitive. > > Thanks > _______________________________________________ > 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/20051124/e2ae74eb/attachment.html From bryan.a.soto at gmail.com Thu Nov 24 01:18:58 2005 From: bryan.a.soto at gmail.com (Bryan Soto) Date: Wed, 23 Nov 2005 22:18:58 -0800 Subject: [Nitro] Og examples In-Reply-To: References: Message-ID: Here's a working version. Hopefully it's enough to give you a start. Passing [] as the type for :domain works for storing class A as it's done via YAML and should load correctly. I'm not sure why it's necessary though... ------------------------------------------ require 'og' class A; end class B property :domain, [] end Og.setup( :database => 'test', # :base_dir => 'other_directory_name', # In case you don't want kirbydb :store => :kirby ) r = B.new o = A.new r.domain = o puts r.domain r.save On 11/23/05, itsme213 wrote: > > Where can I find some basic examples of using Og with Kirbybase or > Filesystem store? > > I tried the below and it dies on the r.save. > c:/ruby/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:376:in > `method_missing': undefined method `ogmanager' for B:Class (NoMethodError) > from c:/ruby/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:14:in > `save' > from C:/des/desktop/citi/idem/domain model/role_model.rb:22 > Process ruby exited with code 1 > > Also there are errors in the testcases included in og. > > Thanks! > ----------------------------------- > > require 'og' > > class A; end > > class B > property :domain, A > end > > db = Og::Store.new( > :database => 'test', > :adapter => 'kirby' > ) > > r = B.new > > o = A.new > > r.domain = o > > puts r.domain > > r.save > o.save > _______________________________________________ > 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/20051124/23b37f74/attachment.html From george.moschovitis at gmail.com Thu Nov 24 03:32:30 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 24 Nov 2005 10:32:30 +0200 Subject: [Nitro] javascript and session In-Reply-To: References: <3ff63f9b0511220136x132bcb1by@mail.gmail.com> Message-ID: > Also, popups look COOL, especially to people with small or none > experience. I think popups in a webap are uncool! -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Thu Nov 24 03:34:26 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 24 Nov 2005 10:34:26 +0200 Subject: [Nitro] Running spark, flare In-Reply-To: References: Message-ID: There is also a method called init_db that populates a standard db. -g. On 11/24/05, Bryan Soto wrote: > Re: Spark, > > That would be a missing dependency for spark. > > gem install syntax > > should clear that up. > > Re: Flare, > > I'm assuming you mean the page is rather empty, not that it consists solely > of a search box. If so, the readme file included the zip contains a bit more > information. > > As an example, go to http://localhost:9999/admin and follow the links for > Article, Category, etc. to add some content. > > bryan > > > On 11/23/05, itsme213 wrote: > > Using Nitro 0.25 and the latest spark, flare: > > > > Rinning spark: > > > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require__': > > No such file to load -- > > syntax/convertors/html (LoadError) > > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > `require' > > from ./src/controller.rb:11 > > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > `require__' > > from > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > > `require' > > from run.rb:11 > > > > Running flare: > > I get a page with a search box and nothing more. > > > > Are these supposed to run with 0.25 and do something useful, or provide a > > good example? > > > > Thanks. > > _______________________________________________ > > 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 Nov 24 03:36:23 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 24 Nov 2005 10:36:23 +0200 Subject: [Nitro] Dynamic finders having initializer, but collections have none In-Reply-To: <4384CF4D.30000@cs.helsinki.fi> References: <4384CF4D.30000@cs.helsinki.fi> Message-ID: > 1) Collections don't have any dynamic finders. It's not possible to write > user.tags.find_by_name_and_status('foo', 'in use') > So this marvellous feature should be brought into collections as well! Hmm nice tip, will add ;-) -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From epiperak at softlab.ece.ntua.gr Thu Nov 24 04:58:22 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Thu, 24 Nov 2005 11:58:22 +0200 (EET) Subject: [Nitro] spawn-fcgi wiki page In-Reply-To: <20051123190929.3dff6500.timh@dirtymonday.net> References: <20051122033140.GA26321@dude.dirtymonday.net> <20051123190929.3dff6500.timh@dirtymonday.net> Message-ID: Thanx > On Thu, 24 Nov 2005 03:31:26 +0200 (EET) > Emmanuel Piperakis wrote: > >>> You have to daemonize the ruby process. >>> However I use a different setup, Lighttpd starts the fcgi handlers and >>> manages them. And I see no problems whatsoever. >>> >>> -g. >> >> On this subject, I was recently discussing on the channel, that with >> lighttpd and nitro i see around 10 ruby processes running, 4 of which use >> minimum a 1.7% CPU, while nobody does any requests (that is a p4 debian >> machine). Is that normal? > > Take a look at the run.rb in my Spark example on the wiki. It sets the run mode to :live, which makes my idle fcgi processes...idle. I am under the impression the majority of that run.rb can be used with any other nitro app. > > --TimH > _______________________________________________ > 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 Nov 24 05:00:19 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Thu, 24 Nov 2005 12:00:19 +0200 (EET) Subject: [Nitro] javascript and session In-Reply-To: References: <3ff63f9b0511220136x132bcb1by@mail.gmail.com> Message-ID: >> Also, popups look COOL, especially to people with small or none >> experience. > > I think popups in a webap are uncool! > and let the war begin! > -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 chris at motionpath.com Thu Nov 24 05:10:34 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Thu, 24 Nov 2005 10:10:34 +0000 Subject: [Nitro] javascript and session In-Reply-To: References: <3ff63f9b0511220136x132bcb1by@mail.gmail.com> Message-ID: Fight! anything that makes the back-button in the browser not work as expected = BAD a lot of people use IE with the window maximized, a new window in this situation can't be told apart from just navigating to a new page and confuses the general public! popups I will honor: file/browser dialogs (as this is expected in the OS) colour pickers, and other such tools (but really id implement these with drag-able, HTML elements etc), and "enlarge your penis/viagra" adverts... no site is complete without them, in fact nitro should probably have a helper for them :) Chris Farmiloe Design & Development. Motionpath Digital Media Ltd. St Georges road, Brighton, BN2 1ED. Office: 01273 608708 | Mobile: 07791 179481 On 24 Nov 2005, at 10:00, Emmanuel Piperakis wrote: >>> Also, popups look COOL, especially to people with small or none >>> experience. >> >> I think popups in a webap are uncool! >> > and let the war begin! > >> -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} > _______________________________________________ > 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/20051124/79b4edd4/attachment.html From itsme213 at hotmail.com Thu Nov 24 11:43:16 2005 From: itsme213 at hotmail.com (itsme213) Date: Thu, 24 Nov 2005 10:43:16 -0600 Subject: [Nitro] Rdoc Message-ID: Does nitro 0.25 come with rdoc? If so, is there some extra gem command (other than the "gem install") that I need to install the docs? I currently don't get any rdocs for nitro or og. Thanks! From itsme213 at hotmail.com Thu Nov 24 11:52:23 2005 From: itsme213 at hotmail.com (itsme213) Date: Thu, 24 Nov 2005 10:52:23 -0600 Subject: [Nitro] Running spark, flare References: Message-ID: Thanks Bryan. I can use/follow it now. ----- Original Message ----- From: Bryan Soto To: General discussion about Nitro Sent: Wednesday, November 23, 2005 11:51 PM Subject: Re: [Nitro] Running spark, flare Re: Spark, That would be a missing dependency for spark. gem install syntax should clear that up. Re: Flare, I'm assuming you mean the page is rather empty, not that it consists solely of a search box. If so, the readme file included the zip contains a bit more information. As an example, go to http://localhost:9999/admin and follow the links for Article, Category, etc. to add some content. bryan On 11/23/05, itsme213 wrote: Using Nitro 0.25 and the latest spark, flare: Rinning spark: c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__': No such file to load -- syntax/convertors/html (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from ./src/controller.rb:11 from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require' from run.rb:11 Running flare: I get a page with a search box and nothing more. Are these supposed to run with 0.25 and do something useful, or provide a good example? Thanks. _______________________________________________ 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/20051124/a18b02bc/attachment.html From george.moschovitis at gmail.com Thu Nov 24 11:53:42 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 24 Nov 2005 18:53:42 +0200 Subject: [Nitro] Rdoc In-Reply-To: References: Message-ID: rake doc On 11/24/05, itsme213 wrote: > Does nitro 0.25 come with rdoc? If so, is there some extra gem command > (other than the "gem install") that I need to install the docs? I currently > don't get any rdocs for nitro or og. > > Thanks! > _______________________________________________ > 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 Nov 24 12:49:25 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 24 Nov 2005 19:49:25 +0200 Subject: [Nitro] Seaside style call/answer mechanism Message-ID: Dear devs, I would like to add a Seaside-inspired feature to Nitro. A call/answer mechanism. I 'll try to explain with an example. Let's say you want to make some pages only accessible to logged in users: class MyController def my_page @user ||= call(:login) ... end ... def login ... answer user end end when returning from the login page nitro should redirect to the caller. Anyone has any ideas how to implement this. I don't want the full power of Seaside call/answer. But I am not sure how to handle the case when a user has multiple windows open at the same time. George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From mneumann at ntecs.de Thu Nov 24 13:11:35 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Thu, 24 Nov 2005 19:11:35 +0100 Subject: [Nitro] Seaside style call/answer mechanism In-Reply-To: References: Message-ID: <169D2403-0E2D-49EB-9D23-E1B02FBE51BD@ntecs.de> Am 24.11.2005 um 18:49 schrieb George Moschovitis: > Dear devs, > > I would like to add a Seaside-inspired feature to Nitro. A call/answer > mechanism. I 'll try to explain with an example. Let's say you want to > make some pages only accessible to logged in users: > > class MyController > > def my_page > @user ||= call(:login) > ... > end > > ... > > def login > ... > answer user > end > end > > when returning from the login page nitro should redirect to the > caller. Anyone has any ideas how to implement this. I don't want the > full power of Seaside call/answer. But I am not sure how to handle the > case when a user has multiple windows open at the same time. One possible implementation: Upon call, push the current URL on a stack. Answer then simply returns to the top of stack element. Of course this doesn't work well if you, after you've had called a controller, type in an URL by hand. Another idea is to introduce a special "stack" ID (e.g. ?stid=xxx) upon #call, and store a stack under this ID in the session. #answer only works if a stid is specified. In Seaside/Wee the whole thing is implemented not by storing URLs, but actually the state of the component as of the time when you call #call. Regards, Michael From timh at dirtymonday.net Thu Nov 24 13:17:19 2005 From: timh at dirtymonday.net (TimH) Date: Thu, 24 Nov 2005 10:17:19 -0800 Subject: [Nitro] javascript and session In-Reply-To: References: <3ff63f9b0511220136x132bcb1by@mail.gmail.com> Message-ID: <20051124101719.7177796c.timh@dirtymonday.net> On Thu, 24 Nov 2005 12:00:19 +0200 (EET) Emmanuel Piperakis wrote: > >> Also, popups look COOL, especially to people with small or none > >> experience. > > > > I think popups in a webap are uncool! > > > and let the war begin! Might as well toss my $.02 in then! As a general rule popup windows are something I really dislike, but there have been a few occasions where I could not come up with a better way to do certain things... For example, I had a form that allowed people to enter a rather complicated set of data into a database, and the records had a lot of complicated relationships. The cleanest way to solve the problem of adding some of this data was to add a search field for some entries. This would pop up a search box that the user could select the correct item from (out of many thousands of possibilities), and once selected the window would go away, leaving the selected data in the field of the parent window. It was pretty clean. So, as a general rule: uncool. For specific situations: may be the best way. --TimH From zimba.tm at gmail.com Thu Nov 24 13:20:28 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Thu, 24 Nov 2005 19:20:28 +0100 Subject: [Nitro] javascript and session In-Reply-To: References: <3ff63f9b0511220136x132bcb1by@mail.gmail.com> Message-ID: <3ff63f9b0511241020w5b44a688h@mail.gmail.com> On 24/11/05, Emmanuel Piperakis wrote: > > First, don't use popups ! > > Why? Some reasons : * Users that don't have javascript enabled can't use your website. * Popups are associated to advertisement. More and more tools exist to block them. * You user looses the navigation history when you use popups. One rare occasion where i would agree to use javascript, is when your target browser is well know and that you developp and application, not a website. > > Second ,it looks like your form gets submitted, so logically, the rest > > of the script is not executed. Could it that be it ? > > The submit executes the function in the controller, yet I am sure the > javascript is executed completely because if I remove the .close or the > return false, then the popup does not close, and the remaining open popup > loads the main page. Ok, then the problem looks more serious. Do you store objects in the session ? If yes, try to use the database to store the intermediate datas. > Popups are necessary in my app. The user adds Tenants in Rent Rolls. > He/She has to be able to look at the total rent roll (displayed in the > main page) as he enters new tenants. The same occurs while entering loan > repayment schedules, etc... I'm sure they are not necessary. If you want, i'll gladly help you to circuvent the problem. Send me a screenshot of the page in question with the popup and some explanations of what it is. Some preliminary ideas, is to add a
to replace the popup, like manveru said. The data contained in the div can be fetched asynchronously using javascript. The div could post it's data in an unvisible iframe to avoid page reloading if that is the problem. > Also, popups look COOL, especially to people with small or none > experience. Not at all, popups get lost behind the main browser if the user clicks anywhere outside of it. If a newbie don't see a window they'll think it disappeared and will try to open a new-one. It's my own experience when i did usability tests on lambda users. -- Cheers, zimba http://zimba.oree.ch From george.moschovitis at gmail.com Thu Nov 24 13:21:01 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Thu, 24 Nov 2005 20:21:01 +0200 Subject: [Nitro] Seaside style call/answer mechanism In-Reply-To: <169D2403-0E2D-49EB-9D23-E1B02FBE51BD@ntecs.de> References: <169D2403-0E2D-49EB-9D23-E1B02FBE51BD@ntecs.de> Message-ID: > > One possible implementation: This is what I call an authoritive answer ;-) > top of stack element. Of course this doesn't work well if you, after > you've had called a controller, type in an URL by hand. exactly... > Another idea > is to introduce a special "stack" ID (e.g. ?stid=xxx) upon #call, and > store a stack under this ID in the session. #answer only works if a > stid is specified. This is my current solution, but I am wondering if someone has a better idea... > In Seaside/Wee the whole thing is implemented not by storing URLs, > but actually the state of the component as of the time when you call > #call. Can you please explain this in more detail here on the list? thanks, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From m.fellinger at gmail.com Thu Nov 24 13:33:35 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Thu, 24 Nov 2005 19:33:35 +0100 Subject: [Nitro] small patch for flare Message-ID: <200511241933.39826.m.fellinger@gmail.com> Hey list, attached is a small flare-patch that fixes two annoyances on installing. changed the author-field from "George Moschovitis" to #{article.author} :) also added a fcgi.rb into the public-dir (at least i hope i did it - if not - please add it for me...) -------------- next part -------------- New patches: [manveru_#2 m.fellinger at gmail.com**20051124181517] { hunk ./flare/run.rb 1 +require 'rubygems' hunk ./flare/template/article.xhtml 7 - #{@article.update_time.stamp(:long)} by George Moschovitis + #{@article.update_time.stamp(:long)} by #{@article.author} hunk ./flare/template/articles.xhtml 13 - #{article.update_time.stamp(:long)} by George Moschovitis + #{article.update_time.stamp(:long)} by #{article.author} } Context: [Argh! George Moschovitis **20051124120521] [Added small pager helper method. George Moschovitis **20051124110728] [Fixed aspects not included bug. [manveru, bryan] George Moschovitis **20051124093026] [Fixed again cgi query_string handling. George Moschovitis **20051123151931] [Applied some patches from zimba and manveru. George Moschovitis **20051123092231] [Added test case for the previous fix. George Moschovitis **20051122140154] [bugfix_eval_validate bryan.a.soto at gmail.com**20051118204333 By catching all NoMethodErrors and performing a retry, an endless loop occurred if a NoMethodError was thrown during validation. This fixes that by just handling the call to validate and raising the original exception for anything else. ] [Bumped version number. George Moschovitis **20051122134225] [Temp fix for Admin/Unmanageable bug. George Moschovitis **20051122132858] [Added chdir again. George Moschovitis **20051121122054] [Fix for load_path. George Moschovitis **20051121111205] [Fix in markup. George Moschovitis **20051121102558] [Added Template.strip_xml_comments setting to make guille's patch optional. George Moschovitis **20051117153543] [small bugfix Guillaume Pierronnet **20051117104155] [compiler/morphing.rb and elements.rb bugfixes Guillaume Pierronnet **20051117104041] [cgi adapter fixes Guillaume Pierronnet **20051117132258] [nitro.rb cleanup Guillaume Pierronnet **20051117131956] [Removed buggy drb runner. George Moschovitis **20051117093141] [Small updates in ProjectInfo's George Moschovitis **20051117091435] [Small fixes to prepare for release. George Moschovitis **20051117091031] [Small fix in Og example. George Moschovitis **20051117085915] [Updated release docs. George Moschovitis **20051117085852] [Improved apply.rb George Moschovitis **20051117085809] [Small changes George Moschovitis **20051116161500] [Fixes and small improvements in output caching. George Moschovitis **20051116095749] [Added redirect_home helper. George Moschovitis **20051116080915] [Added --daemon option in drbserver, autostart drb session server from runner when using distributed sessions. George Moschovitis **20051116075935] [Added daemons dependency. George Moschovitis **20051116075919] [Taggable delete hook to cleanup relations. George Moschovitis **20051115162726] [Minor stuff... George Moschovitis **20051115162705] [Don't override to_href if exists when scaffolding. George Moschovitis **20051114145750] [Integrated latest version of kirbybase. George Moschovitis **20051114143744] [Added ultra-useful StaticInclude compiler module. George Moschovitis **20051114132707] [Add new scriptaculous files. George Moschovitis **20051114114402] [Added toggleable javascript helper. George Moschovitis **20051114114311] [Flare: better login system, fixes in javascript, post comments. George Moschovitis **20051114114218] [Updated to latest versions of prototype/scriptaculous. George Moschovitis **20051114112903] [Small fix in flare. George Moschovitis **20051114075901] [Little things. George Moschovitis **20051113110257] [Fixed webrick rewrite problem. [tlarson] Bryan Soto **20051113110152] [Fixed static inclusion, . George Moschovitis **20051113091747] [Fixed set_order. George Moschovitis **20051113081401] [Updated ProjectInfo's, added missing dependencies. George Moschovitis **20051113074406] [Page titles in spark. George Moschovitis **20051111155637] [Updated spark to use the new tag system. George Moschovitis **20051111153138] [Multiple small fixes to make the tests run again, helper tests. George Moschovitis **20051111145535] [Added TimestampedOnCreate. George Moschovitis **20051111130239] [Fix in helper system, removed duplicate file. George Moschovitis **20051111104510] [Improved taggable (keep count/freq). George Moschovitis **20051110154519] [Cleanup of taggable. George Moschovitis **20051109145133] [Brand new taggable mixin, supports polymophism, eval-free implementation. George Moschovitis **20051109144711] [Sqlite as default store, start alias for Og.setup. George Moschovitis **20051109125420] [Added support for Og scoped queries and collection subqueries (ex: user.articles.find :condition => 'hits > 1000') George Moschovitis **20051109125148] [Minor typo fix. George Moschovitis **20051109085411] [Better matching of "for" attribute in Morphing code to allow real html for attributes too chrisfarms at gmail.com**20051108153843] [FIX user_agent issues in cgi/utils chrisfarms at gmail.com**20051108113614] [fixed scaffold not saving relations on new records chrisfarms at gmail.com**20051104111538] [Ehm, to fix the wrong credit for the previous commit I added a new feature: find_or_create_by_xxx. (there is a saying about fame, the feature rocks though). George Moschovitis **20051108154947] [Added support for dynamically generated finders (ex: find_by_name_and_age). Bryan Soto **20051108154015] [Readded gen.rb George Moschovitis **20051107164251] [Removed app gen. George Moschovitis **20051107163814] [Small fix in the form generator. Bryan Soto **20051107132706] [Added skin template in proto. George Moschovitis **20051107132542] [Access the controller from context. George Moschovitis **20051107132447] [Removed app gen. George Moschovitis **20051107163234] [More fixes in morphing. George Moschovitis **20051107112633] [Fixed morphing compiler for nested elements. Guillaume Pierronnet **20051107111606] [A helper to sync with nitro-repository at rubyforge.org George Moschovitis **20051105101518] [Added some simple security support in the AdminController. George Moschovitis **20051105100048] [Updated Flare docs. George Moschovitis **20051105095822] [Fixed validate_unique. Bryan Soto**20051105082657] [Default name for sqlite stores. George Moschovitis **20051104140149] [Small fixes in the SCGI adapter. Guillaume Pierronnet **20051104135710] [Minor change. George Moschovitis **20051104125136] [Commented out the list_tables stuff in manager. George Moschovitis **20051104120604] [Added comment tha points to og/validation. George Moschovitis **20051104120517] [STI Fixes rob at motionpath.com**20051104112824 options[:type] is not always set for example when doing Class.first so I have patched the SQL adapter to do another check so that ogtype is always checked when it's supposed to (another example being Class[oid]). SuperClass[oid] will now return a result of type child class if the oid is actually an STI child of SuperClass. ] [Join table fixes rob at motionpath.com**20051103171658 This patch causes the PostgreSQL adapter to create proper database driven foreign key constraints on join table fields causing changes to the oid number or deletes to be fully replicated to all appropriate placess. The implementation is a little slow on startup but I could not think of a cleaner way to do it without violating the paradigm that og stores should be essentially independent. It also does a final sweep within the sql adapter for other databases to kick out any joins still left lying around (happened to me with self join cases). Please feel free to improve this if you can. The PGConn adapter now provides you with all the information you need. ] [Aggregate function fixed to take STI into account rob at motionpath.com**20051103134300] [Table destruction for PostgreSQL rob at motionpath.com**20051103111540 Added the following flag to Og.setup: => :destroy_tables - If set to true will drop all the tables in a database on startup. This is preferred to dropping the whole database with a system command for many reasons, including using only PostgreSQL commands, working over remote connections and not requiring interactive input. The main :destroy function was not modified incase some people may prefer the old mechanics and also because the function is not wholly identical (but should be in practice); there is no equivilent :create by nature. ] [Schema Evolution for PostgreSQL patch rob at motionpath.com**20051103102443 Added Og database setup options: => :evolve_schema - When set to true, automatically adds new fields to db tables. => :evolve_schema_cautions - When set to false causes fields that are no longer in use to be droped from db tables. => :evolve_schema_purge_tables - When set to true causes tables not managed by og (probably obsolete) to be dropped from the database. All evolve schema options also require evolve_schema to be set. Will inform you with info level log output if these activities would be performed but are not enabled allowing you to make the required changes manually. Also modified PostgreSQL adapter and changed PostgreSQL store to properly check if tables exist first rather than trying to create them and catching table-exists errors. ] [:join_tables array annotation was getting reset everytime a join table was added to the list. chrisfarms at gmail.com**20051103000320] [Improvements to __force_ functions, including hashed date support (like the Hashed Time support)... removed the now obsolete __force_hash_ function. chrisfarms at gmail.com**20051102140707] [Dont unessacellarly save entities when adding them to a joins_many collection. (previously quite a large performance hit) chrisfarms at gmail.com**20051101235112] [None of the Og::Taggable time fields should be displayed in scaffold. chrisfarms at gmail.com**20051101234751] [FIX: dateselect was displaying incorrect values chrisfarms at gmail.com**20051101234709] [FIXED: user_agent is different on WEBrick / Apache ... patch takes this into account using request.user_agent method. chrisfarms at gmail.com**20051101234431] [Marked a useless line of code for removal chrisfarms at gmail.com**20051101230925] [Brought back proto directory (was bad idea). George Moschovitis **20051103145613] [Added support for named elements, fixed nasty element hierarchy bug. George Moschovitis **20051103144714] [Small fix in Gen. George Moschovitis **20051103144705] [Convert to ann.self (from ann.this). George Moschovitis **20051102160312] [More fixes to get some examples to run. George Moschovitis **20051101172431] [More conversions to the updated helper system. George Moschovitis **20051101171815] [Added og/markers and glue/markup. George Moschovitis **20051101171016] [Added Expirable. George Moschovitis **20051101170959] [Huge refactoring, converted nitro mixins to helpers, use the new helper keyword, use is XXX to include modules, moved Og mixins to the Glue namespace for better looking source code, markup moved to glue and more. George Moschovitis **20051101170735] [Removed some obsolete files. George Moschovitis **20051101130735] [Added missing og vendor dir to the repo. George Moschovitis **20051101105010] [Small source updates. George Moschovitis **20051101103341] [Reverted to the old taggable. George Moschovitis **20051101102423] [Refacotred Entity, Relation and mixins. Thomas Sawyer **20051101094049] [Moved more proto files in the base nitro dir. George Moschovitis **20051029100421] [Removed proto, moved its subdirs in the base nitro dir. George Moschovitis **20051029100332] [Small fix in Cgi adapter. [fbach] George Moschovitis **20051029095348] [Small fixes before release. George Moschovitis **20051029095310] [Updated build script. George Moschovitis **20051027194145] [Require latest facets. George Moschovitis **20051027193601] [Cleaned up source code removed windows EOL. George Moschovitis **20051027192006] [Added some js files in the repo. George Moschovitis **20051027183755] [Added latest version of Prototype/Scriptaculous 1.4.rc_0 George Moschovitis **20051027183631] [Added Flare and Sparcs in the public repository. George Moschovitis **20051027120603] [Updated Reap files, fixed property bug. George Moschovitis **20051027111021] [Small fixes in scaffold. George Moschovitis **20051027104105] [Readded morphing compiler. George Moschovitis **20051027102150] [Added file session support. Guillaume Pierronnet **20051027102104] [Fixes in scaffold, form, admin. Chris Farmiloe **20051027101932] [Streaming support fix. Guillaume Pierronnet **20051027101018] [Fixes in form mixin, scaffold, sti, psql adapter and properties. Chris Farmiloe **20051024093840] [FCGI compatible query_string calculation. George Moschovitis **20051021103109] [Small fixes to make spark run with fcgi. George Moschovitis **20051021093752] [Readded scgi in the repo. George Moschovitis **20051020160543] [Many fixes to the scaffolding code. Chris Farmiloe **20051020145703] [Updated AUTHORS. George Moschovitis **20051020132556] [Added needed require. [rob] George Moschovitis **20051020132326] [Fix in scgi adapter. George Moschovitis **20051020132308] [Updated scgi adapter. George Moschovitis **20051020122749] [Updated Changelog. George Moschovitis **20051020112040] [Imported all files in the new repo. George Moschovitis **20051020110807] Patch bundle hash: e29c1b5fee1d5ec76529bd0e37b761e909e50fb8 -------------- 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/20051124/4131b445/attachment.bin From itsme213 at hotmail.com Thu Nov 24 13:37:20 2005 From: itsme213 at hotmail.com (itsme213) Date: Thu, 24 Nov 2005 12:37:20 -0600 Subject: [Nitro] Rdoc References: Message-ID: Thanks. I tried rake doc that for both nitro and og, it returned almost instantly with no error, and the docs don't show up in the gems rdoc server. btw: Most of my other gems install their rdocs automatically. Perhaps it is better to do it that way? ----- Original Message ----- From: "George Moschovitis" To: "General discussion about Nitro" Sent: Thursday, November 24, 2005 10:53 AM Subject: Re: [Nitro] Rdoc > rake doc > > > On 11/24/05, itsme213 wrote: >> Does nitro 0.25 come with rdoc? If so, is there some extra gem command >> (other than the "gem install") that I need to install the docs? I >> currently >> don't get any rdocs for nitro or og. >> >> Thanks! >> _______________________________________________ >> 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 > From mneumann at ntecs.de Thu Nov 24 14:03:32 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Thu, 24 Nov 2005 20:03:32 +0100 Subject: [Nitro] Seaside style call/answer mechanism In-Reply-To: References: <169D2403-0E2D-49EB-9D23-E1B02FBE51BD@ntecs.de> Message-ID: <33352EDD-87A2-43CB-BF02-22E1AD373153@ntecs.de> Am 24.11.2005 um 19:21 schrieb George Moschovitis: >> In Seaside/Wee the whole thing is implemented not by storing URLs, >> but actually the state of the component as of the time when you call >> #call. > > Can you please explain this in more detail here on the list? Wee/Seaside is stateful, i.e. components stay in memory in contrast to controllers in Nitro/Rails. Each user has it's own components tree (yep, components are composites and can form a tree). An action (e.g. clicking on a tag or posting a
) will change the state of the components. Each action will create a new "page". A page is simply a snapshot of the state of the components tree at some time and is associated with a unique ID. The URL will always contain the page-id of the current page. So theoretically you can say: "Show me the page as of two days ago". The conclusion of all this is, that you can uniquely identify pages (and as such actions, too). This makes it a lot easier. Regards, Michael From itsme213 at hotmail.com Thu Nov 24 17:53:43 2005 From: itsme213 at hotmail.com (itsme213) Date: Thu, 24 Nov 2005 16:53:43 -0600 Subject: [Nitro] help with og! Message-ID: aaargh! og looks very promising, but i am very frustrated at even getting started. ----------- require 'og' class A end class B has_many :as, A end #=> error: undefined method `has_many' for B:Class (NoMethodError) Process ruby exited with code 1 ----------- require 'og' class A end class B property :a, A has_many :as, A end #=> no error ----------- What on earth is going on? perhaps i am doing something very dumb, but have no idea where to look. maybe rdoc will help, but i can't even see or build any rdocs. help!! From itsme213 at hotmail.com Thu Nov 24 17:56:11 2005 From: itsme213 at hotmail.com (itsme213) Date: Thu, 24 Nov 2005 16:56:11 -0600 Subject: [Nitro] Og examples References: Message-ID: Thanks again Bryan. I have no idea what property :domain, [] means, and can't find any place to look. ----- Original Message ----- From: Bryan Soto To: General discussion about Nitro Sent: Thursday, November 24, 2005 12:18 AM Subject: Re: [Nitro] Og examples Here's a working version. Hopefully it's enough to give you a start. Passing [] as the type for :domain works for storing class A as it's done via YAML and should load correctly. I'm not sure why it's necessary though... ------------------------------------------ require 'og' class A; end class B property :domain, [] end Og.setup( :database => 'test', # :base_dir => 'other_directory_name', # In case you don't want kirbydb :store => :kirby ) r = B.new o = A.new r.domain = o puts r.domain r.save -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051124/0c6112e1/attachment.html From itsme213 at hotmail.com Thu Nov 24 18:08:36 2005 From: itsme213 at hotmail.com (itsme213) Date: Thu, 24 Nov 2005 17:08:36 -0600 Subject: [Nitro] nitrohq observation Message-ID: It seems like Alt-d is a keyboard shortcut for diff-mode in the wiki. It also happens to be the Firefox (and IE) shortcut to edit in the URL box ... From zimba.tm at gmail.com Thu Nov 24 18:13:45 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Fri, 25 Nov 2005 00:13:45 +0100 Subject: [Nitro] help with og! In-Reply-To: References: Message-ID: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> Hi, Og relies on the property method to "enchant" a class and store it. I guess there is another more elegant way to do it, but I don't know it. I help this will be a help for you to start. Example : ========= class A end class B property :name, String has_many :as, A end ========= This should work. On 24/11/05, itsme213 wrote: > aaargh! > > og looks very promising, but i am very frustrated at even getting started. > > > ----------- > require 'og' > > class A > end > > class B > has_many :as, A > end > > > #=> error: undefined method `has_many' for B:Class (NoMethodError) > Process ruby exited with code 1 > > ----------- > require 'og' > > class A > end > > class B > property :a, A > has_many :as, A > end > > > #=> no error > > ----------- > > What on earth is going on? > > perhaps i am doing something very dumb, but have no idea where to look. > > maybe rdoc will help, but i can't even see or build any rdocs. > > help!! > _______________________________________________ > 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 Thu Nov 24 18:15:46 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Fri, 25 Nov 2005 00:15:46 +0100 Subject: [Nitro] nitrohq observation In-Reply-To: References: Message-ID: <3ff63f9b0511241515s7d307adak@mail.gmail.com> In the meanwhile, use Ctrl-L with firefox On 25/11/05, itsme213 wrote: > It seems like Alt-d is a keyboard shortcut for diff-mode in the wiki. It > also happens to be the Firefox (and IE) shortcut to edit in the URL box ... > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- Cheers, zimba http://zimba.oree.ch From itsme213 at hotmail.com Thu Nov 24 20:03:03 2005 From: itsme213 at hotmail.com (itsme213) Date: Thu, 24 Nov 2005 19:03:03 -0600 Subject: [Nitro] help with og! References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> Message-ID: Thanks zimba! Ok, so I will mechanically add some "property" to any og-classes (at least until I figure out a better way :) Now having done: class A property :name, String end class B property :name, String has_many :as, A end I expected to see some instance methods for :as added to B. However (B.instance_methods - Object.instance_methods) does not show any of these. So then I figure, maybe these relation-things are store-specific. So I added the Og.setup(...) and viola ... instance methods. Next challenge ... I was hoping the kind of collection I got back from b.as (an Og::HasManyCollection) would allow me to do natural collection-like things: b.as.each {|a| puts a.name} But that outputs nothing. Not even a method_missing exception. Any ideas? ----- Original Message ----- From: "zimba-tm" To: "General discussion about Nitro" Sent: Thursday, November 24, 2005 5:13 PM Subject: Re: [Nitro] help with og! > Hi, > > Og relies on the property method to "enchant" a class and store it. I > guess there is another more elegant way to do it, but I don't know it. > I help this will be a help for you to start. > > Example : > ========= > class A > end > > class B > property :name, String > has_many :as, A > end > ========= > > This should work. > > On 24/11/05, itsme213 wrote: >> aaargh! >> >> og looks very promising, but i am very frustrated at even getting >> started. >> >> >> ----------- >> require 'og' >> >> class A >> end >> >> class B >> has_many :as, A >> end >> >> >> #=> error: undefined method `has_many' for B:Class (NoMethodError) >> Process ruby exited with code 1 >> >> ----------- >> require 'og' >> >> class A >> end >> >> class B >> property :a, A >> has_many :as, A >> end >> >> >> #=> no error >> >> ----------- >> >> What on earth is going on? >> >> perhaps i am doing something very dumb, but have no idea where to look. >> >> maybe rdoc will help, but i can't even see or build any rdocs. >> >> help!! From epiperak at softlab.ece.ntua.gr Thu Nov 24 21:31:39 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Fri, 25 Nov 2005 04:31:39 +0200 (EET) Subject: [Nitro] javascript and session In-Reply-To: References: <3ff63f9b0511220136x132bcb1by@mail.gmail.com> Message-ID: Hahaha... good points indeed... ;-) I will reconsider taking out the bastards...(the popups that is) but you know the feeling, when you have invested a lot of time in some part of the code, you just "can't let go"... :-| eerieS > Fight! > > > anything that makes the back-button in the browser not work as > expected = BAD > a lot of people use IE with the window maximized, a new window > in this situation can't be told apart from just navigating to a new page > and confuses the general public! > > popups I will honor: file/browser dialogs (as this is expected in the OS) > colour pickers, and other such tools (but really id implement these with > drag-able, HTML elements etc), and "enlarge your penis/viagra" adverts... no > site > is complete without them, in fact nitro should probably have a helper for > them :) > > > > Chris Farmiloe > Design & Development. > > Motionpath Digital Media Ltd. > St Georges road, Brighton, BN2 1ED. > Office: 01273 608708 | Mobile: 07791 179481 > > > > > On 24 Nov 2005, at 10:00, Emmanuel Piperakis wrote: > >>>> Also, popups look COOL, especially to people with small or none >>>> experience. >>> >>> I think popups in a webap are uncool! >>> >> and let the war begin! >> >>> -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} >> _______________________________________________ >> 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 james_b at neurogami.com Thu Nov 24 22:52:49 2005 From: james_b at neurogami.com (James Britt) Date: Thu, 24 Nov 2005 20:52:49 -0700 Subject: [Nitro] nitrohq observation In-Reply-To: References: Message-ID: <43868A91.8040904@neurogami.com> itsme213 wrote: > It seems like Alt-d is a keyboard shortcut for diff-mode in the wiki. It > also happens to be the Firefox (and IE) shortcut to edit in the URL box ... I pretty much loath access key shortcuts, as they often interfere with default browser behavior. I'd prefer to not have to deal with them (there are other ways to speed keyboard navigation). I tried a Greasemonkey script to block them in Firefox, but it was buggy and broke other pages. I've now just turned them off completely. 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 epiperak at softlab.ece.ntua.gr Fri Nov 25 02:46:00 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Fri, 25 Nov 2005 09:46:00 +0200 (EET) Subject: [Nitro] Date in Og Message-ID: Hi everybody, I just installed 0.25 (to test it on the app during the weekend) and to my surprise Date objects still cause problems! Any ideas? In my model I have class ForeignProject < Project property :invest_size, Fixnum property :invest_type, Fixnum property :acquisition_date, Date property :placement_date, Date property :sales_commission_per, Fixnum def initialize super @placement_date = Date.today @sales_commission_per = Date.today @invest_type = 0 end def calc(startd, endd, var, datas) sum = 0.0 datas.each {|l| sum += l.calc(startd, endd, var)} return sum end end In the controller project.assign_properties(request.params) Error Path: /project_save/foreign/new undefined method `to_date' for Sun Jan 01 00:00:00 JST 1995:Time Click here to reload. Click here to go to the referer or the home page. Stack Trace (eval):6:in `__force_placement_date' /usr/lib/ruby/gems/1.8/gems/glue-0.25.0/lib/glue/property.rb:81:in `populate_object' /usr/lib/ruby/gems/1.8/gems/glue-0.25.0/lib/glue/property.rb:59:in `populate_object' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:68:in `assign_properties' ./src/controller.rb:133:in `project_save' (eval):12:in `project_save_action' /usr/lib/ruby/gems/1.8/gems/nitro-0.25.0/lib/nitro/controller.rb:104:in `method_missing' /usr/lib/ruby/gems/1.8/gems/nitro-0.25.0/lib/nitro/render.rb:125:in `render' /usr/lib/ruby/gems/1.8/gems/nitro-0.25.0/lib/nitro/adapter/webrick.rb:143:in `do_POST' /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From zimba.tm at gmail.com Fri Nov 25 03:27:59 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Fri, 25 Nov 2005 09:27:59 +0100 Subject: [Nitro] Date in Og In-Reply-To: References: Message-ID: <3ff63f9b0511250027r1cfc63d1x@mail.gmail.com> Some times, Og don't enchant the classes. I don't know how to force it. It looks like your problem is happening because of that. to_date() is an Entity method (which gets included in your class when it's "enchanted") On 25/11/05, Emmanuel Piperakis wrote: > Hi everybody, > I just installed 0.25 (to test it on the app during the weekend) and to my > surprise Date objects still cause problems! > > Any ideas? > > In my model I have > class ForeignProject < Project > property :invest_size, Fixnum > property :invest_type, Fixnum > property :acquisition_date, Date > property :placement_date, Date > property :sales_commission_per, Fixnum > > def initialize > super > @placement_date = Date.today > @sales_commission_per = Date.today > @invest_type = 0 > end > > def calc(startd, endd, var, datas) > sum = 0.0 > datas.each {|l| sum += l.calc(startd, endd, var)} > return sum > end > > end > > > > In the controller > project.assign_properties(request.params) > > > Error > Path: /project_save/foreign/new > undefined method `to_date' for Sun Jan 01 00:00:00 JST 1995:Time > Click here to reload. > Click here to go to the referer or the home page. > Stack Trace > > (eval):6:in `__force_placement_date' > /usr/lib/ruby/gems/1.8/gems/glue-0.25.0/lib/glue/property.rb:81:in > `populate_object' > /usr/lib/ruby/gems/1.8/gems/glue-0.25.0/lib/glue/property.rb:59:in > `populate_object' > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:68:in > `assign_properties' > ./src/controller.rb:133:in `project_save' > (eval):12:in `project_save_action' > /usr/lib/ruby/gems/1.8/gems/nitro-0.25.0/lib/nitro/controller.rb:104:in > `method_missing' > /usr/lib/ruby/gems/1.8/gems/nitro-0.25.0/lib/nitro/render.rb:125:in > `render' > /usr/lib/ruby/gems/1.8/gems/nitro-0.25.0/lib/nitro/adapter/webrick.rb:143:in > `do_POST' > /usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service' > /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' > > 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 > -- Cheers, zimba http://zimba.oree.ch From george.moschovitis at gmail.com Fri Nov 25 03:45:54 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 25 Nov 2005 10:45:54 +0200 Subject: [Nitro] Rdoc In-Reply-To: References: Message-ID: > I tried > rake doc hmm the command is rake rdoc, but somehow this seems broken with my version of Rake... > btw: Most of my other gems install their rdocs automatically. Perhaps it is > better to do it that way? This again has to do with my broken rake, I had to swtich to REAP to prepare the gems. However, Trans explained me how to autogenerate rdoc on reap generated gems, so this will be available again in the next version. -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Fri Nov 25 03:47:59 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 25 Nov 2005 10:47:59 +0200 Subject: [Nitro] help with og! In-Reply-To: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> Message-ID: > Og relies on the property method to "enchant" a class and store it. I > guess there is another more elegant way to do it, but I don't know it. > I help this will be a help for you to start. a more elegant way: class MyClass < Og::Entity ... end or class MyClass include Og::EntityMixin ... end if you have at least one property, there is nothing to add... -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Fri Nov 25 03:49:45 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 25 Nov 2005 10:49:45 +0200 Subject: [Nitro] Date in Og In-Reply-To: <3ff63f9b0511250027r1cfc63d1x@mail.gmail.com> References: <3ff63f9b0511250027r1cfc63d1x@mail.gmail.com> Message-ID: > Some times, Og don't enchant the classes. I don't know how to force yesterday Bryan commited a fix that probably helps here... -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From zimba.tm at gmail.com Fri Nov 25 03:57:45 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Fri, 25 Nov 2005 09:57:45 +0100 Subject: [Nitro] help with og! In-Reply-To: References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> Message-ID: <3ff63f9b0511250057j17197f5n@mail.gmail.com> Hi George, doesn't this break the idea that the classes are implementation independent ? Is it possible to tell Og to enchant all classes of a module ? On 25/11/05, George Moschovitis wrote: > > Og relies on the property method to "enchant" a class and store it. I > > guess there is another more elegant way to do it, but I don't know it. > > I help this will be a help for you to start. > > > a more elegant way: > > class MyClass < Og::Entity > ... > end > > or > > class MyClass > include Og::EntityMixin > ... > end > > if you have at least one property, there is nothing to add... > > -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 george.moschovitis at gmail.com Fri Nov 25 04:01:29 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 25 Nov 2005 11:01:29 +0200 Subject: [Nitro] help with og! In-Reply-To: <3ff63f9b0511250057j17197f5n@mail.gmail.com> References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> <3ff63f9b0511250057j17197f5n@mail.gmail.com> Message-ID: > doesn't this break the idea that the classes are implementation independent ? yeah, that's why I dont use it ;-) > Is it possible to tell Og to enchant all classes of a module ? Everything is possible with Ruby. module MyMarker def included(base) base.module_eval do base.send :include, .... ... end end end -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From dirk.barnikel at gmx.de Fri Nov 25 06:29:45 2005 From: dirk.barnikel at gmx.de (dirk) Date: Fri, 25 Nov 2005 12:29:45 +0100 Subject: [Nitro] Og::Revisable implementation Message-ID: <200511251229.45120.dirk.barnikel@gmx.de> Hi folks, in the attachment you'll find a implementation of Og::Revisable. I'am using nitro-0.23 in my application, so the move to the glue-namespace has not been made yet. It is designed like George's code in Spark and should be easy to integrate, since the interface is nearly the same. When I find some time, more general-purpose parts of my application will be contributed. Regards, Dirk PS. Sorry for the poor documentation and many thanks to the devs for nitro. I do like it very much :-) -------------- next part -------------- A non-text attachment was scrubbed... Name: revisable.rb Type: application/x-ruby Size: 5080 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051125/dc50af6d/attachment.bin From george.moschovitis at gmail.com Fri Nov 25 05:23:14 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 25 Nov 2005 12:23:14 +0200 Subject: [Nitro] Og::Revisable implementation In-Reply-To: <200511251229.45120.dirk.barnikel@gmx.de> References: <200511251229.45120.dirk.barnikel@gmx.de> Message-ID: Hello dirk, thanks for the patch. Moreover I would like to hear a word or two, how you are using Nitro. Manv,Zimb, perhaps you oculd create a page where devs can describe how they are using nitro in the real world? -g. On 11/25/05, dirk wrote: > Hi folks, > > in the attachment you'll find a implementation of Og::Revisable. > I'am using nitro-0.23 in my application, so the move to the > glue-namespace has not been made yet. > > It is designed like George's code in Spark and should be > easy to integrate, since the interface is nearly the same. > > When I find some time, more general-purpose parts of my > application will be contributed. > > Regards, > Dirk > > PS. Sorry for the poor documentation and many thanks to the devs > for nitro. I do like it very much :-) > > > _______________________________________________ > 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 Fri Nov 25 07:23:46 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Fri, 25 Nov 2005 13:23:46 +0100 Subject: [Nitro] Og::Revisable implementation In-Reply-To: References: <200511251229.45120.dirk.barnikel@gmx.de> Message-ID: <3ff63f9b0511250423q1b1153fcu@mail.gmail.com> Re George, I think each user should put this kind of info in it's own wiki page. Then we can create a developper page refferencing to them. Actually it's unfortunately not possible due to a wiki bug. {{~username}} doesn't render well. I believe the ~ character is mapped to something else. On 25/11/05, George Moschovitis wrote: > Hello dirk, thanks for the patch. Moreover I would like to hear a word > or two, how you are using Nitro. Manv,Zimb, perhaps you oculd create a > page where devs can describe how they are using nitro in the real > world? > > -g. > > > On 11/25/05, dirk wrote: > > Hi folks, > > > > in the attachment you'll find a implementation of Og::Revisable. > > I'am using nitro-0.23 in my application, so the move to the > > glue-namespace has not been made yet. > > > > It is designed like George's code in Spark and should be > > easy to integrate, since the interface is nearly the same. > > > > When I find some time, more general-purpose parts of my > > application will be contributed. > > > > Regards, > > Dirk > > > > PS. Sorry for the poor documentation and many thanks to the devs > > for nitro. I do like it very much :-) > > > > > > _______________________________________________ > > 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 george.moschovitis at gmail.com Fri Nov 25 07:25:52 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 25 Nov 2005 14:25:52 +0200 Subject: [Nitro] Bad patch bundle Message-ID: Hmm, I got the error: Bad patch bundle from Michael's and Aleksi's patches. Anyone has any ideas what is causing this? -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Fri Nov 25 07:26:37 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 25 Nov 2005 14:26:37 +0200 Subject: [Nitro] Og::Revisable implementation In-Reply-To: <3ff63f9b0511250423q1b1153fcu@mail.gmail.com> References: <200511251229.45120.dirk.barnikel@gmx.de> <3ff63f9b0511250423q1b1153fcu@mail.gmail.com> Message-ID: > Actually it's unfortunately not possible due to a wiki bug. > {{~username}} doesn't render well. I believe the ~ character is mapped > to something else. How about sending a nice patch for this? ;-) -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From rob at motionpath.com Fri Nov 25 07:49:10 2005 From: rob at motionpath.com (Rob Pitt) Date: Fri, 25 Nov 2005 12:49:10 +0000 Subject: [Nitro] [Nitro-repository] Patch applied (Aspects patch - low priority) In-Reply-To: <20051124112901.2FE428F439A@taurus.navel.gr> References: <20051124112901.2FE428F439A@taurus.navel.gr> Message-ID: <43870846.8040907@motionpath.com> Hi, I'm sure this is a minor thing as I expect I'm the only one doing anything like this but before Aspects was broken I used to be able to do: module Og # Extend the Nitro Entity to include checking for crap from # word documents that browsers have trouble displaying # -- required as many users cut and paste from word documents -- module EntityMixin def self.included(obj) obj.module_eval 'before "og_kill_word", :on => :og_update' obj.module_eval 'before "og_kill_word", :on => :og_insert' super end ... end I can no longer do this and have to include an extra line: obj.module_eval 'include Aspects' I have no idea why Aspects broke since when it broke I just added an include line to my models, but perhaps whatever method it used to load Aspects with was better? gm at navel.gr wrote: >We have the following extra patches: >Will apply the following patches: >Thu Nov 24 11:30:26 EET 2005 George Moschovitis > * Fixed aspects not included bug. [manveru, bryan] >Thu Nov 24 13:07:28 EET 2005 George Moschovitis > * Added small pager helper method. >diffing dir... >Applying patches to the local directories... >diffing dir... >Finished applying... >_______________________________________________ >Nitro-repository mailing list >Nitro-repository at rubyforge.org >http://rubyforge.org/mailman/listinfo/nitro-repository > > From rob at motionpath.com Fri Nov 25 08:33:58 2005 From: rob at motionpath.com (Rob Pitt) Date: Fri, 25 Nov 2005 13:33:58 +0000 Subject: [Nitro] WARNING: Aspects patch may be broken somehow (much more important) Message-ID: <438712C6.3030103@motionpath.com> After we pulled this patch today Aspects have stopped working on some models without giving any errors. This includes if we have "Include Aspects" in our models. Before this patch it worked fine. This has caused us to lose several hours data. Please be careful with this patch. From rob at motionpath.com Fri Nov 25 08:39:55 2005 From: rob at motionpath.com (Rob Pitt) Date: Fri, 25 Nov 2005 13:39:55 +0000 Subject: [Nitro] WARNING: ASPECTS PATCH IS BROKEN DO NOT USE IT In-Reply-To: <438712C6.3030103@motionpath.com> References: <438712C6.3030103@motionpath.com> Message-ID: <4387142B.9080404@motionpath.com> I would just like to verify after reversing this patch our Aspects work again (although require including in models). This has corrupted the database on one of our projects we needed for today. I suggest this patch is removed from Nitro. Rob Pitt wrote: >After we pulled this patch today Aspects have stopped working on some >models without giving any errors. This includes if we have "Include >Aspects" in our models. Before this patch it worked fine. This has >caused us to lose several hours data. Please be careful with this patch. >_______________________________________________ >Nitro-general mailing list >Nitro-general at rubyforge.org >http://rubyforge.org/mailman/listinfo/nitro-general > > From m.fellinger at gmail.com Fri Nov 25 08:41:24 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Fri, 25 Nov 2005 14:41:24 +0100 Subject: [Nitro] WARNING: Aspects patch may be broken somehow (much more important) In-Reply-To: <438712C6.3030103@motionpath.com> References: <438712C6.3030103@motionpath.com> Message-ID: <200511251441.29019.m.fellinger@gmail.com> hehe, most people that care about that are still on 0.25 (and patch selective fitting to their needs) just wanted to say that i find it funny that data is measured in hours... (ok, this is a completly sensefree post - ignore me) Am Freitag 25 November 2005 14:33 schrieb Rob Pitt: > After we pulled this patch today Aspects have stopped working on some > models without giving any errors. This includes if we have "Include > Aspects" in our models. Before this patch it worked fine. This has > caused us to lose several hours data. Please be careful with this patch. > _______________________________________________ > 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/20051125/96e4eae4/attachment.bin From rob at motionpath.com Fri Nov 25 08:44:33 2005 From: rob at motionpath.com (Rob Pitt) Date: Fri, 25 Nov 2005 13:44:33 +0000 Subject: [Nitro] WARNING: Aspects patch may be broken somehow (much more important) In-Reply-To: <200511251441.29019.m.fellinger@gmail.com> References: <438712C6.3030103@motionpath.com> <200511251441.29019.m.fellinger@gmail.com> Message-ID: <43871541.3050003@motionpath.com> "No point." Michael Fellinger wrote: >hehe, most people that care about that are still on 0.25 (and patch selective >fitting to their needs) > >just wanted to say that i find it funny that data is measured in hours... (ok, >this is a completly sensefree post - ignore me) > >Am Freitag 25 November 2005 14:33 schrieb Rob Pitt: > > >>After we pulled this patch today Aspects have stopped working on some >>models without giving any errors. This includes if we have "Include >>Aspects" in our models. Before this patch it worked fine. This has >>caused us to lose several hours data. Please be careful with this patch. >>_______________________________________________ >>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 Fri Nov 25 08:45:24 2005 From: rob at motionpath.com (Rob Pitt) Date: Fri, 25 Nov 2005 13:45:24 +0000 Subject: [Nitro] WARNING: ASPECTS PATCH IS BROKEN DO NOT USE IT In-Reply-To: <4387142B.9080404@motionpath.com> References: <438712C6.3030103@motionpath.com> <4387142B.9080404@motionpath.com> Message-ID: <43871574.5020406@motionpath.com> We have taken a quick look at the Aspects patch, I have a hunch that perhaps this problem is related to STI? Rob Pitt wrote: >I would just like to verify after reversing this patch our Aspects work >again (although require including in models). > >This has corrupted the database on one of our projects we needed for >today. I suggest this patch is removed from Nitro. > >Rob Pitt wrote: > > > >>After we pulled this patch today Aspects have stopped working on some >>models without giving any errors. This includes if we have "Include >>Aspects" in our models. Before this patch it worked fine. This has >>caused us to lose several hours data. Please be careful with this patch. >>_______________________________________________ >>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 m.fellinger at gmail.com Fri Nov 25 08:51:14 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Fri, 25 Nov 2005 14:51:14 +0100 Subject: [Nitro] WARNING: Aspects patch may be broken somehow (much more important) In-Reply-To: <43871541.3050003@motionpath.com> References: <438712C6.3030103@motionpath.com> <200511251441.29019.m.fellinger@gmail.com> <43871541.3050003@motionpath.com> Message-ID: <200511251451.17909.m.fellinger@gmail.com> Sorry, for that post - didn't know that it really affected you that bad... but that brings me to an idea, how would it be if you could say og "take DB "x", copy it to a tmp-db "y" and use this one for working. Would be perfect to test different models especially in later phases. How hard could this turn out? Am Freitag 25 November 2005 14:44 schrieb Rob Pitt: > "No point." > > Michael Fellinger wrote: > >hehe, most people that care about that are still on 0.25 (and patch > > selective fitting to their needs) > > > >just wanted to say that i find it funny that data is measured in hours... > > (ok, this is a completly sensefree post - ignore me) > > > >Am Freitag 25 November 2005 14:33 schrieb Rob Pitt: > >>After we pulled this patch today Aspects have stopped working on some > >>models without giving any errors. This includes if we have "Include > >>Aspects" in our models. Before this patch it worked fine. This has > >>caused us to lose several hours data. Please be careful with this patch. > >>_______________________________________________ > >>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 -------------- 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/20051125/e677ad18/attachment.bin From rob at motionpath.com Fri Nov 25 09:01:36 2005 From: rob at motionpath.com (Rob Pitt) Date: Fri, 25 Nov 2005 14:01:36 +0000 Subject: [Nitro] WARNING: Aspects patch may be broken somehow (much more important) In-Reply-To: <200511251451.17909.m.fellinger@gmail.com> References: <438712C6.3030103@motionpath.com> <200511251441.29019.m.fellinger@gmail.com> <43871541.3050003@motionpath.com> <200511251451.17909.m.fellinger@gmail.com> Message-ID: <43871940.4020703@motionpath.com> The patch seemed harmless that is why I warned people. Your database idea would be unworkable for this stage of development. We obviously keep three seperate database stages just like everyone else. Michael Fellinger wrote: >Sorry, for that post - didn't know that it really affected you that bad... > >but that brings me to an idea, how would it be if you could say og "take DB >"x", copy it to a tmp-db "y" and use this one for working. >Would be perfect to test different models especially in later phases. > >How hard could this turn out? > >Am Freitag 25 November 2005 14:44 schrieb Rob Pitt: > > >>"No point." >> >>Michael Fellinger wrote: >> >> >>>hehe, most people that care about that are still on 0.25 (and patch >>>selective fitting to their needs) >>> >>>just wanted to say that i find it funny that data is measured in hours... >>>(ok, this is a completly sensefree post - ignore me) >>> >>>Am Freitag 25 November 2005 14:33 schrieb Rob Pitt: >>> >>> >>>>After we pulled this patch today Aspects have stopped working on some >>>>models without giving any errors. This includes if we have "Include >>>>Aspects" in our models. Before this patch it worked fine. This has >>>>caused us to lose several hours data. Please be careful with this patch. >>>>_______________________________________________ >>>>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 >> >> >>------------------------------------------------------------------------ >> >>_______________________________________________ >>Nitro-general mailing list >>Nitro-general at rubyforge.org >>http://rubyforge.org/mailman/listinfo/nitro-general >> >> From george.moschovitis at gmail.com Fri Nov 25 09:31:56 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 25 Nov 2005 16:31:56 +0200 Subject: [Nitro] WARNING: Aspects patch may be broken somehow (much more important) In-Reply-To: <43871940.4020703@motionpath.com> References: <438712C6.3030103@motionpath.com> <200511251441.29019.m.fellinger@gmail.com> <43871541.3050003@motionpath.com> <200511251451.17909.m.fellinger@gmail.com> <43871940.4020703@motionpath.com> Message-ID: Ok Rob, I will remove this... I have faced multiple problems with patches lately... I 'll review them more carefully... -g. On 11/25/05, Rob Pitt wrote: > The patch seemed harmless that is why I warned people. Your database > idea would be unworkable for this stage of development. We obviously > keep three seperate database stages just like everyone else. > > Michael Fellinger wrote: > > >Sorry, for that post - didn't know that it really affected you that bad... > > > >but that brings me to an idea, how would it be if you could say og "take DB > >"x", copy it to a tmp-db "y" and use this one for working. > >Would be perfect to test different models especially in later phases. > > > >How hard could this turn out? > > > >Am Freitag 25 November 2005 14:44 schrieb Rob Pitt: > > > > > >>"No point." > >> > >>Michael Fellinger wrote: > >> > >> > >>>hehe, most people that care about that are still on 0.25 (and patch > >>>selective fitting to their needs) > >>> > >>>just wanted to say that i find it funny that data is measured in hours... > >>>(ok, this is a completly sensefree post - ignore me) > >>> > >>>Am Freitag 25 November 2005 14:33 schrieb Rob Pitt: > >>> > >>> > >>>>After we pulled this patch today Aspects have stopped working on some > >>>>models without giving any errors. This includes if we have "Include > >>>>Aspects" in our models. Before this patch it worked fine. This has > >>>>caused us to lose several hours data. Please be careful with this patch. > >>>>_______________________________________________ > >>>>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 > >> > >> > >>------------------------------------------------------------------------ > >> > >>_______________________________________________ > >>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 transfire at gmail.com Fri Nov 25 10:32:51 2005 From: transfire at gmail.com (TRANS) Date: Fri, 25 Nov 2005 10:32:51 -0500 Subject: [Nitro] Date in Og In-Reply-To: References: <3ff63f9b0511250027r1cfc63d1x@mail.gmail.com> Message-ID: <4b6f054f0511250732h6fbeec09i498aa6697926fe1f@mail.gmail.com> On 11/25/05, George Moschovitis wrote: > > Some times, Og don't enchant the classes. I don't know how to force I'd rather enchant them myself. T. From george.moschovitis at gmail.com Fri Nov 25 11:31:11 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Fri, 25 Nov 2005 18:31:11 +0200 Subject: [Nitro] Og::Revisable implementation In-Reply-To: <200511251229.45120.dirk.barnikel@gmx.de> References: <200511251229.45120.dirk.barnikel@gmx.de> Message-ID: Hello Dirk, > in the attachment you'll find a implementation of Og::Revisable. thanks for the patch, but while reviewing this for inclusion, I decided to recode it ;-) I will commit my version for the others to investigate... I think it is better. My version does not allow to specify exact properties to keep as revised, but will probably add this later. regards, George. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From transfire at gmail.com Fri Nov 25 12:06:12 2005 From: transfire at gmail.com (TRANS) Date: Fri, 25 Nov 2005 12:06:12 -0500 Subject: [Nitro] help with og! In-Reply-To: References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> <3ff63f9b0511250057j17197f5n@mail.gmail.com> Message-ID: <4b6f054f0511250906oa84b154rd06c01e96d2fc0bf@mail.gmail.com> > doesn't this break the idea that the classes are implementation independent ? But you still have to use the #property method anyway, so no matter how you slice it, it's implementation dependent. T. From Aleksi.Niemela at cs.helsinki.fi Fri Nov 25 14:44:32 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Fri, 25 Nov 2005 21:44:32 +0200 Subject: [Nitro] Bad patch bundle In-Reply-To: References: Message-ID: <438769A0.8020803@cs.helsinki.fi> George Moschovitis wrote: >Hmm, I got the error: > >Bad patch bundle from Michael's and Aleksi's patches. Anyone has any >ideas what is causing this? > > We might be experiencing Darcs and Windows systems (cygwin on my part) behind-the-curtains change of LF to CR+LF. Like this guy (with some explanation and design changes considerations down the thread). http://www.abridgegame.org/pipermail/darcs-users/2005-November/008660.html There's specificly mentioned the case when things moved through mail get hash checksum but files on repo don't. Then repo could be updated consistently with the other combination of line feed and when mail patch comes, with correct checksum, it can't be applied. I have, however, no recommendations. Something could, or should, be done for cygwin environment we're (or I) am working. Perhaps new repo with stricter LF policy and checking needs to be set up. Perhaps something else. And yeah, the problem could be in cygwin, mailer, receiving mail agent, editors, or somewhere else. Anyway, you might be facing a situation where the repo needs to be set up again. Or then we just need to change something in workflow in our end. - Aleksi From m.fellinger at gmail.com Fri Nov 25 15:19:27 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Fri, 25 Nov 2005 21:19:27 +0100 Subject: [Nitro] Bad patch bundle In-Reply-To: <438769A0.8020803@cs.helsinki.fi> References: <438769A0.8020803@cs.helsinki.fi> Message-ID: <200511252119.33309.m.fellinger@gmail.com> Well, no windows on my part... and my patch wasn't that big that it could have been some complexity issues ;) so i have got no idea what could have gone wrong... anyway i would be happy to know a place to mail my patches to directly, as this (attach the bundle) is a bit redunant in my view (but might be better to stay in touch with the patches for most people) ah, yeah - attached to this, is yet another patch for flare, fixes yet another problem... this time the css in the skin (belongs to the .css) as well as hardcoded pagetitle and maybe some other stuff. Am Freitag 25 November 2005 20:44 schrieb Aleksi Niemela: > George Moschovitis wrote: > >Hmm, I got the error: > > > >Bad patch bundle from Michael's and Aleksi's patches. Anyone has any > >ideas what is causing this? > > We might be experiencing Darcs and Windows systems (cygwin on my part) > behind-the-curtains change of LF to CR+LF. Like this guy (with some > explanation and design changes considerations down the thread). > > > http://www.abridgegame.org/pipermail/darcs-users/2005-November/008660.html > > There's specificly mentioned the case when things moved through mail get > hash checksum but files on repo don't. Then repo could be updated > consistently with the other combination of line feed and when mail patch > comes, with correct checksum, it can't be applied. > > I have, however, no recommendations. Something could, or should, be done > for cygwin environment we're (or I) am working. Perhaps new repo with > stricter LF policy and checking needs to be set up. Perhaps something > else. And yeah, the problem could be in cygwin, mailer, receiving mail > agent, editors, or somewhere else. Anyway, you might be facing a > situation where the repo needs to be set up again. Or then we just need > to change something in workflow in our end. > > - Aleksi > > _______________________________________________ > 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/20051125/7f8b31fe/attachment.html -------------- 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/20051125/7f8b31fe/attachment.bin From dirk.barnikel at gmx.de Fri Nov 25 16:58:28 2005 From: dirk.barnikel at gmx.de (dirk) Date: Fri, 25 Nov 2005 22:58:28 +0100 Subject: [Nitro] Og::Revisable implementation In-Reply-To: References: <200511251229.45120.dirk.barnikel@gmx.de> Message-ID: <200511252258.28717.dirk.barnikel@gmx.de> Am Freitag, 25. November 2005 17:31 schrieb George Moschovitis: > thanks for the patch, but while reviewing this for inclusion, I > decided to recode it ;-) > I will commit my version for the others to investigate... I think it is > better. My version does not allow to specify exact properties to keep as > revised, but will probably add this later. no problem :-) i'am waiting to see you code. if you could tell me, _why_ you decided to recode it, maybe i can help? Regards, Dirk From itsme213 at hotmail.com Fri Nov 25 21:18:43 2005 From: itsme213 at hotmail.com (itsme213) Date: Fri, 25 Nov 2005 20:18:43 -0600 Subject: [Nitro] HasManyCollection#each References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> Message-ID: Given: class A property :name, String def initialize n @name = n end end class B property :name, String has_many :as, A end b = B.new b.add_a(A.new "a1") b.add_a(A.new "a2") B.new.as.each {|a| puts a.name} #=> I see nothing. Should I see a1, a2? From itsme213 at hotmail.com Fri Nov 25 21:20:28 2005 From: itsme213 at hotmail.com (itsme213) Date: Fri, 25 Nov 2005 20:20:28 -0600 Subject: [Nitro] HasManyCollection#each References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> Message-ID: I meant b.as.each {|a| puts a.name} not B.new.as.each ... ----- Original Message ----- From: "itsme213" To: "General discussion about Nitro" Sent: Friday, November 25, 2005 8:18 PM Subject: [Nitro] HasManyCollection#each > Given: > > class A > property :name, String > def initialize n > @name = n > end > end > > class B > property :name, String > has_many :as, A > end > > b = B.new > b.add_a(A.new "a1") > b.add_a(A.new "a2") > > B.new.as.each {|a| puts a.name} > > #=> I see nothing. Should I see a1, a2? > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From itsme213 at hotmail.com Fri Nov 25 21:24:22 2005 From: itsme213 at hotmail.com (itsme213) Date: Fri, 25 Nov 2005 20:24:22 -0600 Subject: [Nitro] Nitro, wee, seaside Message-ID: Seaside has liveAction: which does not generate a new page (i.e. no new component tree), but does some Ajax replacement instead. html liveAction: [:renderer | ....] Does wee support this? Does nitro (the "premium container for wee apps") support this? Thanks! From mneumann at ntecs.de Sat Nov 26 05:24:07 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Sat, 26 Nov 2005 11:24:07 +0100 Subject: [Nitro] Nitro, wee, seaside In-Reply-To: References: Message-ID: Am 26.11.2005 um 03:24 schrieb itsme213: > Seaside has liveAction: which does not generate a new page (i.e. no > new > component tree), but does some Ajax replacement instead. > > html > liveAction: [:renderer | ....] > > Does wee support this? Does nitro (the "premium container for wee > apps") > support this? Yes, live updates (aka AJAX) are supported. Example: def render r.anchor.id('tag').onclick_update('tag' , :update).with('Test') end def update send_render_response do r.text "Updated" end end See examples/ajax of Wee. Not sure if this worked under Nitro/Wee. Regards, Michael From m.fellinger at gmail.com Sun Nov 27 00:19:20 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sun, 27 Nov 2005 06:19:20 +0100 Subject: [Nitro] OgFile OgImage and my problems Message-ID: <200511270619.25096.m.fellinger@gmail.com> Hey List, Now i wanted to post a perfect and polished version of OgFile OgImage and Thumbnail, my latest generally useful og-objects... but somehow that didn't work out so well. I am stuck, right before i could add the last polishing because of something that must be quite obvious. I've just attached model and controller for now, i would be very glad if someone could help me - the problem is following: OgImage creates Thumbnails, but i cannot assign the thumbnails to the OgImage that calls them. I have tired various ways... OgImage[@oid].thumbnails << (thumb = Thumbnail.new) # => method_missing '<<' @thumbnails << ..... # => method_missing.... add_thumbnail(thumb) self.add_thumbnail(thumb) OgImage[@oid].add_thumbnail(thumb) # all of the three have no effect thumb.og_image_oid = @oid # => no error, nothing happens Thumbnail[thumb.oid].og_image_oid = @oid #=> same again Thumbnail.find_by_oid(thumb.oid).og_image_oid = @oid #=> nothing ever happens and about 20 other variants before of after the thumb.save! - what the heck am i doing wrong? i'm running out of ideas, and something seems to be flawed here... Everytime i check the database (using sqlite for testing), no og_image_oid is assigned, also i wonder why OgImage doesn't get a proper linkage to the thumbnails... it looks quite unaffected well, that's it, i appreciate every helping hand Michael 'manveru' Fellinger -------------- next part -------------- A non-text attachment was scrubbed... Name: controller.rb Type: application/x-ruby Size: 1840 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051127/066fd287/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: model.rb Type: application/x-ruby Size: 3010 bytes Desc: not available Url : http://rubyforge.org/pipermail/nitro-general/attachments/20051127/066fd287/attachment-0001.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/20051127/066fd287/attachment-0002.bin From m.fellinger at gmail.com Sun Nov 27 02:22:39 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Sun, 27 Nov 2005 08:22:39 +0100 Subject: [Nitro] OgFile OgImage and my problems In-Reply-To: <200511270619.25096.m.fellinger@gmail.com> References: <200511270619.25096.m.fellinger@gmail.com> Message-ID: <200511270822.43296.m.fellinger@gmail.com> Ok, i think i have solved that problem now by letting Og more room to play: instead of has_many :thumbnails Thumbnail has_many Thumbnail out of some reason og likes this notation better... however now i'm thinking how to make an elegant bridge over the fact that the callback of Thumbnail is made on Thumbnail.new - i fear that i have to do some ugly workaround (even the current way is not pretty) i'll post when i find out more Am Sonntag 27 November 2005 06:19 schrieb Michael Fellinger: > Hey List, > > Now i wanted to post a perfect and polished version of OgFile OgImage and > Thumbnail, my latest generally useful og-objects... but somehow that didn't > work out so well. > > I am stuck, right before i could add the last polishing because of > something that must be quite obvious. I've just attached model and > controller for now, i would be very glad if someone could help me - the > problem is following: > > OgImage creates Thumbnails, but i cannot assign the thumbnails to the > OgImage that calls them. > I have tired various ways... > OgImage[@oid].thumbnails << (thumb = Thumbnail.new) # => method_missing > '<<' @thumbnails << ..... # => method_missing.... > add_thumbnail(thumb) > self.add_thumbnail(thumb) > OgImage[@oid].add_thumbnail(thumb) # all of the three have no effect > thumb.og_image_oid = @oid # => no error, nothing happens > Thumbnail[thumb.oid].og_image_oid = @oid #=> same again > Thumbnail.find_by_oid(thumb.oid).og_image_oid = @oid #=> nothing ever > happens > > and about 20 other variants before of after the thumb.save! - what the heck > am i doing wrong? i'm running out of ideas, and something seems to be > flawed here... > Everytime i check the database (using sqlite for testing), no og_image_oid > is assigned, also i wonder why OgImage doesn't get a proper linkage to the > thumbnails... it looks quite unaffected > > well, that's it, i appreciate every helping hand > Michael 'manveru' Fellinger -------------- 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/20051127/97fecdd7/attachment.bin From george.moschovitis at gmail.com Sun Nov 27 05:40:43 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 27 Nov 2005 12:40:43 +0200 Subject: [Nitro] Og::Revisable implementation In-Reply-To: <200511252258.28717.dirk.barnikel@gmx.de> References: <200511251229.45120.dirk.barnikel@gmx.de> <200511252258.28717.dirk.barnikel@gmx.de> Message-ID: > no problem :-) i'am waiting to see you code. > if you could tell me, _why_ you decided to recode it, maybe i can help? I 've added this in the repository og/lib/glue/revisable.rb have a look :) -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Sun Nov 27 05:44:43 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 27 Nov 2005 12:44:43 +0200 Subject: [Nitro] Nitro, wee, seaside In-Reply-To: References: Message-ID: > Does wee support this? Does nitro (the "premium container for wee apps") > support this? Sure, have a look at examples/ajax. Small example: class MyController def my_action # convert the DOM element with id==live_link to an ajax request. live :live_link ... end end my_action.xhtml: ... .. ... For more Prototype, Scriptaculous wrappers, have a look at the Javscript helper. -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Sun Nov 27 05:47:03 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Sun, 27 Nov 2005 12:47:03 +0200 Subject: [Nitro] HasManyCollection#each In-Reply-To: References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> Message-ID: > > Given: > > > > class A > > property :name, String > > def initialize n > > @name = n > > end > > end > > > > class B > > property :name, String > > has_many :as, A > > end > > > > b = B.new > > b.add_a(A.new "a1") > > b.add_a(A.new "a2") Try: b.as << A.new('a1') btw has_many :as has_many A has_many :as, A are equivalent... have a look at the Og test cases for the latest Og api... -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From zimba.tm at gmail.com Sun Nov 27 05:51:33 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Sun, 27 Nov 2005 11:51:33 +0100 Subject: [Nitro] help with og! In-Reply-To: <4b6f054f0511250906oa84b154rd06c01e96d2fc0bf@mail.gmail.com> References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> <3ff63f9b0511250057j17197f5n@mail.gmail.com> <4b6f054f0511250906oa84b154rd06c01e96d2fc0bf@mail.gmail.com> Message-ID: <3ff63f9b0511270251v469462c5o@mail.gmail.com> And why can't we use attr ? On 25/11/05, TRANS wrote: > > doesn't this break the idea that the classes are implementation independent ? > > But you still have to use the #property method anyway, so no matter > how you slice it, it's implementation dependent. > > T. > > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > -- Cheers, zimba http://zimba.oree.ch From jeff.darklight at gmail.com Sun Nov 27 12:01:44 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Sun, 27 Nov 2005 09:01:44 -0800 Subject: [Nitro] MYSQL adapter ... Message-ID: George, I know that the Rails database layer (activerecord) includes a pure-ruby mysql client library ... same for Og ??? or is there an external dependency ? j. -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051127/f328d88b/attachment.html From zimba.tm at gmail.com Sun Nov 27 13:02:53 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Sun, 27 Nov 2005 19:02:53 +0100 Subject: [Nitro] MYSQL adapter ... In-Reply-To: References: Message-ID: <3ff63f9b0511271002r678b2662h@mail.gmail.com> Hi, Nitro has a pure-mysql client library integrated in Og. It will use the native mysql client if it's installed. On 27/11/05, Jeff Wood wrote: > George, > > I know that the Rails database layer (activerecord) includes a pure-ruby > mysql client library ... same for Og ??? or is there an external dependency > ? > > j. > > -- > "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 From itsme213 at hotmail.com Sun Nov 27 13:15:34 2005 From: itsme213 at hotmail.com (itsme213) Date: Sun, 27 Nov 2005 12:15:34 -0600 Subject: [Nitro] HasManyCollection#each References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> Message-ID: I tried #<< to add objects to the relation. #each still does not work for me. Thanks. ----------------- require 'og' class A property :name, String belongs_to A def initialize(n) @name = n end end class B property :name, String has_many :posts, A end Og.setup( :store => :sqlite ) b = B.new a1 = A.new "a1" a2 = A.new "a2" b.posts << a1 b.posts << a2 b.save a1.save a2.save puts b.posts.count #=> 0 b.posts.each {|a| puts a.name} #=> nothing ----- Original Message ----- From: "George Moschovitis" To: "General discussion about Nitro" Sent: Sunday, November 27, 2005 4:47 AM Subject: Re: [Nitro] HasManyCollection#each >> > Given: >> > >> > class A >> > property :name, String >> > def initialize n >> > @name = n >> > end >> > end >> > >> > class B >> > property :name, String >> > has_many :as, A >> > end >> > >> > b = B.new >> > b.add_a(A.new "a1") >> > b.add_a(A.new "a2") > > Try: > > b.as << A.new('a1') > > btw > has_many :as > has_many A > has_many :as, A > > are equivalent... > > have a look at the Og test cases for the latest Og api... > > -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 > From jeff.darklight at gmail.com Sun Nov 27 13:21:25 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Sun, 27 Nov 2005 10:21:25 -0800 Subject: [Nitro] MYSQL adapter ... In-Reply-To: <3ff63f9b0511271002r678b2662h@mail.gmail.com> References: <3ff63f9b0511271002r678b2662h@mail.gmail.com> Message-ID: Thanks. On 11/27/05, zimba-tm wrote: > > Hi, > > Nitro has a pure-mysql client library integrated in Og. It will use > the native mysql client if it's installed. > > On 27/11/05, Jeff Wood wrote: > > George, > > > > I know that the Rails database layer (activerecord) includes a > pure-ruby > > mysql client library ... same for Og ??? or is there an external > dependency > > ? > > > > j. > > > > -- > > "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 > -- "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" Jeff Wood -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051127/10f216c8/attachment.html From dirk.barnikel at gmx.de Sun Nov 27 18:17:54 2005 From: dirk.barnikel at gmx.de (dirk) Date: Mon, 28 Nov 2005 00:17:54 +0100 Subject: [Nitro] Og::Revisable implementation In-Reply-To: References: <200511251229.45120.dirk.barnikel@gmx.de> <200511252258.28717.dirk.barnikel@gmx.de> Message-ID: <200511280017.54783.dirk.barnikel@gmx.de> Am Sonntag, 27. November 2005 11:40 schrieb George Moschovitis: > og/lib/glue/revisable.rb > have a look :) yep, it is better :) Thanks, Dirk From epiperak at softlab.ece.ntua.gr Sun Nov 27 23:04:20 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Mon, 28 Nov 2005 06:04:20 +0200 (EET) Subject: [Nitro] Schema Inheritance Message-ID: Hi, I have a small problem to report. class A property :koko, String end class AA < A property :haha, String end a = AA.new b = A[oid] #Fails undefined method `result' for # /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sql.rb:955:in `read_one' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sql.rb:426:in `find_one' /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:127:in `find_one' ./src/controller.rb:82:in `project_sel' (eval):12:in `project_sel_action' probably something to do with the following line in sql.rb Any ideas? ps. b = A.find(:condition => "oid =#{oid}")[0] works find... but...it is toooo long klass = Og::Entity::entity_from_string(res_row.result.flatten[res_row.fieldnum('ogtype')]) if klass.schema_inheritance? 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 Nov 27 23:41:03 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Mon, 28 Nov 2005 06:41:03 +0200 (EET) Subject: [Nitro] Schema Inheritance In-Reply-To: References: Message-ID: > I have a small problem to report. > class A > property :koko, String schema_inheritance #forgot this line > end > > class AA < A > property :haha, String > end > > a = AA.new > b = A[oid] #Fails > > undefined method `result' for # > > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sql.rb:955:in > `read_one' > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sql.rb:426:in > `find_one' > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:127:in `find_one' > ./src/controller.rb:82:in `project_sel' > (eval):12:in `project_sel_action' > > > probably something to do with the following line in sql.rb > Any ideas? > > ps. b = A.find(:condition => "oid =#{oid}")[0] > works find... but...it is toooo long > > klass = > Og::Entity::entity_from_string(res_row.result.flatten[res_row.fieldnum('ogtype')]) > if klass.schema_inheritance? > > 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 george.moschovitis at gmail.com Mon Nov 28 02:58:52 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 28 Nov 2005 09:58:52 +0200 Subject: [Nitro] Og::Revisable implementation In-Reply-To: <200511280017.54783.dirk.barnikel@gmx.de> References: <200511251229.45120.dirk.barnikel@gmx.de> <200511252258.28717.dirk.barnikel@gmx.de> <200511280017.54783.dirk.barnikel@gmx.de> Message-ID: > yep, it is better :) :) -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Mon Nov 28 03:01:19 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Mon, 28 Nov 2005 10:01:19 +0200 Subject: [Nitro] help with og! In-Reply-To: <3ff63f9b0511270251v469462c5o@mail.gmail.com> References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> <3ff63f9b0511250057j17197f5n@mail.gmail.com> <4b6f054f0511250906oa84b154rd06c01e96d2fc0bf@mail.gmail.com> <3ff63f9b0511270251v469462c5o@mail.gmail.com> Message-ID: I am still thinking if we should use attr instead of prop. -g. On 11/27/05, zimba-tm wrote: > And why can't we use attr ? > > On 25/11/05, TRANS wrote: > > > doesn't this break the idea that the classes are implementation independent ? > > > > But you still have to use the #property method anyway, so no matter > > how you slice it, it's implementation dependent. > > > > T. > > > > _______________________________________________ > > 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 > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From zimba.tm at gmail.com Mon Nov 28 07:48:43 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Mon, 28 Nov 2005 13:48:43 +0100 Subject: [Nitro] help with og! In-Reply-To: References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> <3ff63f9b0511250057j17197f5n@mail.gmail.com> <4b6f054f0511250906oa84b154rd06c01e96d2fc0bf@mail.gmail.com> <3ff63f9b0511270251v469462c5o@mail.gmail.com> Message-ID: <3ff63f9b0511280448p1a3fc14ds@mail.gmail.com> 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 ? On 28/11/05, George Moschovitis wrote: > I am still thinking if we should use attr instead of prop. > > -g. > > > On 11/27/05, zimba-tm wrote: > > And why can't we use attr ? > > > > On 25/11/05, TRANS wrote: > > > > doesn't this break the idea that the classes are implementation independent ? > > > > > > But you still have to use the #property method anyway, so no matter > > > how you slice it, it's implementation dependent. > > > > > > T. > > > > > > _______________________________________________ > > > 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 > > > > > -- > 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 itsme213 at hotmail.com Mon Nov 28 12:40:15 2005 From: itsme213 at hotmail.com (itsme213) Date: Mon, 28 Nov 2005 11:40:15 -0600 Subject: [Nitro] sqlite errors Message-ID: I get errors using sqlite with og 0.25. Am I doing something wrong? Thanks! --------------- require 'og' class A property :name, String def initialize(n) @name = n end end class B property :name, String has_many :posts, A end Og.setup( :store => :sqlite ) b = B.new a1 = A.new "a1" a2 = A.new "a2" b.posts << a1 b.posts << a2 b.posts.each {|a| puts a.name} b.save a1.save a2.save b.posts.each {|a| puts a.name} ------------------------- C:> a1 a2 I, [2005-11-28T11:27:10.419000 #2916] INFO -- : Created table 'ogb'. I, [2005-11-28T11:27:10.519000 #2916] INFO -- : Created table 'oga'. c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0-mswin32/lib/sqlite3/errors.rb:94:in `check': no such column: b_oid (SQLite3::SQLException) from c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0-mswin32/lib/sqlite3/statement.rb:70:in `initialize' from c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0-mswin32/lib/sqlite3/database.rb:183:in `new' from c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0-mswin32/lib/sqlite3/database.rb:183:in `prepare' from c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0-mswin32/lib/sqlite3/database.rb:274:in `query' from c:/ruby/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sqlite.rb:82:in `query' from c:/ruby/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sql.rb:416:in `find' from c:/ruby/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:121:in `find' from (eval):43:in `find_posts' from c:/ruby/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/collection.rb:73:in `send' from c:/ruby/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/collection.rb:73:in `load_members' from c:/ruby/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/collection.rb:104:in `each' from C:/og_each.rb:36 Process ruby exited with code 1 From itsme213 at hotmail.com Mon Nov 28 12:41:28 2005 From: itsme213 at hotmail.com (itsme213) Date: Mon, 28 Nov 2005 11:41:28 -0600 Subject: [Nitro] HasManyCollection#each References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> Message-ID: >> > b.add_a(A.new "a1") > Try: > > b.as << A.new('a1') How is b.add_a(a1) different from b.as << a1 I hate to be asking such basic questions, but not having a working rdoc (nitro 0.25) makes it quite hard to get started. Thanks. From Aleksi.Niemela at cs.helsinki.fi Mon Nov 28 12:58:17 2005 From: Aleksi.Niemela at cs.helsinki.fi (Aleksi Niemela) Date: Mon, 28 Nov 2005 19:58:17 +0200 Subject: [Nitro] HasManyCollection#each In-Reply-To: References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> Message-ID: <438B4539.2080201@cs.helsinki.fi> itsme213 wrote: >I tried #<< to add objects to the relation. > >#each still does not work for me. > >Thanks. > >----------------- >require 'og' >... > >puts b.posts.count #=> 0 > > >b.posts.each {|a| puts a.name} #=> nothing > > Here's some code that show you few key points leading to different behavior. Be sure to check out the contents of the DB afterwards. I had some point having 4 different cases in the code, but I forgot already what was so different between version 1 and 3. Maybe the result wasn't same from the DB point of view. Maybe something else. The code and the output I get from the code is at the end of the mail. > I hate to be asking such basic questions, but not having a working rdoc > (nitro 0.25) makes it quite hard to get started. Oh, and that rdoc thing. Dunno why George's advice didn't work for you, but this is what I do and works for me: cd og-0.25.0 rdoc -o rdoc - Aleksi require 'rubygems' require 'og' class A property :name, String belongs_to A def initialize(n) @name = n end end class B property :name, String has_many :posts, A end Og.setup( :address => "localhost", :destroy => false, :name => "testing", :store => "psql", :user => "...", :password => "....", :connection_count => 1 ) 4.times do |i| puts "Version #{i}" b = B.new b.name = "#{i}_foo" if i == 0 or i == 1 puts "Making new objects don't save them immediately" a1 = A.new "#{i}_a1" a2 = A.new "#{i}_a2" else puts "Calling create will instantiate like new also save them to the db" a1 = A.create "#{i}_a1" a2 = A.create "#{i}_a2" end if i == 0 or i == 2 puts "Saving b before adding posts, ie. b.oid has value and A objects will get value for b_oid" b.save end puts "b.oid = #{b.oid.inspect}" b.posts << a1 puts "a1.b_oid = #{a1.b_oid.inspect}" b.posts << a2 if i == 1 or i == 3 puts "By saving b after addings posts it will get oid, but a1.b_oid and a2.b_oid have" puts "already been set to original b.oid which has been nil." puts "In these cases object b.posts collection will know added objects a1 and a2 but" puts "if it's fetched again from database the collection won't know" puts "(as a1 and a2 objects in database have nils as a1.b_oid and a2.b_oid, thus they don't" puts "belong to any B object." b.save end puts "b.posts collection has #{b.posts.count} objects" b.posts.each {|a| puts a.name} #=> nothing b2 = B.find_by_name("#{i}_foo") puts "Freshly fetched b has #{b2.posts.count} objects associated to it in the db" b2.posts.each {|a| puts a.name} #=> nothing puts "\n\n" end ########### ########### $ ruby hasmanycollection_each.rb I, [2005-11-28T19:54:55.101125 #4040] INFO -- : Created table 'ogb'. I, [2005-11-28T19:54:55.301125 #4040] INFO -- : Created table 'oga'. Version 0 Making new objects don't save them immediately Saving b before adding posts, ie. b.oid has value and A objects will get value for b_oid b.oid = 1 a1.b_oid = 1 b.posts collection has 2 objects 0_a1 0_a2 Freshly fetched b has 2 objects associated to it in the db 0_a1 0_a2 Version 1 Making new objects don't save them immediately b.oid = nil a1.b_oid = nil By saving b after addings posts it will get oid, but a1.b_oid and a2.b_oid have already been set to original b.oid which has been nil. In these cases object b.posts collection will know added objects a1 and a2 but if it's fetched again from database the collection won't know (as a1 and a2 objects in database have nils as a1.b_oid and a2.b_oid, thus they don't belong to any B object. b.posts collection has 0 objects Freshly fetched b has 0 objects associated to it in the db Version 2 Calling create will instantiate like new also save them to the db Saving b before adding posts, ie. b.oid has value and A objects will get value for b_oid b.oid = 3 a1.b_oid = 3 b.posts collection has 2 objects 2_a1 2_a2 Freshly fetched b has 2 objects associated to it in the db 2_a1 2_a2 Version 3 Calling create will instantiate like new also save them to the db b.oid = nil a1.b_oid = nil By saving b after addings posts it will get oid, but a1.b_oid and a2.b_oid have already been set to original b.oid which has been nil. In these cases object b.posts collection will know added objects a1 and a2 but if it's fetched again from database the collection won't know (as a1 and a2 objects in database have nils as a1.b_oid and a2.b_oid, thus they don't belong to any B object. b.posts collection has 0 objects Freshly fetched b has 0 objects associated to it in the db From epiperak at softlab.ece.ntua.gr Mon Nov 28 20:35:22 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 29 Nov 2005 03:35:22 +0200 (EET) Subject: [Nitro] Schema Inheritance In-Reply-To: References: Message-ID: Nobody replied to this problem... Doesn't anyone use schema_inheritance? >> I have a small problem to report. >> class A >> property :koko, String >> schema_inheritance #forgot this line >> end >> >> class AA < A >> property :haha, String >> end >> >> a = AA.new >> b = A[oid] #Fails >> >> undefined method `result' for # >> >> /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sql.rb:955:in >> `read_one' >> /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sql.rb:426:in >> `find_one' >> /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:127:in `find_one' >> ./src/controller.rb:82:in `project_sel' >> (eval):12:in `project_sel_action' >> >> >> probably something to do with the following line in sql.rb >> Any ideas? >> >> ps. b = A.find(:condition => "oid =#{oid}")[0] >> works find... but...it is toooo long >> >> klass = >> Og::Entity::entity_from_string(res_row.result.flatten[res_row.fieldnum('ogtype')]) >> if klass.schema_inheritance? >> Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From Isaac at chiptech.co.nz Mon Nov 28 21:47:26 2005 From: Isaac at chiptech.co.nz (Isaac Devine) Date: Tue, 29 Nov 2005 15:47:26 +1300 Subject: [Nitro] OG automatically adding Foreign Key constraints Message-ID: <1133232446.6654.6.camel@helium.chiptech.local> Hi, 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? thanks, Isaac From itsme213 at hotmail.com Mon Nov 28 23:18:07 2005 From: itsme213 at hotmail.com (itsme213) Date: Mon, 28 Nov 2005 22:18:07 -0600 Subject: [Nitro] og relation DSL Message-ID: What are the parameter signatures of the macros? The docs (and code) just takes *args, so it's hard to figure out. How can I do the following? Specifically, how can I name the inverse "belongs_to" distinctly for :good_bs and :bad_bs? class A has_many :good_bs, B has_many :bad_bs, B end Thanks. From itsme213 at hotmail.com Mon Nov 28 23:26:13 2005 From: itsme213 at hotmail.com (itsme213) Date: Mon, 28 Nov 2005 22:26:13 -0600 Subject: [Nitro] HasManyCollection#each References: <3ff63f9b0511241513l1c64d31h@mail.gmail.com> <438B4539.2080201@cs.helsinki.fi> Message-ID: Thanks, Aleksi! > Here's some code that show you few key points leading to different > behavior. The differences seem somewhat subtle (and complex) to me. If I uniformly use A.create will the differences between "not yet known to the database" and "known to the database" go away? > Oh, and that rdoc thing. Dunno why George's advice didn't work for you, > but this is what I do and works for me: > > cd og-0.25.0 > rdoc -o rdoc That did run successfully, and I have the rdoc in the nitro/og directory. Any idea what it needs to get the gem rdoc server to know about this? Thanks. From george.moschovitis at gmail.com Tue Nov 29 03:07:51 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 29 Nov 2005 10:07:51 +0200 Subject: [Nitro] sqlite errors In-Reply-To: References: Message-ID: yeah, add: class A belongs_to B ... end On 11/28/05, itsme213 wrote: > I get errors using sqlite with og 0.25. Am I doing something wrong? > > Thanks! > > --------------- > > require 'og' > > class A > property :name, String > def initialize(n) > @name = n > end > end > > class B > property :name, String > has_many :posts, A > end > > Og.setup( > :store => :sqlite > ) > > b = B.new > a1 = A.new "a1" > a2 = A.new "a2" > > b.posts << a1 > b.posts << a2 > > b.posts.each {|a| puts a.name} > > b.save > a1.save > a2.save > > b.posts.each {|a| puts a.name} > > > ------------------------- > C:> a1 > a2 > I, [2005-11-28T11:27:10.419000 #2916] INFO -- : Created table 'ogb'. > I, [2005-11-28T11:27:10.519000 #2916] INFO -- : Created table 'oga'. > c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0-mswin32/lib/sqlite3/errors.rb:94:in > `check': no such column: b_oid (SQLite3::SQLException) > from > c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0-mswin32/lib/sqlite3/statement.rb:70:in > `initialize' > from > c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0-mswin32/lib/sqlite3/database.rb:183:in > `new' > from > c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0-mswin32/lib/sqlite3/database.rb:183:in > `prepare' > from > c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0-mswin32/lib/sqlite3/database.rb:274:in > `query' > from c:/ruby/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sqlite.rb:82:in > `query' > from c:/ruby/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sql.rb:416:in > `find' > from c:/ruby/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:121:in > `find' > from (eval):43:in `find_posts' > from c:/ruby/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/collection.rb:73:in > `send' > from c:/ruby/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/collection.rb:73:in > `load_members' > from c:/ruby/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/collection.rb:104:in > `each' > from C:/og_each.rb:36 > Process ruby exited with code 1 > _______________________________________________ > 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 Nov 29 04:06:48 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 29 Nov 2005 11:06:48 +0200 Subject: [Nitro] OgFile OgImage and my problems In-Reply-To: <200511270619.25096.m.fellinger@gmail.com> References: <200511270619.25096.m.fellinger@gmail.com> Message-ID: Ok Michael, I 'll have a look at your code when I have time... Will get back to you. -g. On 11/27/05, Michael Fellinger wrote: > Hey List, > > Now i wanted to post a perfect and polished version of OgFile OgImage and > Thumbnail, my latest generally useful og-objects... but somehow that didn't > work out so well. > > I am stuck, right before i could add the last polishing because of something > that must be quite obvious. I've just attached model and controller for now, > i would be very glad if someone could help me - the problem is following: > > OgImage creates Thumbnails, but i cannot assign the thumbnails to the OgImage > that calls them. > I have tired various ways... > OgImage[@oid].thumbnails << (thumb = Thumbnail.new) # => method_missing '<<' > @thumbnails << ..... # => method_missing.... > add_thumbnail(thumb) > self.add_thumbnail(thumb) > OgImage[@oid].add_thumbnail(thumb) # all of the three have no effect > thumb.og_image_oid = @oid # => no error, nothing happens > Thumbnail[thumb.oid].og_image_oid = @oid #=> same again > Thumbnail.find_by_oid(thumb.oid).og_image_oid = @oid #=> nothing ever happens > > and about 20 other variants before of after the thumb.save! - what the heck am > i doing wrong? i'm running out of ideas, and something seems to be flawed > here... > Everytime i check the database (using sqlite for testing), no og_image_oid is > assigned, also i wonder why OgImage doesn't get a proper linkage to the > thumbnails... it looks quite unaffected > > well, that's it, i appreciate every helping hand > Michael 'manveru' Fellinger > > > _______________________________________________ > 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 Nov 29 05:28:41 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 29 Nov 2005 12:28:41 +0200 Subject: [Nitro] Schema Inheritance In-Reply-To: References: Message-ID: On 11/28/05, Emmanuel Piperakis wrote: > Hi, > I have a small problem to report. > class A > property :koko, String > end > > class AA < A > property :haha, String > end > > a = AA.new > b = A[oid] #Fails > > undefined method `result' for # > > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sql.rb:955:in > `read_one' > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/store/sql.rb:426:in > `find_one' > /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:127:in `find_one' > ./src/controller.rb:82:in `project_sel' > (eval):12:in `project_sel_action' > > > probably something to do with the following line in sql.rb > Any ideas? > > ps. b = A.find(:condition => "oid =#{oid}")[0] > works find... but...it is toooo long > > klass = > Og::Entity::entity_from_string(res_row.result.flatten[res_row.fieldnum('ogtype')]) > if klass.schema_inheritance? > > 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 > -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue Nov 29 05:29:16 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 29 Nov 2005 12:29:16 +0200 Subject: [Nitro] Schema Inheritance In-Reply-To: References: Message-ID: Your code is wrong, I runned the following with no problem: require 'og' class A property :koko, String end class AA < A property :haha, String end Og.start a = A.create aa = AA.create oid = 1 b = A[oid] # no problem am I missing something? -.g -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From george.moschovitis at gmail.com Tue Nov 29 05:50:56 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 29 Nov 2005 12:50:56 +0200 Subject: [Nitro] Standard compilere pipeline. Message-ID: Dear devs, I would like to make this the standard compiler pipeline (ie the one you get if you dont override it): template = StaticInclude.transform(template) template = Morphing.transform(template) template = Elements.transform(template) template = Markup.transform(template) template = Template.transform(template) Has anyone any comments, objections? I got bored of adding the same lines over and over in all my projects. -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From epiperak at softlab.ece.ntua.gr Tue Nov 29 06:33:27 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 29 Nov 2005 13:33:27 +0200 (EET) Subject: [Nitro] Standard compilere pipeline. In-Reply-To: References: Message-ID: Please add the Locatization after Elements > template = StaticInclude.transform(template) > template = Morphing.transform(template) > template = Elements.transform(template) template = Localization.transform(template) > template = Markup.transform(template) > template = Template.transform(template) > > Has anyone any comments, objections? I got bored of adding the same > lines over and over in all my projects. 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 Nov 29 05:39:17 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Tue, 29 Nov 2005 12:39:17 +0200 (EET) Subject: [Nitro] Schema Inheritance In-Reply-To: References: Message-ID: You forgot to include the schema_inheritance in class A if you do not, there is not magic! Og, creates 1 table per subclass, (nothing new here). With the schema_inheritance line, the problem occurs. > Your code is wrong, I runned the following with no problem: > > require 'og' > > class A > property :koko, String > end > > class AA < A > property :haha, String > end > > Og.start > > a = A.create > aa = AA.create > > oid = 1 > b = A[oid] # no problem > > > am I missing something? > > -.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 tim at keow.org Tue Nov 29 09:37:54 2005 From: tim at keow.org (Tim Larson) Date: Tue, 29 Nov 2005 14:37:54 +0000 Subject: [Nitro] og relation DSL In-Reply-To: References: Message-ID: <20051129143754.GE4547@localhost> On Mon, Nov 28, 2005 at 10:18:07PM -0600, itsme213 wrote: > What are the parameter signatures of the macros? The docs (and code) just > takes *args, so it's hard to figure out. Don't know, dig in the library code... > How can I do the following? Specifically, how can I name the inverse > "belongs_to" distinctly for :good_bs and :bad_bs? > > class A > has_many :good_bs, B > has_many :bad_bs, B > end class A has_many :good_bs, B, :foreign_name => :some_foreign_key_name has_many :bad_bs, B, :foreign_name => :some_other_foreign_key_name end --Tim Larson From tim at keow.org Tue Nov 29 09:43:49 2005 From: tim at keow.org (Tim Larson) Date: Tue, 29 Nov 2005 14:43:49 +0000 Subject: [Nitro] OG automatically adding Foreign Key constraints In-Reply-To: <1133232446.6654.6.camel@helium.chiptech.local> References: <1133232446.6654.6.camel@helium.chiptech.local> Message-ID: <20051129144349.GF4547@localhost> 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 --Tim Larson From tim at keow.org Tue Nov 29 09:47:29 2005 From: tim at keow.org (Tim Larson) Date: Tue, 29 Nov 2005 14:47:29 +0000 Subject: [Nitro] OG automatically adding Foreign Key constraints In-Reply-To: <20051129144349.GF4547@localhost> References: <1133232446.6654.6.camel@helium.chiptech.local> <20051129144349.GF4547@localhost> Message-ID: <20051129144729.GG4547@localhost> 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. --Tim Larson From chris at motionpath.com Tue Nov 29 10:19:14 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Tue, 29 Nov 2005 15:19:14 +0000 Subject: [Nitro] Standard compilere pipeline. In-Reply-To: References: Message-ID: <857DB404-4A0C-45C6-9D4A-CB27F6ADA2E0@motionpath.com> I'm up for that as standard. I am indifferent about the localization transform since It's my least used (at the moment). Chris Farmiloe Design & Development. Motionpath Digital Media Ltd. St Georges road, Brighton, BN2 1ED. Office: 01273 608708 | Mobile: 07791 179481 On 29 Nov 2005, at 11:33, Emmanuel Piperakis wrote: > Please add the Locatization after Elements > >> template = StaticInclude.transform(template) >> template = Morphing.transform(template) >> template = Elements.transform(template) > template = Localization.transform(template) >> template = Markup.transform(template) >> template = Template.transform(template) >> >> Has anyone any comments, objections? I got bored of adding the same >> lines over and over in all my projects. > > 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/20051129/2d916512/attachment.html From itsme213 at hotmail.com Tue Nov 29 10:19:42 2005 From: itsme213 at hotmail.com (itsme213) Date: Tue, 29 Nov 2005 09:19:42 -0600 Subject: [Nitro] og relation DSL References: <20051129143754.GE4547@localhost> Message-ID: Thanks Tim. p.s. I'm not shy of the library code, just hoping others more knowledgable can keep me from getting lost in the paths through ann, Relation, etc. ----- Original Message ----- From: "Tim Larson" To: "General discussion about Nitro" Sent: Tuesday, November 29, 2005 8:37 AM Subject: Re: [Nitro] og relation DSL > On Mon, Nov 28, 2005 at 10:18:07PM -0600, itsme213 wrote: >> What are the parameter signatures of the macros? The docs (and code) just >> takes *args, so it's hard to figure out. > > Don't know, dig in the library code... > >> How can I do the following? Specifically, how can I name the inverse >> "belongs_to" distinctly for :good_bs and :bad_bs? >> >> class A >> has_many :good_bs, B >> has_many :bad_bs, B >> end > > class A > has_many :good_bs, B, :foreign_name => :some_foreign_key_name > has_many :bad_bs, B, :foreign_name => :some_other_foreign_key_name > end > > --Tim Larson > _______________________________________________ > Nitro-general mailing list > Nitro-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/nitro-general > From george.moschovitis at gmail.com Tue Nov 29 10:55:11 2005 From: george.moschovitis at gmail.com (George Moschovitis) Date: Tue, 29 Nov 2005 17:55:11 +0200 Subject: [Nitro] Standard compilere pipeline. In-Reply-To: References: Message-ID: > template = Localization.transform(template) naah, adding localization in the default pipeline is too much. -g. -- http://www.gmosx.com http://www.navel.gr http://www.nitrohq.com From itsme213 at hotmail.com Tue Nov 29 11:06:10 2005 From: itsme213 at hotmail.com (itsme213) Date: Tue, 29 Nov 2005 10:06:10 -0600 Subject: [Nitro] sqlite errors References: Message-ID: Thanks George. I am a bit confused by some non-DRY parts: class A has_many :bs, B, :foreign_name, :inv_bs # (1) end class B belongs_to :inv_bs, A # (2) <-- WHY NEEDED? end With sqlite (2) is needed, but isn't it redundant with (1)? Also, kirby works without (2). It would be good if the different stores used consistent ORM macros at the user-level. A further thought: could both belongs_to and foreign_key to be automatically generated by Og (with some suitable unambiguous naming rule) if it is not explicitly specified by the user? After all, the has_many commits to a 1-N relation. The user may not have any need to name or refer to the inverse, and this would let the user declare just the object-model part needed. Then ====================== class A has_many :good_Bs, B has_many :bad_Bs, B end class B end ------------- could be equivalent to: class A has_many :good_Bs, B, :foreign_name=> :inv_good_Bs_A has_many :good_Bs, B, :foreign_name=> :inv_bad_Bs_A end class B end ====================== Just a thought. ----- Original Message ----- From: "George Moschovitis" To: "General discussion about Nitro" Sent: Tuesday, November 29, 2005 2:07 AM Subject: Re: [Nitro] sqlite errors > yeah, > > add: > > class A > belongs_to B > ... > end > > > On 11/28/05, itsme213 wrote: >> I get errors using sqlite with og 0.25. Am I doing something wrong? >> >> Thanks! >> >> --------------- >> >> require 'og' >> >> class A >> property :name, String >> def initialize(n) >> @name = n >> end >> end >> >> class B >> property :name, String >> has_many :posts, A >> end >> From zimba.tm at gmail.com Tue Nov 29 13:22:41 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Tue, 29 Nov 2005 19:22:41 +0100 Subject: [Nitro] Standard compilere pipeline. In-Reply-To: References: Message-ID: <3ff63f9b0511291022s5dcb1cd2m@mail.gmail.com> Can you describe what each transformer does ? I think Markup could be a problem if it's what i think. Is it a RedCloth or equivalent ?. If it's that, it could perform unwanted and "mysterious" transforms On 29/11/05, George Moschovitis wrote: > Dear devs, > > I would like to make this the standard compiler pipeline (ie the one > you get if you dont override it): > > template = StaticInclude.transform(template) > template = Morphing.transform(template) > template = Elements.transform(template) > template = Markup.transform(template) > template = Template.transform(template) > > Has anyone any comments, objections? I got bored of adding the same > lines over and over in all my projects. > > -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 Isaac at chiptech.co.nz Tue Nov 29 15:15:01 2005 From: Isaac at chiptech.co.nz (Isaac Devine) Date: Wed, 30 Nov 2005 09:15:01 +1300 Subject: [Nitro] OG automatically adding Foreign Key constraints In-Reply-To: <20051129144729.GG4547@localhost> References: <1133232446.6654.6.camel@helium.chiptech.local> <20051129144349.GF4547@localhost> <20051129144729.GG4547@localhost> Message-ID: <1133295301.6650.4.camel@helium.chiptech.local> 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 From zimba.tm at gmail.com Tue Nov 29 17:43:58 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Tue, 29 Nov 2005 23:43:58 +0100 Subject: [Nitro] Schema Inheritance In-Reply-To: References: Message-ID: <3ff63f9b0511291443v4b15003l@mail.gmail.com> In your example, you use AA.new. It creates a new object but it isn't available in the storage yet. Try addind A.save or use A.create like George did On 29/11/05, Emmanuel Piperakis wrote: > You forgot to include the > schema_inheritance in class A > if you do not, there is not magic! Og, creates 1 table per subclass, > (nothing new here). With the schema_inheritance line, the problem occurs. > > > Your code is wrong, I runned the following with no problem: > > > > require 'og' > > > > class A > > property :koko, String > > end > > > > class AA < A > > property :haha, String > > end > > > > Og.start > > > > a = A.create > > aa = AA.create > > > > oid = 1 > > b = A[oid] # no problem > > > > > > am I missing something? > > > > -.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} > _______________________________________________ > 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 Wed Nov 30 04:20:15 2005 From: chris at motionpath.com (Chris Farmiloe) Date: Wed, 30 Nov 2005 09:20:15 +0000 Subject: [Nitro] Standard compilere pipeline. In-Reply-To: <3ff63f9b0511291022s5dcb1cd2m@mail.gmail.com> References: <3ff63f9b0511291022s5dcb1cd2m@mail.gmail.com> Message-ID: markup performs the transformations of the special macro versions of #{} #| | ==> markup() or the markup pipeline and #( ) ==> sanitize() so unless you use the special macros it won't run all your stuff through recloth (and if you setup your own markup pipeline you could run it through whatever markup system you like) Chris Farmiloe Design & Development. Motionpath Digital Media Ltd. St Georges road, Brighton, BN2 1ED. Office: 01273 608708 | Mobile: 07791 179481 On 29 Nov 2005, at 18:22, zimba-tm wrote: > Can you describe what each transformer does ? I think Markup could be > a problem if it's what i think. Is it a RedCloth or equivalent ?. If > it's that, it could perform unwanted and "mysterious" transforms -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051130/66d88fba/attachment.html From epiperak at softlab.ece.ntua.gr Wed Nov 30 04:37:37 2005 From: epiperak at softlab.ece.ntua.gr (Emmanuel Piperakis) Date: Wed, 30 Nov 2005 11:37:37 +0200 (EET) Subject: [Nitro] Schema Inheritance In-Reply-To: <3ff63f9b0511291443v4b15003l@mail.gmail.com> References: <3ff63f9b0511291443v4b15003l@mail.gmail.com> Message-ID: In my real code, the object has been created successfully and saved. I try to query much later in the code. > In your example, you use AA.new. It creates a new object but it isn't > available in the storage yet. > Try addind A.save or use A.create like George did > > On 29/11/05, Emmanuel Piperakis wrote: >> You forgot to include the >> schema_inheritance in class A >> if you do not, there is not magic! Og, creates 1 table per subclass, >> (nothing new here). With the schema_inheritance line, the problem occurs. >> >>> Your code is wrong, I runned the following with no problem: >>> >>> require 'og' >>> >>> class A >>> property :koko, String >>> end >>> >>> class AA < A >>> property :haha, String >>> end >>> >>> Og.start >>> >>> a = A.create >>> aa = AA.create >>> >>> oid = 1 >>> b = A[oid] # no problem >>> >>> >>> am I missing something? >>> >>> -.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} >> _______________________________________________ >> 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 > Emmanouil Piperakis (epiperak at cs.ntua.gr) {To explore is Human, to Create is Devine, To teach is Primal, to Rule is Sin} From rob at motionpath.com Wed Nov 30 10:40:42 2005 From: rob at motionpath.com (Rob Pitt) Date: Wed, 30 Nov 2005 15:40:42 +0000 Subject: [Nitro] OG automatically adding Foreign Key constraints In-Reply-To: <1133295301.6650.4.camel@helium.chiptech.local> References: <1133232446.6654.6.camel@helium.chiptech.local> <20051129144349.GF4547@localhost> <20051129144729.GG4547@localhost> <1133295301.6650.4.camel@helium.chiptech.local> Message-ID: <438DC7FA.80200@motionpath.com> 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 > > From zimba.tm at gmail.com Wed Nov 30 16:38:39 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Wed, 30 Nov 2005 22:38:39 +0100 Subject: [Nitro] http://nitrohq.com => Error 404 Message-ID: <3ff63f9b0511301338j16ba2906s@mail.gmail.com> 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 From vanek at acd.net Wed Nov 30 18:37:58 2005 From: vanek at acd.net (Lou Vanek) Date: Wed, 30 Nov 2005 23:37:58 +0000 Subject: [Nitro] http://nitrohq.com => Error 404 In-Reply-To: <3ff63f9b0511301338j16ba2906s@mail.gmail.com> References: <3ff63f9b0511301338j16ba2906s@mail.gmail.com> Message-ID: 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 From jeff.darklight at gmail.com Wed Nov 30 18:46:12 2005 From: jeff.darklight at gmail.com (Jeff Wood) Date: Wed, 30 Nov 2005 15:46:12 -0800 Subject: [Nitro] http://nitrohq.com => Error 404 In-Reply-To: References: <3ff63f9b0511301338j16ba2906s@mail.gmail.com> Message-ID: ... 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051130/676be98c/attachment.html From zimba.tm at gmail.com Wed Nov 30 19:14:09 2005 From: zimba.tm at gmail.com (zimba-tm) Date: Thu, 1 Dec 2005 01:14:09 +0100 Subject: [Nitro] http://nitrohq.com => Error 404 In-Reply-To: References: <3ff63f9b0511301338j16ba2906s@mail.gmail.com> Message-ID: <3ff63f9b0511301614p41325502w@mail.gmail.com> 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 From m.fellinger at gmail.com Wed Nov 30 19:36:08 2005 From: m.fellinger at gmail.com (Michael Fellinger) Date: Thu, 1 Dec 2005 01:36:08 +0100 Subject: [Nitro] http://nitrohq.com => Error 404 In-Reply-To: <3ff63f9b0511301614p41325502w@mail.gmail.com> References: <3ff63f9b0511301338j16ba2906s@mail.gmail.com> <3ff63f9b0511301614p41325502w@mail.gmail.com> Message-ID: <200512010136.19366.m.fellinger@gmail.com> 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 -------------- 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/20051130/1a789b34/attachment.bin