From why at whytheluckystiff.net Sat Jan 6 02:37:56 2007 From: why at whytheluckystiff.net (why the lucky stiff) Date: Sat, 6 Jan 2007 01:37:56 -0600 Subject: ? camping apps in gems Message-ID: <20070106073756.GI25653@beekeeper.hobix.com> So would you like this: $ wget http://rubyforge.org/gems/junebug-0.0.18.gem $ camping junebug-0.0.18.gem Or should it be: $ gem install junebug $ touch junebug.gemcamp $ camping junebug.gemcamp _why From mathieu at justbudget.com Sat Jan 6 04:02:44 2007 From: mathieu at justbudget.com (Mathieu Jobin) Date: Sat, 6 Jan 2007 18:02:44 +0900 Subject: ? camping apps in gems In-Reply-To: <20070106073756.GI25653@beekeeper.hobix.com> References: <20070106073756.GI25653@beekeeper.hobix.com> Message-ID: <78181ce60701060102nf5f4e2bt7122e650fad53658@mail.gmail.com> I think the first one would be pretty cool. the second one too except for touching the file. I would imagine more something like $ camping --from-installed-gem junebug # --from-installed-gem can be shortened. On 1/6/07, why the lucky stiff wrote: > > So would you like this: > > $ wget http://rubyforge.org/gems/junebug-0.0.18.gem > $ camping junebug-0.0.18.gem > > Or should it be: > > $ gem install junebug > $ touch junebug.gemcamp > $ camping junebug.gemcamp > > _why > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -- gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static -ldl -lcrypt -lm -o ruby Everyone is trying their hardest to do their job but management has set it up so that it's impossible. Take the control over your money, track your expenses http://justbudget.com Mathieu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20070106/d2341eac/attachment.html From _ at whats-your.name Sat Jan 6 04:02:30 2007 From: _ at whats-your.name (carmen) Date: Sat, 6 Jan 2007 04:02:30 -0500 Subject: ? camping apps in gems In-Reply-To: <20070106073756.GI25653@beekeeper.hobix.com> References: <20070106073756.GI25653@beekeeper.hobix.com> Message-ID: <20070106090230.GA8972@replic.net> On Sat Jan 06, 2007 at 01:37:56AM -0600, why the lucky stiff wrote: > So would you like this: > > $ wget http://rubyforge.org/gems/junebug-0.0.18.gem > $ camping junebug-0.0.18.gem > > Or should it be: > > $ gem install junebug > $ touch junebug.gemcamp > $ camping junebug.gemcamp is $ gem install junebug $ camping junebug too much voodoo? or maybe even $ gem install junebug $ camping (ok maybe loading all gemcamps is a bit much for the lowly server) > > _why > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From mathieu at justbudget.com Sat Jan 6 05:36:47 2007 From: mathieu at justbudget.com (Mathieu Jobin) Date: Sat, 6 Jan 2007 19:36:47 +0900 Subject: ? camping apps in gems In-Reply-To: <20070106090230.GA8972@replic.net> References: <20070106073756.GI25653@beekeeper.hobix.com> <20070106090230.GA8972@replic.net> Message-ID: <78181ce60701060236m216cc39dt388aea6827dc7bf@mail.gmail.com> I think that camping takes a file as a parameter and should stay the same. the fact to accept a gem file automatically its nice. but for installed gem, I think it should require an option --from-installed-gem should be shortened to --gem or -g On 1/6/07, carmen <_ at whats-your.name> wrote: > > On Sat Jan 06, 2007 at 01:37:56AM -0600, why the lucky stiff wrote: > > So would you like this: > > > > $ wget http://rubyforge.org/gems/junebug-0.0.18.gem > > $ camping junebug-0.0.18.gem > > > > Or should it be: > > > > $ gem install junebug > > $ touch junebug.gemcamp > > $ camping junebug.gemcamp > > is > > $ gem install junebug > $ camping junebug > > too much voodoo? or maybe even > > $ gem install junebug > $ camping > > (ok maybe loading all gemcamps is a bit much for the lowly server) > > > > > _why > > _______________________________________________ > > 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 > -- gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static -ldl -lcrypt -lm -o ruby Everyone is trying their hardest to do their job but management has set it up so that it's impossible. Take the control over your money, track your expenses http://justbudget.com Mathieu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20070106/6e869c20/attachment.html From boss at topfunky.com Sat Jan 6 13:06:07 2007 From: boss at topfunky.com (Geoffrey Grosenbach) Date: Sat, 6 Jan 2007 10:06:07 -0800 Subject: ? camping apps in gems In-Reply-To: <20070106073756.GI25653@beekeeper.hobix.com> References: <20070106073756.GI25653@beekeeper.hobix.com> Message-ID: <20070106180607.GA6884@topfunky.com> On Sat, Jan 06, 2007 at 01:37:56AM -0600, why the lucky stiff wrote: > So would you like this: > > $ wget http://rubyforge.org/gems/junebug-0.0.18.gem > $ camping junebug-0.0.18.gem I like that way. Being able to copy a packaged app whole would be very useful and would make it easy to deploy updates to a camping app. One could use Hoe, or even a custom Rake task that would generate a gemspec on the fly and make an app out of the gem. In the future this could even make it possible to list other gems as dependencies (equipment, mosquito, etc.) and the "camping" command could make sure that they were present before launching the app. Geoff From boss at topfunky.com Sat Jan 6 13:14:15 2007 From: boss at topfunky.com (Geoffrey Grosenbach) Date: Sat, 6 Jan 2007 10:14:15 -0800 Subject: Camping Podcast Message-ID: <20070106181415.GB6884@topfunky.com> I'm putting together an episode of the Rails podcast that will be dedicated to Camping. I already have the first interview recorded. I'd like to get 3 or 4 more short interviews (short...maybe 4.096 minutes each). If you'd like instant fame, send me an email and tell me what camping project you would like to talk about, what your skype username is, and when is a good time to contact you. Thanks! Geoff boss at topfunky.com skype: topfunkycorporation http://podcast.rubyonrails.org p.s. If _why would be so kind as to do the same or even just record a short message for the worldwide Camping movement, I'd appreciate it. From why at whytheluckystiff.net Sat Jan 6 14:26:25 2007 From: why at whytheluckystiff.net (why the lucky stiff) Date: Sat, 6 Jan 2007 13:26:25 -0600 Subject: ! camping 1.5.180 Message-ID: <20070106192625.GL25653@beekeeper.hobix.com> Just a few minor changes released before I add gem support. * R() now accepts a Hash in its arguments which can be used to build a query string. R(Topic, @topic.id, :page => 24) #=> "/topic/14?page=24" * Base#to_a, discussed here.[1] Can be used to forward requests. Both the camping and camping-omnibus gems are fresh. gem install camping-omnibus --source http://code.whytheluckystiff.net _why [1] http://redhanded.hobix.com/bits/theSiphoningSplat.html From adamb at mit.edu Sat Jan 6 18:15:51 2007 From: adamb at mit.edu (Adam Bouhenguel) Date: Sat, 6 Jan 2007 18:15:51 -0500 Subject: Camping Podcast In-Reply-To: <20070106181415.GB6884@topfunky.com> References: <20070106181415.GB6884@topfunky.com> Message-ID: On 1/6/07, Geoffrey Grosenbach wrote: > > I'm putting together an episode of the Rails podcast that will be dedicated > to Camping. > > I already have the first interview recorded. I'd like to get 3 or 4 more > short interviews (short...maybe 4.096 minutes each). > > If you'd like instant fame, send me an email and tell me what camping > project you would like to talk about, what your skype username is, and when > is a good time to contact you. > > Thanks! > > Geoff > boss at topfunky.com > skype: topfunkycorporation > http://podcast.rubyonrails.org > > p.s. If _why would be so kind as to do the same or even just record a short > message for the worldwide Camping movement, I'd appreciate it. > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From james at icionline.ca Mon Jan 8 16:16:56 2007 From: james at icionline.ca (james) Date: Mon, 8 Jan 2007 14:16:56 -0700 Subject: ActiveSupport Dependency Message-ID: <7039ada60701081316l42f8021ck2e3532fab8502905@mail.gmail.com> Hi, Just wondering if ActiveSupport is actually used heavily by Camping when ActiveRecord is not used? I see ActiveSupport is a dependency of ActiveRecord, but Camping still wants it even when ActiveRecord isn't used. From why at whytheluckystiff.net Mon Jan 8 17:54:50 2007 From: why at whytheluckystiff.net (why the lucky stiff) Date: Mon, 8 Jan 2007 16:54:50 -0600 Subject: ActiveSupport Dependency In-Reply-To: <7039ada60701081316l42f8021ck2e3532fab8502905@mail.gmail.com> References: <7039ada60701081316l42f8021ck2e3532fab8502905@mail.gmail.com> Message-ID: <20070108225450.GB91817@beekeeper.hobix.com> On Mon, Jan 08, 2007 at 02:16:56PM -0700, james wrote: > Hi, Just wondering if ActiveSupport is actually used heavily by > Camping when ActiveRecord is not used? I see ActiveSupport is a > dependency of ActiveRecord, but Camping still wants it even when > ActiveRecord isn't used. Yep, Camping uses the HashWithIndifferentAccess. For the Camping::H class. _why From james at icionline.ca Mon Jan 8 18:59:43 2007 From: james at icionline.ca (james) Date: Mon, 8 Jan 2007 16:59:43 -0700 Subject: ActiveSupport Dependency In-Reply-To: <20070108225450.GB91817@beekeeper.hobix.com> References: <7039ada60701081316l42f8021ck2e3532fab8502905@mail.gmail.com> <20070108225450.GB91817@beekeeper.hobix.com> Message-ID: <7039ada60701081559w1a90f510rf7ef333eea2192ba@mail.gmail.com> On 1/8/07, why the lucky stiff wrote: > On Mon, Jan 08, 2007 at 02:16:56PM -0700, james wrote: > > Hi, Just wondering if ActiveSupport is actually used heavily by > > Camping when ActiveRecord is not used? I see ActiveSupport is a > > dependency of ActiveRecord, but Camping still wants it even when > > ActiveRecord isn't used. > > Yep, Camping uses the HashWithIndifferentAccess. For the Camping::H > class. Thanks. From michael.gorsuch at gmail.com Tue Jan 9 14:20:43 2007 From: michael.gorsuch at gmail.com (Michael Gorsuch) Date: Tue, 9 Jan 2007 14:20:43 -0500 Subject: Overriding ServerError? Message-ID: <2a3f927b0701091120g11ea858aj25724da4680098b1@mail.gmail.com> I'm getting ready to deploy a production app based on Camping, but have one little thing I want to iron out. Is it possible to override the ServerError class? I need custom 500's to come up, and not the normal "Camping Problem!" page. I am trying to override, just like I do the NotFound class, but can't seem to get it to take. I just get a blank page back (with errors to the console) when I do this: module MyApp::Controllers class ServerError def get(k,m,e) @status = 500 div do h1 'Wow! You Broke Me!' h2 "in #{k}.#{m}" h3 "#{e.class} #{e.message}:" ul do e.backtrace.each do |bt| li bt end end end end end end Any ideas? Am I just missing something super obvious? Thanks all, Michael From michael.gorsuch at gmail.com Tue Jan 9 14:28:17 2007 From: michael.gorsuch at gmail.com (Michael Gorsuch) Date: Tue, 9 Jan 2007 14:28:17 -0500 Subject: Overriding ServerError? In-Reply-To: <2a3f927b0701091120g11ea858aj25724da4680098b1@mail.gmail.com> References: <2a3f927b0701091120g11ea858aj25724da4680098b1@mail.gmail.com> Message-ID: <2a3f927b0701091128s768e3f21qf6a7c83e11ce3898@mail.gmail.com> Never mind, guys. I missed it in the archives, but found it via google: http://rubyforge.org/pipermail/camping-list/2006-July/000063.html I am doing things right, I just need to render a template instead of output everything in the controller. Sorry! On 1/9/07, Michael Gorsuch wrote: > I'm getting ready to deploy a production app based on Camping, but > have one little thing I want to iron out. > > Is it possible to override the ServerError class? I need custom 500's > to come up, and not the normal "Camping Problem!" page. > > I am trying to override, just like I do the NotFound class, but can't > seem to get it to take. I just get a blank page back (with errors to > the console) when I do this: > > module MyApp::Controllers > class ServerError > def get(k,m,e) > @status = 500 > div do > h1 'Wow! You Broke Me!' > h2 "in #{k}.#{m}" > h3 "#{e.class} #{e.message}:" > ul do > e.backtrace.each do |bt| > li bt > end > end > end > end > end > end > > Any ideas? Am I just missing something super obvious? > > Thanks all, > > Michael > From why at whytheluckystiff.net Tue Jan 9 14:32:03 2007 From: why at whytheluckystiff.net (why the lucky stiff) Date: Tue, 9 Jan 2007 13:32:03 -0600 Subject: Overriding ServerError? In-Reply-To: <2a3f927b0701091120g11ea858aj25724da4680098b1@mail.gmail.com> References: <2a3f927b0701091120g11ea858aj25724da4680098b1@mail.gmail.com> Message-ID: <20070109193203.GF91817@beekeeper.hobix.com> On Tue, Jan 09, 2007 at 02:20:43PM -0500, Michael Gorsuch wrote: > Is it possible to override the ServerError class? I need custom 500's > to come up, and not the normal "Camping Problem!" page. Are you on FastCGI? Because FastCGI has its own error page (which is broken in many gems.) The FastCGI error page kicks in when an error is caused outside of the scope of Camping, so it sort of depends on what the nature of the exception is. For instance, a parse error will toss to FastCGI's error and a database problem will likely hit Camping's. See the server_error method[1] for that. You might temporarily try out Camping from SVN, to at least get that method fixed so you can see the underlying error. _why [1] http://code.whytheluckystiff.net/camping/browser/trunk/lib/camping/fastcgi.rb From why at whytheluckystiff.net Tue Jan 9 14:43:42 2007 From: why at whytheluckystiff.net (why the lucky stiff) Date: Tue, 9 Jan 2007 13:43:42 -0600 Subject: Overriding ServerError? In-Reply-To: <2a3f927b0701091128s768e3f21qf6a7c83e11ce3898@mail.gmail.com> References: <2a3f927b0701091120g11ea858aj25724da4680098b1@mail.gmail.com> <2a3f927b0701091128s768e3f21qf6a7c83e11ce3898@mail.gmail.com> Message-ID: <20070109194342.GG91817@beekeeper.hobix.com> On Tue, Jan 09, 2007 at 02:28:17PM -0500, Michael Gorsuch wrote: > I am doing things right, I just need to render a template instead of > output everything in the controller. Curious. It should let ya. Can you pass on the software versions you're using and i'll ticketize. _why From michael.gorsuch at gmail.com Tue Jan 9 14:55:15 2007 From: michael.gorsuch at gmail.com (Michael Gorsuch) Date: Tue, 9 Jan 2007 14:55:15 -0500 Subject: Overriding ServerError? In-Reply-To: <20070109194342.GG91817@beekeeper.hobix.com> References: <2a3f927b0701091120g11ea858aj25724da4680098b1@mail.gmail.com> <2a3f927b0701091128s768e3f21qf6a7c83e11ce3898@mail.gmail.com> <20070109194342.GG91817@beekeeper.hobix.com> Message-ID: <2a3f927b0701091155w66a3c50ar92bb4d7237692442@mail.gmail.com> Sure. I've narrowed it down to a code sample that sort of works, and one that doesn't. ruby version: ruby 1.8.5 (2006-09-06) [i386-netbsdelf] camping gem: 1.5.180 mongrel (just in case): 0.3.13.4 My App name is 'Dreaming'. This code sample will at least send 'test' to the browser: module Dreaming::Controllers class ServerError def get(k,m,e) @status = 500 'test' end end end This one will not send anything to the browser: module Dreaming::Controllers class ServerError def get(k,m,e) @status = 500 div do p "test" end end end end Thanks. I'll keep digging myself to see if I can come up with anything. On 1/9/07, why the lucky stiff wrote: > On Tue, Jan 09, 2007 at 02:28:17PM -0500, Michael Gorsuch wrote: > > I am doing things right, I just need to render a template instead of > > output everything in the controller. > > Curious. It should let ya. Can you pass on the software versions > you're using and i'll ticketize. > > _why > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From michael.gorsuch at gmail.com Tue Jan 9 20:42:10 2007 From: michael.gorsuch at gmail.com (Michael Gorsuch) Date: Tue, 9 Jan 2007 20:42:10 -0500 Subject: [ANN] Dream Ledger Message-ID: <2a3f927b0701091742t2955679ex7165ce5a29809c40@mail.gmail.com> Hello Fellow Campers, I'm feeling crazy tonight and thought I'd go ahead and announce my new little project riding on the Camping framework: Dream Ledger (http://www.dreamledger.com). The app was written to scratch a personal itch, which is the simple fact that I wanted an easy way to record my nightly dreams and sleep experiences. Think about it as 'dream blogging', except it's all private and for your eyes only. Also, your entries are exportable as XML, so no one can ever be trapped in the app. I have included a very simple message board for discussions. Why Camping, you ask? Because I'm stubborn. Actually, I found that Camping was _extremely_ easy to build with, and even _easier_ to deploy. Rails is wonderful, but somehow Camping gave me a lot of joy. I'm excited to see how it stands up against any amount of traffic. Thanks for letting me pimp my wares, Michael Gorsuch http://www.dreamledger.com http://www.michaelgorsuch.org From james at icionline.ca Tue Jan 9 21:41:20 2007 From: james at icionline.ca (james) Date: Tue, 9 Jan 2007 19:41:20 -0700 Subject: [ANN] Dream Ledger In-Reply-To: <2a3f927b0701091742t2955679ex7165ce5a29809c40@mail.gmail.com> References: <2a3f927b0701091742t2955679ex7165ce5a29809c40@mail.gmail.com> Message-ID: <7039ada60701091841t6a23f3abxe4ea7421227cd9b3@mail.gmail.com> On 1/9/07, Michael Gorsuch wrote: > Hello Fellow Campers, > > I'm feeling crazy tonight and thought I'd go ahead and announce my new > little project riding on the Camping framework: Dream Ledger > (http://www.dreamledger.com). > > The app was written to scratch a personal itch, which is the simple > fact that I wanted an easy way to record my nightly dreams and sleep > experiences. Think about it as 'dream blogging', except it's all > private and for your eyes only. Also, your entries are exportable as > XML, so no one can ever be trapped in the app. I have included a very > simple message board for discussions. > > Why Camping, you ask? Because I'm stubborn. > > Actually, I found that Camping was _extremely_ easy to build with, and > even _easier_ to deploy. Rails is wonderful, but somehow Camping gave > me a lot of joy. > > I'm excited to see how it stands up against any amount of traffic. > > Thanks for letting me pimp my wares, My first thought when I saw "Dream *Ledger*" was... holy cow, an SQL-Ledger replacement done in Camping! Anyway congratulations! Did you use Markaby for your views? I like Markaby :) James From michael.gorsuch at gmail.com Tue Jan 9 21:55:17 2007 From: michael.gorsuch at gmail.com (Michael Gorsuch) Date: Tue, 9 Jan 2007 21:55:17 -0500 Subject: [ANN] Dream Ledger In-Reply-To: <7039ada60701091841t6a23f3abxe4ea7421227cd9b3@mail.gmail.com> References: <2a3f927b0701091742t2955679ex7165ce5a29809c40@mail.gmail.com> <7039ada60701091841t6a23f3abxe4ea7421227cd9b3@mail.gmail.com> Message-ID: <2a3f927b0701091855o3f306497v42c13e37cf1c558c@mail.gmail.com> haha! No sir, I don't have that kind of an itch to scratch! Thanks for the congrats. Yes, I used Markaby. It was perfect for this. Certainly made my life much easier. On 1/9/07, james wrote: > On 1/9/07, Michael Gorsuch wrote: > > Hello Fellow Campers, > > > > I'm feeling crazy tonight and thought I'd go ahead and announce my new > > little project riding on the Camping framework: Dream Ledger > > (http://www.dreamledger.com). > > > > The app was written to scratch a personal itch, which is the simple > > fact that I wanted an easy way to record my nightly dreams and sleep > > experiences. Think about it as 'dream blogging', except it's all > > private and for your eyes only. Also, your entries are exportable as > > XML, so no one can ever be trapped in the app. I have included a very > > simple message board for discussions. > > > > Why Camping, you ask? Because I'm stubborn. > > > > Actually, I found that Camping was _extremely_ easy to build with, and > > even _easier_ to deploy. Rails is wonderful, but somehow Camping gave > > me a lot of joy. > > > > I'm excited to see how it stands up against any amount of traffic. > > > > Thanks for letting me pimp my wares, > > My first thought when I saw "Dream *Ledger*" was... holy cow, an > SQL-Ledger replacement done in Camping! > > Anyway congratulations! Did you use Markaby for your views? I like Markaby :) > > James > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From jamesd.earl at gmail.com Fri Jan 19 12:52:36 2007 From: jamesd.earl at gmail.com (James Earl) Date: Fri, 19 Jan 2007 10:52:36 -0700 Subject: Rendering with erb Message-ID: <7039ada60701190952r7ac7dbbcob676c2109b8a4035@mail.gmail.com> Hi, I thought it would be fun to try to write a render method that uses erb for rending. I'm not much of a programmer, but I still like to try: module Test require 'erb' def render(m) ERB.new(IO.read("templates/layout.html")).result(binding) do ERB.new(IO.read("templates/#{m}.html")).result(binding) end end end This doesn't work of course, because I can't seem to figure out how to pass a block to the layout. I can make it work just rendering index.html though. layout.html: <%= yield %> index.html: Hello <%= @name %> Anyone willing to school me on this?! :) Thanks From jamesd.earl at gmail.com Fri Jan 19 13:02:37 2007 From: jamesd.earl at gmail.com (James Earl) Date: Fri, 19 Jan 2007 11:02:37 -0700 Subject: Rendering with erb In-Reply-To: <7039ada60701190952r7ac7dbbcob676c2109b8a4035@mail.gmail.com> References: <7039ada60701190952r7ac7dbbcob676c2109b8a4035@mail.gmail.com> Message-ID: <7039ada60701191002q55f96ae8w5c0a8f25ececa99@mail.gmail.com> On 1/19/07, James Earl wrote: > Hi, I thought it would be fun to try to write a render method that > uses erb for rending. I'm not much of a programmer, but I still like > to try: > > module Test > require 'erb' > def render(m) > ERB.new(IO.read("templates/layout.html")).result(binding) do > ERB.new(IO.read("templates/#{m}.html")).result(binding) > end > end > end Replying to myself... this works, instead of using yield. Not very pretty I know :) module Test require 'erb' def render(m) content=ERB.new(IO.read("templates/#{m}.html")).result(binding) layout=ERB.new(IO.read("templates/layout.html")).result(binding) end end From manfred at gmail.com Fri Jan 19 13:12:06 2007 From: manfred at gmail.com (Manfred Stienstra) Date: Fri, 19 Jan 2007 19:12:06 +0100 Subject: Rendering with erb In-Reply-To: <7039ada60701191002q55f96ae8w5c0a8f25ececa99@mail.gmail.com> References: <7039ada60701190952r7ac7dbbcob676c2109b8a4035@mail.gmail.com> <7039ada60701191002q55f96ae8w5c0a8f25ececa99@mail.gmail.com> Message-ID: <21B8A6E0-1E51-4C36-B7E5-2B7E6D3AC459@gmail.com> On Jan 19, 2007, at 7:02 PM, James Earl wrote: > Replying to myself... this works, instead of using yield. Not very > pretty I know :) Cool, you figured it out yourself! From why at whytheluckystiff.net Fri Jan 19 17:02:13 2007 From: why at whytheluckystiff.net (why the lucky stiff) Date: Fri, 19 Jan 2007 16:02:13 -0600 Subject: Rendering with erb In-Reply-To: <7039ada60701191002q55f96ae8w5c0a8f25ececa99@mail.gmail.com> References: <7039ada60701190952r7ac7dbbcob676c2109b8a4035@mail.gmail.com> <7039ada60701191002q55f96ae8w5c0a8f25ececa99@mail.gmail.com> Message-ID: <20070119220212.GK59541@beekeeper.hobix.com> On Fri, Jan 19, 2007 at 11:02:37AM -0700, James Earl wrote: > Replying to myself... this works, instead of using yield. Not very > pretty I know :) > > module Test > require 'erb' > def render(m) > content=ERB.new(IO.read("templates/#{m}.html")).result(binding) > layout=ERB.new(IO.read("templates/layout.html")).result(binding) > end > end Hey, nice tip. You want to add this to the wiki? A good place would be CampingExtras[1]. _why [1] http://code.whytheluckystiff.net/camping/wiki/CampingExtras From jamesd.earl at gmail.com Fri Jan 19 17:34:19 2007 From: jamesd.earl at gmail.com (James Earl) Date: Fri, 19 Jan 2007 15:34:19 -0700 Subject: Rendering with erb In-Reply-To: <20070119220212.GK59541@beekeeper.hobix.com> References: <7039ada60701190952r7ac7dbbcob676c2109b8a4035@mail.gmail.com> <7039ada60701191002q55f96ae8w5c0a8f25ececa99@mail.gmail.com> <20070119220212.GK59541@beekeeper.hobix.com> Message-ID: <7039ada60701191434j161e6714oe39172c91cd719dc@mail.gmail.com> On 1/19/07, why the lucky stiff wrote: > On Fri, Jan 19, 2007 at 11:02:37AM -0700, James Earl wrote: > > Replying to myself... this works, instead of using yield. Not very > > pretty I know :) > > > > module Test > > require 'erb' > > def render(m) > > content=ERB.new(IO.read("templates/#{m}.html")).result(binding) > > layout=ERB.new(IO.read("templates/layout.html")).result(binding) > > end > > end > > Hey, nice tip. You want to add this to the wiki? A good place > would be CampingExtras[1]. > > _why Thanks! It's added. Feel free to improve the code if necessary :) http://code.whytheluckystiff.net/camping/wiki/CampingAndErb From jacob.patton at gmail.com Sat Jan 20 15:34:25 2007 From: jacob.patton at gmail.com (Jacob Patton) Date: Sat, 20 Jan 2007 14:34:25 -0600 Subject: Camping on Media Temple? Message-ID: I'm getting into camping in a big way--I love that you can put together full-fledged apps with so little code and overhead. Does anyone know of any documentation about getting Camping apps running on Media Temple's GridServer? Of course I've found the Camping server page[1], but I can't work out how to associate running camping apps with a (sub)domain on my GridServer account. 1: http://redhanded.hobix.com/inspect/theCampingServer.html Any help would be much appreciated! best, Jacob Patton From drnicwilliams at gmail.com Mon Jan 22 05:09:35 2007 From: drnicwilliams at gmail.com (Nic Williams) Date: Mon, 22 Jan 2007 20:09:35 +1000 Subject: Camping on Media Temple? In-Reply-To: References: Message-ID: <44b555bb0701220209qeb3be9bwfaf41087460238c7@mail.gmail.com> The last bullet point of this page might help: http://kb.mediatemple.net/article.php?id=024 If not... ring them up and ask (and report back here! :) Nic On 1/21/07, Jacob Patton wrote: > > I'm getting into camping in a big way--I love that you can put > together full-fledged apps with so little code and overhead. > > Does anyone know of any documentation about getting Camping apps > running on Media Temple's GridServer? Of course I've found the > Camping server page[1], but I can't work out how to associate running > camping apps with a (sub)domain on my GridServer account. > > 1: http://redhanded.hobix.com/inspect/theCampingServer.html > > Any help would be much appreciated! > > best, > > Jacob Patton > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -- Dr Nic Williams http://www.drnicwilliams.com - Ruby/Rails blog skype: nicwilliams (p) +61 7 3102 3237 (finds me anywhere in the world) (f) +61 7 3305 7572 (sends fax to my email) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20070122/770405aa/attachment.html From jamesd.earl at gmail.com Mon Jan 22 14:35:26 2007 From: jamesd.earl at gmail.com (James Earl) Date: Mon, 22 Jan 2007 12:35:26 -0700 Subject: Postamble vs campingrc Message-ID: <7039ada60701221135q41786912v89186f51bb8a1b48@mail.gmail.com> Hi, Should I be able to use the Webrick postamble instead of using .campingrc, to tell Camping I want to use mysql? It doesn't seem to be working for me. It does work however, when I'm using FastCGI (establish_connection :adapter => 'mysql'). James From kprojection at gmail.com Mon Jan 22 17:27:57 2007 From: kprojection at gmail.com (Eric Mill) Date: Mon, 22 Jan 2007 17:27:57 -0500 Subject: Postamble vs campingrc In-Reply-To: <7039ada60701221135q41786912v89186f51bb8a1b48@mail.gmail.com> References: <7039ada60701221135q41786912v89186f51bb8a1b48@mail.gmail.com> Message-ID: This may be obvious, but are you also adding on the extra parameters Mysql needs, like :username, :password, :database? -- Eric On 1/22/07, James Earl wrote: > Hi, > > Should I be able to use the Webrick postamble instead of using > .campingrc, to tell Camping I want to use mysql? It doesn't seem to > be working for me. It does work however, when I'm using FastCGI > (establish_connection :adapter => 'mysql'). > > James > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From jamesd.earl at gmail.com Mon Jan 22 17:42:55 2007 From: jamesd.earl at gmail.com (James Earl) Date: Mon, 22 Jan 2007 15:42:55 -0700 Subject: Postamble vs campingrc In-Reply-To: References: <7039ada60701221135q41786912v89186f51bb8a1b48@mail.gmail.com> Message-ID: <7039ada60701221442od94400ar65e6a79f7c88a66@mail.gmail.com> No prob, I am adding the extra parameters. I test it by just deleting/recreating the .campingrc file and reloading my app. When .campingrc isn't there, Camping will create the .camping.db and give me an error since it doesn't contain any of my tables. All the while I have this as my postamble: if __FILE__ == $0 MyApp::Models::Base.establish_connection :adapter => 'mysql', :database => 'mydb', :username => 'myuser', :password => 'mypw', :host => 'myhost' end I've also tried the complete webrick postamble example from the camping wiki with no change. As soon as I add my .campingrc back, it uses the mysql adapter without a problem. James On 1/22/07, Eric Mill wrote: > This may be obvious, but are you also adding on the extra parameters > Mysql needs, like :username, :password, :database? > > -- Eric > > On 1/22/07, James Earl wrote: > > Hi, > > > > Should I be able to use the Webrick postamble instead of using > > .campingrc, to tell Camping I want to use mysql? It doesn't seem to > > be working for me. It does work however, when I'm using FastCGI > > (establish_connection :adapter => 'mysql'). > > > > James > > _______________________________________________ > > 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 > From why at whytheluckystiff.net Mon Jan 22 18:23:22 2007 From: why at whytheluckystiff.net (why the lucky stiff) Date: Mon, 22 Jan 2007 17:23:22 -0600 Subject: Postamble vs campingrc In-Reply-To: <7039ada60701221442od94400ar65e6a79f7c88a66@mail.gmail.com> References: <7039ada60701221135q41786912v89186f51bb8a1b48@mail.gmail.com> <7039ada60701221442od94400ar65e6a79f7c88a66@mail.gmail.com> Message-ID: <20070122232322.GB72976@beekeeper.hobix.com> On Mon, Jan 22, 2007 at 03:42:55PM -0700, James Earl wrote: > No prob, I am adding the extra parameters. I test it by just > deleting/recreating the .campingrc file and reloading my app. When > .campingrc isn't there, Camping will create the .camping.db and give > me an error since it doesn't contain any of my tables. All the while > I have this as my postamble: > > if __FILE__ == $0 > MyApp::Models::Base.establish_connection :adapter => 'mysql', > :database => 'mydb', :username => 'myuser', :password => 'mypw', :host > => 'myhost' > end To use MySQL, the .campingrc would be: database: adapter: mysql database: mydb username: myuser password: mypw host: myhost Use a postamble[1] if you want your application to work without reading .campingrc. Rather than `camping myapp.rb`, use `ruby myapp.rb`. So then __FILE__ == $0. _why [1] http://code.whytheluckystiff.net/camping/wiki/PostAmbles From jamesd.earl at gmail.com Mon Jan 22 19:03:21 2007 From: jamesd.earl at gmail.com (James Earl) Date: Mon, 22 Jan 2007 17:03:21 -0700 Subject: Postamble vs campingrc In-Reply-To: <20070122232322.GB72976@beekeeper.hobix.com> References: <7039ada60701221135q41786912v89186f51bb8a1b48@mail.gmail.com> <7039ada60701221442od94400ar65e6a79f7c88a66@mail.gmail.com> <20070122232322.GB72976@beekeeper.hobix.com> Message-ID: <7039ada60701221603o26742c49iccdc5514e82eb728@mail.gmail.com> On 1/22/07, why the lucky stiff wrote: > To use MySQL, the .campingrc would be: > > database: > adapter: mysql > database: mydb > username: myuser > password: mypw > host: myhost > > Use a postamble[1] if you want your application to work without reading > .campingrc. Rather than `camping myapp.rb`, use `ruby myapp.rb`. > So then __FILE__ == $0. Thanks, everything is a lot clearer now. From jamesd.earl at gmail.com Fri Jan 26 11:51:44 2007 From: jamesd.earl at gmail.com (James) Date: Fri, 26 Jan 2007 09:51:44 -0700 Subject: Camping and DBI Message-ID: <7039ada60701260851r7c317c45r20a78b04aee936c0@mail.gmail.com> Hi, I've been playing around with using DBI instead of ActiveRecord 'cause I just love to beat myself up! ;) Is this an okay way to do this, or is there any other more creative ways? require 'dbi' module MyApp:Models class DB def self.dbh DBI.connect('DBI:Mysql:dbname', 'username', 'password') end end class Category < DB def self.find dbh.select_all('SELECT * FROM myapp_categories') end def self.find_by_id(id) dbh.select_all('SELECT * FROM myapp_categories WHERE id = ?', id) end end end module MyApp:Controllers class Index < R '/' def get @categories = Category.find render :index end end end From rcoder at gmail.com Fri Jan 26 12:27:30 2007 From: rcoder at gmail.com (Lennon Day-Reynolds) Date: Fri, 26 Jan 2007 09:27:30 -0800 Subject: Camping and DBI In-Reply-To: <7039ada60701260851r7c317c45r20a78b04aee936c0@mail.gmail.com> References: <7039ada60701260851r7c317c45r20a78b04aee936c0@mail.gmail.com> Message-ID: <5d4c61240701260927x4d809f80uf0620babb8e3947e@mail.gmail.com> On 1/26/07, James wrote: > Hi, > > I've been playing around with using DBI instead of ActiveRecord 'cause > I just love to beat myself up! ;) Is this an okay way to do this, or > is there any other more creative ways? The code looks like it'll *work*, but you're not going to get much of a performance boost over regular ActiveRecord -- esp. since you reconnect to the database for each query! Try this: --- class DB def self.dbh @dbh ||= DBI.connect('DBI:Mysql:dbname', 'username', 'password') end end --- That way, your connection will only be established once per model class, and will stay open between requests. Alternately, you could set @@dbh instead of @dbh, which would open just one connection for all your model classes, but you might have problems handling multiple simultaneous requests through a single active database handle. -Lennon From jamesd.earl at gmail.com Fri Jan 26 13:00:47 2007 From: jamesd.earl at gmail.com (James) Date: Fri, 26 Jan 2007 11:00:47 -0700 Subject: Camping and DBI In-Reply-To: <5d4c61240701260927x4d809f80uf0620babb8e3947e@mail.gmail.com> References: <7039ada60701260851r7c317c45r20a78b04aee936c0@mail.gmail.com> <5d4c61240701260927x4d809f80uf0620babb8e3947e@mail.gmail.com> Message-ID: <7039ada60701261000t15f5247fxb9b8d3119c1fd3b6@mail.gmail.com> On 1/26/07, Lennon Day-Reynolds wrote: > That way, your connection will only be established once per model > class, and will stay open between requests. Alternately, you could set > @@dbh instead of @dbh, which would open just one connection for all > your model classes, but you might have problems handling multiple > simultaneous requests through a single active database handle. Thanks, I learned something new! Would it be okay to use a constant DBH to represent the database handle? James From kprojection at gmail.com Fri Jan 26 23:28:27 2007 From: kprojection at gmail.com (Eric Mill) Date: Fri, 26 Jan 2007 23:28:27 -0500 Subject: Camping and DBI In-Reply-To: <7039ada60701261000t15f5247fxb9b8d3119c1fd3b6@mail.gmail.com> References: <7039ada60701260851r7c317c45r20a78b04aee936c0@mail.gmail.com> <5d4c61240701260927x4d809f80uf0620babb8e3947e@mail.gmail.com> <7039ada60701261000t15f5247fxb9b8d3119c1fd3b6@mail.gmail.com> Message-ID: Maybe, but does that benefit you? Constants aren't allowed to be set more than once (when you first define them), so using one as a DB connection might potentially cause problems if you ever reset it. It's also "unfashionable" in Ruby land to use constants over instance variables for this work. -- Eric On 1/26/07, James wrote: > On 1/26/07, Lennon Day-Reynolds wrote: > > That way, your connection will only be established once per model > > class, and will stay open between requests. Alternately, you could set > > @@dbh instead of @dbh, which would open just one connection for all > > your model classes, but you might have problems handling multiple > > simultaneous requests through a single active database handle. > > Thanks, I learned something new! Would it be okay to use a constant > DBH to represent the database handle? > > James > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From jamesd.earl at gmail.com Sat Jan 27 11:05:37 2007 From: jamesd.earl at gmail.com (James) Date: Sat, 27 Jan 2007 09:05:37 -0700 Subject: Camping and DBI In-Reply-To: References: <7039ada60701260851r7c317c45r20a78b04aee936c0@mail.gmail.com> <5d4c61240701260927x4d809f80uf0620babb8e3947e@mail.gmail.com> <7039ada60701261000t15f5247fxb9b8d3119c1fd3b6@mail.gmail.com> Message-ID: <7039ada60701270805m484c6f0cqbbf1f63c9814f672@mail.gmail.com> Thanks Eric, using a constant wouldn't really benefit me. I was just kinda curious as that's what I originally tried using, and while it worked I was kinda thinking to myself that "this probably isn't a good thing." I'll probably end up using ActiveRecord. I just get caught up sometimes in the memory game, and hate seeing my memory usage sky rocket as I pull large results. But if I have the memory, why not use it to my advantage! James On 1/26/07, Eric Mill wrote: > Maybe, but does that benefit you? Constants aren't allowed to be set > more than once (when you first define them), so using one as a DB > connection might potentially cause problems if you ever reset it. > It's also "unfashionable" in Ruby land to use constants over instance > variables for this work. > > -- Eric From michael.daines at gmail.com Sun Jan 28 19:32:21 2007 From: michael.daines at gmail.com (Michael Daines) Date: Sun, 28 Jan 2007 16:32:21 -0800 Subject: Camping and DBI In-Reply-To: <7039ada60701270805m484c6f0cqbbf1f63c9814f672@mail.gmail.com> References: <7039ada60701260851r7c317c45r20a78b04aee936c0@mail.gmail.com> <5d4c61240701260927x4d809f80uf0620babb8e3947e@mail.gmail.com> <7039ada60701261000t15f5247fxb9b8d3119c1fd3b6@mail.gmail.com> <7039ada60701270805m484c6f0cqbbf1f63c9814f672@mail.gmail.com> Message-ID: > I'll probably end up using ActiveRecord. I just get caught up > sometimes in the memory game, and hate seeing my memory usage sky > rocket as I pull large results. But if I have the memory, why not use > it to my advantage! If the situation is something like having an application that only requires only one or two SQL queries, then why not skip ActiveRecord? I'm interested in how one can skip the database altogether, though. This seems like something that must have come up here before? But personally, I threw together a little number I like to call DirectoryModel[1] that just keeps track of the files in a directory for a (very) small comic-strip app[2]. I bet it needs some work! I wanted to say a thing or two about that application, actually. I felt it was not a good idea to have Camping keeping track of everything, like it would be a bad idea to have it serving html pages and comic strip images, because lighttpd can do that better. What I do instead is have Camping act as a sort of primitive stand-in for WebDAV or something and post comic strip images via curl. When my app gets a PUT request, it saves the image I've sent it (which is just speech bubbles), generates the full strip image, and generates or regenerates any html files which need it. Putting this sort of way of interacting (basically, no posting html forms over http for admin stuff) with the server to use in apps interests me a fair bit, and I was going to post more about it but I fear the post I was going to make became sort of off-topic. To me this seems like an exciting and appropriate use for Camping, though! -- Michael Daines [1] http://pastie.caboo.se/36319 (sorry, no public svn repository) [2] http://penguins.mdaines.com From rcoder at gmail.com Sun Jan 28 21:54:48 2007 From: rcoder at gmail.com (Lennon Day-Reynolds) Date: Sun, 28 Jan 2007 18:54:48 -0800 Subject: Camping and DBI In-Reply-To: <7039ada60701270805m484c6f0cqbbf1f63c9814f672@mail.gmail.com> References: <7039ada60701260851r7c317c45r20a78b04aee936c0@mail.gmail.com> <5d4c61240701260927x4d809f80uf0620babb8e3947e@mail.gmail.com> <7039ada60701261000t15f5247fxb9b8d3119c1fd3b6@mail.gmail.com> <7039ada60701270805m484c6f0cqbbf1f63c9814f672@mail.gmail.com> Message-ID: <5d4c61240701281854y5c9cd241t1bc38dbb2786dd35@mail.gmail.com> On 1/27/07, James wrote: > [...] > I'll probably end up using ActiveRecord. I just get caught up > sometimes in the memory game, and hate seeing my memory usage sky > rocket as I pull large results. But if I have the memory, why not use > it to my advantage! This is one of the biggest issues with ActiveRecord, in my opinion: i.e., having to instantiate all your model objects before iterating over them. It's not just a question of RAM -- the load on the database server and network traffic are significant, too. Using DBI, you should be able to do more intelligent iteration over result sets -- esp. if you pass actual database cursor handles from your models to controller, instead of pre-fetching everything. -Lennon From rcoder at gmail.com Sun Jan 28 22:00:51 2007 From: rcoder at gmail.com (Lennon Day-Reynolds) Date: Sun, 28 Jan 2007 19:00:51 -0800 Subject: Camping and DBI In-Reply-To: References: <7039ada60701260851r7c317c45r20a78b04aee936c0@mail.gmail.com> <5d4c61240701260927x4d809f80uf0620babb8e3947e@mail.gmail.com> <7039ada60701261000t15f5247fxb9b8d3119c1fd3b6@mail.gmail.com> <7039ada60701270805m484c6f0cqbbf1f63c9814f672@mail.gmail.com> Message-ID: <5d4c61240701281900s2e6a898dm9540a2ef3b3c85d2@mail.gmail.com> On 1/28/07, Michael Daines wrote: > I'm interested in how one can skip the database altogether, though. > This seems like something that must have come up here before? But > personally, I threw together a little number I like to call > DirectoryModel[1] that just keeps track of the files in a directory > for a (very) small comic-strip app[2]. I bet it needs some work! I tend to use YAML::Store as a sort of poor-man's database for simple apps like that. There's also a module called 'fsdb' I used for a couple of projects which, IIRC, uses a one-file-per-object model for persistent storage. Running a full-featured client/server SQL database engine for applications that have only a handful of users is often overkill. -Lennon From kprojection at gmail.com Mon Jan 29 00:05:06 2007 From: kprojection at gmail.com (Eric Mill) Date: Mon, 29 Jan 2007 00:05:06 -0500 Subject: Camping and DBI In-Reply-To: <5d4c61240701281900s2e6a898dm9540a2ef3b3c85d2@mail.gmail.com> References: <7039ada60701260851r7c317c45r20a78b04aee936c0@mail.gmail.com> <5d4c61240701260927x4d809f80uf0620babb8e3947e@mail.gmail.com> <7039ada60701261000t15f5247fxb9b8d3119c1fd3b6@mail.gmail.com> <7039ada60701270805m484c6f0cqbbf1f63c9814f672@mail.gmail.com> <5d4c61240701281900s2e6a898dm9540a2ef3b3c85d2@mail.gmail.com> Message-ID: > Running a full-featured client/server SQL database engine for > applications that have only a handful of users is often overkill. Agreed -- I think this is one of the reasons why pushes SQLite so much and makes it the default DB engine for Camping. I've started hearing things about Kirbybase (http://www.netpromi.com/kirbybase_ruby.html) though. It's a non-SQL storage engine, uses pleasant Ruby syntax and blocks, and stores data in flat, easy to edit files. Has anyone used it? Is it any better than using Yaml? -- Eric On 1/28/07, Lennon Day-Reynolds wrote: > On 1/28/07, Michael Daines wrote: > > I'm interested in how one can skip the database altogether, though. > > This seems like something that must have come up here before? But > > personally, I threw together a little number I like to call > > DirectoryModel[1] that just keeps track of the files in a directory > > for a (very) small comic-strip app[2]. I bet it needs some work! > > I tend to use YAML::Store as a sort of poor-man's database for simple > apps like that. There's also a module called 'fsdb' I used for a > couple of projects which, IIRC, uses a one-file-per-object model for > persistent storage. > > > -Lennon > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From michael.daines at gmail.com Mon Jan 29 00:09:13 2007 From: michael.daines at gmail.com (Michael Daines) Date: Sun, 28 Jan 2007 21:09:13 -0800 Subject: Camping and DBI In-Reply-To: <5d4c61240701281900s2e6a898dm9540a2ef3b3c85d2@mail.gmail.com> References: <7039ada60701260851r7c317c45r20a78b04aee936c0@mail.gmail.com> <5d4c61240701260927x4d809f80uf0620babb8e3947e@mail.gmail.com> <7039ada60701261000t15f5247fxb9b8d3119c1fd3b6@mail.gmail.com> <7039ada60701270805m484c6f0cqbbf1f63c9814f672@mail.gmail.com> <5d4c61240701281900s2e6a898dm9540a2ef3b3c85d2@mail.gmail.com> Message-ID: <04CDBEA3-CBB8-459C-8BC4-A732706E9F23@gmail.com> > I tend to use YAML::Store as a sort of poor-man's database for simple > apps like that. There's also a module called 'fsdb' I used for a > couple of projects which, IIRC, uses a one-file-per-object model for > persistent storage. Wish I'd taken the time to look around... I have certainly implemented a poor copy of YAML::Store before! From hhausman at gmail.com Mon Jan 29 01:39:28 2007 From: hhausman at gmail.com (Harold Hausman) Date: Mon, 29 Jan 2007 14:39:28 +0800 Subject: Camping and DBI In-Reply-To: References: <7039ada60701260851r7c317c45r20a78b04aee936c0@mail.gmail.com> <5d4c61240701260927x4d809f80uf0620babb8e3947e@mail.gmail.com> <7039ada60701261000t15f5247fxb9b8d3119c1fd3b6@mail.gmail.com> <7039ada60701270805m484c6f0cqbbf1f63c9814f672@mail.gmail.com> <5d4c61240701281900s2e6a898dm9540a2ef3b3c85d2@mail.gmail.com> Message-ID: On 1/29/07, Eric Mill wrote: > > Running a full-featured client/server SQL database engine for > > applications that have only a handful of users is often overkill. > > Agreed -- I think this is one of the reasons why pushes SQLite so much > and makes it the default DB engine for Camping. I've started hearing > things about Kirbybase (http://www.netpromi.com/kirbybase_ruby.html) > though. It's a non-SQL storage engine, uses pleasant Ruby syntax and > blocks, and stores data in flat, easy to edit files. Has anyone used > it? Is it any better than using Yaml? > > -- Eric > Kirbybase is mind-blowingly awesome. It's better than yaml for doing DB like things because when you update a record it actually updates the record in-place in the file (if it can) instead of having to regenerate the entire file. Also, it has slightly more evolved 'select' like methods and things. (: I've used it in several of my own projects (stuff that was done before camping existed) to great effect. The fact that it's pure Ruby is just beautiful. In my uber-humble opinion, distributing gem wrappers for C stuff (sqlite for example) is still a bit tougher to do in a heavily cross-platform situation. Recently I've been using sqlite since I've been working on slightly larger apps that target a single platform ... IIS :( *barf* ... But I've found a nice combination of ruby-web.exe, sqlite3, and ArrayFields that keeps me pretty productive. I keep telling myself that I'm going to try to get camping running on IIS, but I don't know really where to start. I guess I could use one of the post-amble CGI versions and run it using Ruby as an ISAPI filter, but I don't know much about active record. I'm pretty sure that the ISAPI filter method would start a new copy of the interpreter for each page request which I think is a recipe for disaster with ActiveRecord. (?) Sorry to get off topic. :P At one point someone was working on an ActiveRecord - Kirbybase bridge called "Akbar" ... But I think it rusted from disuse... Kirbybase/Akbar/Camping sounds like fun though... heh, -Harold