From his2000x at gmail.com Fri Feb 5 04:59:42 2010 From: his2000x at gmail.com (in-seok hwang) Date: Fri, 5 Feb 2010 18:59:42 +0900 Subject: I want to use camping 2.0 Message-ID: Hi ,all I want some advice about upgrade camping version. My server used camping-1.5.180 and mongrel-1.1.5, activerecord-2.1.1, markaby-0.5 But, that is very old . So , i tried to update camping version ( 1.5.180 -> 1.9.300) and i has many problem. two version are so different. so i had to give up was updated. Now i would like to try the update again.(camping 2.0) i have two question. what is the difference between the two version ( 1.5.180 and 2.0) ? new version(2.0) of the old version ( 1.5.180) of the website should create a new one? Some small modifications to the source is not possible to update do? plz give me hint. My English is not enough. Sorry. -------------- next part -------------- An HTML attachment was scrubbed... URL: From deveritt at innotts.co.uk Fri Feb 5 05:17:04 2010 From: deveritt at innotts.co.uk (Dave Everitt) Date: Fri, 5 Feb 2010 10:17:04 +0000 Subject: I want to use camping 2.0 In-Reply-To: References: Message-ID: <044BFEE8-5E5D-44AA-BE32-E1348F1EBB2B@innotts.co.uk> Hi - take a look here: http://stuff.judofyr.net/camping-docs/book/51_upgrading.html#from-15- to-20 DaveE > what is the difference between the two version ( 1.5.180 and 2.0) ? From dsusco at gmail.com Fri Feb 19 14:59:57 2010 From: dsusco at gmail.com (David Susco) Date: Fri, 19 Feb 2010 14:59:57 -0500 Subject: going into production, a few questions Message-ID: <1bd79b4a1002191159xefe14f0tcdb82bb33a092b7a@mail.gmail.com> I have a few camping projects that are about to go into production in a few weeks, just picking your brains to see if I can add some robustness. What's the best way to catch any "Camping Problem! /XXX not found" errors that a user might see if they start typing URLs themselves? Ideally I'd just like to redirect them all to some general index controller. I'm using MySQL for my database. I'm getting a few "MySQL server has gone away" error messages every now and then. I did some searching and found if "reconnect: true" is in the hash I send to establish_connection that I should be all set. Can anyone confirm? Also, any other MySQL connection "best practices" that I should be following? -- Dave From judofyr at gmail.com Fri Feb 19 15:13:06 2010 From: judofyr at gmail.com (Magnus Holm) Date: Fri, 19 Feb 2010 21:13:06 +0100 Subject: going into production, a few questions In-Reply-To: <1bd79b4a1002191159xefe14f0tcdb82bb33a092b7a@mail.gmail.com> References: <1bd79b4a1002191159xefe14f0tcdb82bb33a092b7a@mail.gmail.com> Message-ID: <391a49da1002191213v4c691b0bofac48eb1ba5ef319@mail.gmail.com> 404 on 1.5: module App::Controllers class NotFound def get(path) "Do something with path" end end end 404 on 1.9/2.0: module App def r404(path) "Do something with path" end end There appears to be two solutions: Call ActiveRecord::Base.verify_active_connections! before every request (I think this is what Rails does by default): module VerifyConnection def service(*args) ActiveRecord::Base.verify_active_connections! ensure return super end end module App include VerifyConnection end Or, pass reconnect => true to establish_connection. I'm not quite sure what's best? // Magnus Holm On Fri, Feb 19, 2010 at 20:59, David Susco wrote: > I have a few camping projects that are about to go into production in > a few weeks, just picking your brains to see if I can add some > robustness. > > What's the best way to catch any "Camping Problem! /XXX not found" > errors that a user might see if they start typing URLs themselves? > Ideally I'd just like to redirect them all to some general index > controller. > > I'm using MySQL for my database. I'm getting a few "MySQL server has > gone away" error messages every now and then. I did some searching and > found if "reconnect: true" is in the hash I send to > establish_connection that I should be all set. Can anyone confirm? > Also, any other MySQL connection "best practices" that I should be > following? > > -- > Dave > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dsusco at gmail.com Fri Feb 19 15:51:07 2010 From: dsusco at gmail.com (David Susco) Date: Fri, 19 Feb 2010 15:51:07 -0500 Subject: going into production, a few questions In-Reply-To: <391a49da1002191213v4c691b0bofac48eb1ba5ef319@mail.gmail.com> References: <1bd79b4a1002191159xefe14f0tcdb82bb33a092b7a@mail.gmail.com> <391a49da1002191213v4c691b0bofac48eb1ba5ef319@mail.gmail.com> Message-ID: <1bd79b4a1002191251j13bb5376x8eaf373587a5bc6@mail.gmail.com> Thanks on the 404 stuff, that was easy. I'm going to stick with the reconnect => true until that is proving not to work. It's the easiest as it's a one liner addition to my yaml. Dave On Fri, Feb 19, 2010 at 3:13 PM, Magnus Holm wrote: > 404 on 1.5: > module App::Controllers > ??class NotFound > ?? ?def get(path) > ?? ? ?"Do something with path" > ?? ?end > ??end > end > 404 on 1.9/2.0: > module App > ??def r404(path) > ?? ?"Do something with path" > ??end > end > There appears to be two solutions: > Call?ActiveRecord::Base.verify_active_connections! before every request (I > think this is what Rails does by default): > module VerifyConnection > ??def service(*args) > ?? ?ActiveRecord::Base.verify_active_connections! > ??ensure > ?? ?return super > ??end > end > module App > ??include VerifyConnection > end > Or, pass reconnect => true to establish_connection. > I'm not quite sure what's best? > // Magnus Holm > > > On Fri, Feb 19, 2010 at 20:59, David Susco wrote: >> >> I have a few camping projects that are about to go into production in >> a few weeks, just picking your brains to see if I can add some >> robustness. >> >> What's the best way to catch any "Camping Problem! /XXX not found" >> errors that a user might see if they start typing URLs themselves? >> Ideally I'd just like to redirect them all to some general index >> controller. >> >> I'm using MySQL for my database. I'm getting a few "MySQL server has >> gone away" error messages every now and then. I did some searching and >> found if "reconnect: true" is in the hash I send to >> establish_connection that I should be all set. Can anyone confirm? >> Also, any other MySQL connection "best practices" that I should be >> following? >> >> -- >> Dave >> _______________________________________________ >> Camping-list mailing list >> Camping-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list > > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -- Dave