From tieg.zaharia at gmail.com Sun Oct 1 23:34:27 2006 From: tieg.zaharia at gmail.com (Tieg Zaharia) Date: Sun, 1 Oct 2006 21:34:27 -0600 Subject: Problems Deploying a Camping app on TxD Message-ID: <156c5bc40610012034t10b4bbc3w4ffc97ddfe1c9f84@mail.gmail.com> So I've been trying all day to get a small camping app I wrote up on Textdrive to no avail. Right now I'm getting a 500 error when I go to the site, and it spits this out (from lightty after i restart it and make a request to the app): (eval):13:in `initialize': undefined method `to_hash' for # (NoMethodError) from (eval):44:in `run' from /users/home/me/web/app/app.rb:227 from /users/home/me/web/app/app.rb:225 ...the line in the app that it's referring to (225) is in the postamble, the FCGI part: if __FILE__ == $0 require 'fcgi' Dir.chdir(File.dirname(__FILE__)) Appname::Models::Base.establish_connection :adapter => 'sqlite3', :database => 'appname.db' Appname::Models::Base.logger = Logger.new('camping.log') Appname.create FCGI.each do |req| # line 225 ENV.replace req.env Appname.run(req.in, req.out) # line 227 req.finish end end And just in case it helps, this is the vhost file from lightty for this app (I'm running 2 rails apps on this server and they're working fine): $HTTP["host"] =~ "appname\.mydomain\.com" { server.document-root = base + "/web/appname/" server.error-handler-404 = "appname.rb" fastcgi.server = ( ".rb" => ( "localhost" => ( "socket" => base + "/var/run/appname-0.socket", "bin-path" => base + "/web/appname/appname.rb", "max-procs" => 1, "check-local" => "disable" ) ) ) } The lightty error log is giving me this everytime I get that 500 error: (mod_fastcgi.c.3215) response not received, request sent: 1236 on socket: unix:/users/home/me/var/run/appname-0.socket-0 for /users/home/me/web/appname/appname.rb , closing connection Does it look familiar to anyone? -tieg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20061001/4a265416/attachment-0001.html From tieg.zaharia at gmail.com Mon Oct 2 00:46:28 2006 From: tieg.zaharia at gmail.com (Tieg Zaharia) Date: Sun, 1 Oct 2006 22:46:28 -0600 Subject: Problems Deploying a Camping app on TxD In-Reply-To: <156c5bc40610012034t10b4bbc3w4ffc97ddfe1c9f84@mail.gmail.com> References: <156c5bc40610012034t10b4bbc3w4ffc97ddfe1c9f84@mail.gmail.com> Message-ID: <156c5bc40610012146i486213ceyf8c400f8e5609bd0@mail.gmail.com> FCGI problem fixed! I was using the old postamble fcgi method instead of the one from the new docs. There are still bugs to be worked out but I'm tired. Must remember: work smarter, not harder. -tieg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20061001/39c42c7c/attachment.html From why at whytheluckystiff.net Tue Oct 3 17:33:37 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Tue, 3 Oct 2006 16:33:37 -0500 Subject: ! camping 1.5 + markaby 0.5 Message-ID: <20061003213337.GP73830@lstsv-3264.layeredtech.com> Not too different from their corresponding last releases, but documentation has been filled in for both. To upgrade: gem install camping --source code.whytheluckystiff.net And, here is a complete changelog: == Camping 1.5 * Camping::Apps stores an array of classes for all loaded apps. * bin/camping can be given a directory. Like: camping examples/ * Console mode -- thank zimbatm. Use: camping -C yourapp.rb * Call controllers with Camping.method_missing. Tepee.get(:Index) #=> (Response) Blog.post(:Delete, id) #=> (Response) Blog.post(:Login, :input => {'username' => 'admin', 'password' => 'camping'}) #=> # Blog.get(:Info, :env => {:HTTP_HOST => 'wagon'}) #=> #'wagon'} ...> * Using \r\n instead of \n on output. FastCGI has these needs. * ActiveRecord no longer required or installed. * If you refer to Models::Base, however, ActiveRecord will be loaded with autoload. (see lib/camping/db.rb) * new Camping::FastCGI.serve which will serve a whole directory of apps (see http://code.whytheluckystiff.net/camping/wiki/TheCampingServer) * ~/.campingrc can contain database connection info if you want your default to be something other than SQLite. database: adapter: mysql username: camping socket: /tmp/mysql.sock password: NOFORESTFIRES database: camping * controllers are now *ordered*. uses the inherited hook to keep track of all classes created with R. those classes are scanned, in order, when a request is made. any other controllers are handled first. so if you plan on overriding the urls method, be sure to subclass from R(). * Console mode will load .irbrc in the working directory, if present. (for example, in my ~/git/balloon directory, i have this in the .irbrc: include Balloon::Models when camping -C balloon.rb gets run, the models all get included in main.) * And, of course, many other bugfixes from myself and the loyal+kind zimbatm... * Markaby updated to 0.5. (See its CHANGELOG.) == Markaby 0.5 * XHTML Validation built in. So, if you have an invalid tag: error. Invalid attribute: error. And two identical IDs in the same document: error. Optional, of course. But handy! * New Markaby::Fragment class adds much flexibility. If it discovers you are using a tag as a string, the tag is removed from the stream. (div { strong("Real") + " Giraffes" }) * The prevailing rule now is: if you want it escaped, pass it to a block. If not, pass it as an arg. * Again, escaped: h1("Me & You Have a Giraffe") * And, not escaped: h1 { "Home" } * Less method_missing, meaning: faster calls all around. Tag methods generated based on doctype. * The html method doesn't write the doctype tags and meta tags. You must use xhtml_transitional or xhtml_strict methods to do that. * The img method doesn't try to inject an empty alt tag and a zero border. No more of that. _why From tlockney at gmail.com Tue Oct 3 20:09:01 2006 From: tlockney at gmail.com (Thomas Lockney) Date: Tue, 3 Oct 2006 17:09:01 -0700 Subject: ! camping 1.5 + markaby 0.5 In-Reply-To: <20061003213337.GP73830@lstsv-3264.layeredtech.com> References: <20061003213337.GP73830@lstsv-3264.layeredtech.com> Message-ID: Maybe I'm just super sleep deprived (ok, that's for certain), but aren't the following statements contradictory? On 10/3/06, why the lucky stiff wrote: > * The prevailing rule now is: if you want it escaped, pass it to a block. If > not, pass it as an arg. > * Again, escaped: h1("Me & You Have a Giraffe") > * And, not escaped: h1 { "Home" } ~thomas From why at whytheluckystiff.net Wed Oct 4 02:39:50 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Wed, 4 Oct 2006 01:39:50 -0500 Subject: ! camping 1.5 + markaby 0.5 In-Reply-To: References: <20061003213337.GP73830@lstsv-3264.layeredtech.com> Message-ID: <20061004063950.GB13218@lstsv-3264.layeredtech.com> On Tue, Oct 03, 2006 at 05:09:01PM -0700, Thomas Lockney wrote: > Maybe I'm just super sleep deprived (ok, that's for certain), but > aren't the following statements contradictory? > > On 10/3/06, why the lucky stiff wrote: > > * The prevailing rule now is: if you want it escaped, pass it to a block. If > > not, pass it as an arg. In fact, right, this is wrong. The prevailing rule now is: if I wrote it wrong, it's now right. If not, well: no, it's definitely wrong and now right. _why From zimba.tm at gmail.com Wed Oct 4 03:41:28 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Wed, 4 Oct 2006 09:41:28 +0200 Subject: ! camping 1.5 + markaby 0.5 In-Reply-To: References: <20061003213337.GP73830@lstsv-3264.layeredtech.com> Message-ID: <3ff63f9b0610040041m5bcc0ba3o5127aae5562e3687@mail.gmail.com> On 04/10/06, Thomas Lockney wrote: > Maybe I'm just super sleep deprived (ok, that's for certain), but > aren't the following statements contradictory? > > On 10/3/06, why the lucky stiff wrote: > > * The prevailing rule now is: if you want it escaped, pass it to a block. If > > not, pass it as an arg. > > * Again, escaped: h1("Me & You Have a Giraffe") > > * And, not escaped: h1 { "Home" } yes but the example is correct. _why, thanks for that release :) Let's define a enterprisy roadmap for 1.6 -- Cheers, zimbatm http://zimbatm.oree.ch From manfred at gmail.com Wed Oct 4 05:08:04 2006 From: manfred at gmail.com (Manfred Stienstra) Date: Wed, 4 Oct 2006 11:08:04 +0200 Subject: ! camping 1.5 + markaby 0.5 In-Reply-To: <20061004063950.GB13218@lstsv-3264.layeredtech.com> References: <20061003213337.GP73830@lstsv-3264.layeredtech.com> <20061004063950.GB13218@lstsv-3264.layeredtech.com> Message-ID: <70FDFC27-C1EF-420A-AE28-B73A4998A8DF@gmail.com> On 4-okt-2006, at 8:39, why the lucky stiff wrote: > > In fact, right, this is wrong. The prevailing rule now is: if I > wrote it wrong, > it's now right. If not, well: no, it's definitely wrong and now > right. Ah! Right, thanks for clearing that up (: From why at whytheluckystiff.net Thu Oct 5 00:32:47 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Wed, 4 Oct 2006 23:32:47 -0500 Subject: + camping and mongrel issues Message-ID: <20061005043247.GD13218@lstsv-3264.layeredtech.com> I've been having some trouble with certain apps under Camping with Mongrel, particularly when lots of static files get served. So, I've borrowed some ideas from the RailsHandler and tightened up the Mongrel::Camping classes which come with Mongrel. If you're having any troubles or want to test it out, update from Mongrel SVN and then `rake install`. It should produce a 0.3.13.5 gem. _why From zimba.tm at gmail.com Fri Oct 6 15:05:19 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Fri, 6 Oct 2006 21:05:19 +0200 Subject: + camping and mongrel issues In-Reply-To: <20061005043247.GD13218@lstsv-3264.layeredtech.com> References: <20061005043247.GD13218@lstsv-3264.layeredtech.com> Message-ID: <3ff63f9b0610061205k20eafe1bq8163f6bc4c0e2d8d@mail.gmail.com> Hi _why, I also have a patch for the CampingHandler that catches camping exception better. I also removed the postable since we now have the camping server -- Cheers, zimbatm http://zimbatm.oree.ch -------------- next part -------------- A non-text attachment was scrubbed... Name: mongrel-camping.diff Type: text/x-patch Size: 1343 bytes Desc: not available Url : http://rubyforge.org/pipermail/camping-list/attachments/20061006/b21e041d/attachment.bin From joeat303 at yahoo.com Sat Oct 14 13:57:35 2006 From: joeat303 at yahoo.com (Joe Ruby) Date: Sat, 14 Oct 2006 10:57:35 -0700 (PDT) Subject: [Markaby] Any workaround for Rails caching? Message-ID: <20061014175735.62642.qmail@web38613.mail.mud.yahoo.com> The ability to use Rails' caching is very important to me. Is there any way at all to get Rails caching working with Markaby templates? Right now if I use cache tags, I get some "length" error. Thanks, Joe __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From boss at topfunky.com Sat Oct 14 14:49:53 2006 From: boss at topfunky.com (Geoffrey Grosenbach) Date: Sat, 14 Oct 2006 11:49:53 -0700 Subject: [Markaby] Any workaround for Rails caching? In-Reply-To: <20061014175735.62642.qmail@web38613.mail.mud.yahoo.com> References: <20061014175735.62642.qmail@web38613.mail.mud.yahoo.com> Message-ID: On Oct 14, 2006, at 10:57 AM, Joe Ruby wrote: > The ability to use Rails' caching is very important to > me. Is there any way at all to get Rails caching > working with Markaby templates? Right now if I use > cache tags, I get some "length" error. Do you mean page caching? I'm using page caching with a markaby project and it works fine. Could you paste the error message you are getting? Geoff ...................................... Blog | http://nubyonrails.com Podcast | http://podcast.rubyonrails.org Workshops | http://rubyonrailsworkshops.com Screencasts | http://peepcode.com From joeat303 at yahoo.com Sat Oct 14 15:05:14 2006 From: joeat303 at yahoo.com (Joe Ruby) Date: Sat, 14 Oct 2006 12:05:14 -0700 (PDT) Subject: [Markaby] Any workaround for Rails caching? Message-ID: <20061014190514.21675.qmail@web38604.mail.mud.yahoo.com> > On Oct 14, 2006, at 10:57 AM, Joe Ruby wrote: > > The ability to use Rails' caching is very important to > > me. Is there any way at all to get Rails caching > > working with Markaby templates? Right now if I use > > cache tags, I get some "length" error. > > Do you mean page caching? I'm using page caching with a markaby > project and it works fine. > > Could you paste the error message you are getting? > > Geoff I mean fragment caching. I get errors like this: ActionView::TemplateError (/usr/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/builder.rb:192:in `method_missing': no such method `length') on line #0 of app/views/items/index.mab: 1: 2: cache("#{@site.server_name}/index_items") do Joe __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From joeat303 at yahoo.com Sat Oct 21 14:19:32 2006 From: joeat303 at yahoo.com (Joe Ruby) Date: Sat, 21 Oct 2006 11:19:32 -0700 (PDT) Subject: @helpers no longer required? Message-ID: <20061021181932.89982.qmail@web38601.mail.mud.yahoo.com> After updating to the latest version of Markaby, I've noticed that @helpers doesn't seem to be necessary when accessing params, flash, etc. and named routes (*_url) in Rails. Is and will @helpers no longer be necessary? (And if so, let me be the first to say YAY!) Thanks, Joe __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From michael.gorsuch at gmail.com Sun Oct 22 19:19:19 2006 From: michael.gorsuch at gmail.com (Michael Gorsuch) Date: Sun, 22 Oct 2006 19:19:19 -0400 Subject: Date Helpers? Message-ID: <2a3f927b0610221619j3a05b0adv1e2d4875beb8887f@mail.gmail.com> Does anyone have any ideas off the top of there head how to easily construct a date helper as one would see in Rails? Thanks, Michael Gorsuch http://www.styledbits.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20061022/7dda5a52/attachment.html From manfred at gmail.com Mon Oct 23 03:16:41 2006 From: manfred at gmail.com (Manfred Stienstra) Date: Mon, 23 Oct 2006 09:16:41 +0200 Subject: Date Helpers? In-Reply-To: <2a3f927b0610221619j3a05b0adv1e2d4875beb8887f@mail.gmail.com> References: <2a3f927b0610221619j3a05b0adv1e2d4875beb8887f@mail.gmail.com> Message-ID: <6F689264-20C4-4684-945A-236D1A0D0E38@gmail.com> On Oct 23, 2006, at 1:19 AM, Michael Gorsuch wrote: > Does anyone have any ideas off the top of there head how to easily > construct a date helper as one would see in Rails? You can just look at the action_pack source and copy it? Manfred From zimba.tm at gmail.com Mon Oct 23 03:32:52 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Mon, 23 Oct 2006 09:32:52 +0200 Subject: Date Helpers? In-Reply-To: <2a3f927b0610221619j3a05b0adv1e2d4875beb8887f@mail.gmail.com> References: <2a3f927b0610221619j3a05b0adv1e2d4875beb8887f@mail.gmail.com> Message-ID: <3ff63f9b0610230032w3a689dc8ke33842316c901419@mail.gmail.com> Here is an example : module DateHelper def select_day(date, options={}) default_opts = { :name => 'day' } options = default_opts.merge(options) select opts do for each day in month of date "date" do |d| # replace that with valid code if d == date.mday option d, :selected=>'selected' else option d end end end end You can then use that module in your application like that : Camping.goes :YourApp module YourApp::Helpers include DateHelpers end And now you have some new methods in your view and controllers. On 23/10/06, Michael Gorsuch wrote: > Does anyone have any ideas off the top of there head how to easily construct > a date helper as one would see in Rails? > > Thanks, > > Michael Gorsuch > http://www.styledbits.com > > -- Cheers, zimbatm http://zimbatm.oree.ch From michael.gorsuch at gmail.com Mon Oct 23 09:05:25 2006 From: michael.gorsuch at gmail.com (Michael Gorsuch) Date: Mon, 23 Oct 2006 09:05:25 -0400 Subject: Date Helpers? In-Reply-To: <3ff63f9b0610230032w3a689dc8ke33842316c901419@mail.gmail.com> References: <2a3f927b0610221619j3a05b0adv1e2d4875beb8887f@mail.gmail.com> <3ff63f9b0610230032w3a689dc8ke33842316c901419@mail.gmail.com> Message-ID: <2a3f927b0610230605x2c99c2c3h2e682360c27237b2@mail.gmail.com> Thanks, zimbatm. I'll dig into this later tonight. I appreciate the pointer. On 10/23/06, Jonas Pfenniger wrote: > > Here is an example : > > module DateHelper > > def select_day(date, options={}) > default_opts = { :name => 'day' } > options = default_opts.merge(options) > select opts do > for each day in month of date "date" do |d| # replace that with > valid code > if d == date.mday > option d, :selected=>'selected' > else > option d > end > end > end > > end > > > You can then use that module in your application like that : > > Camping.goes :YourApp > > module YourApp::Helpers > include DateHelpers > end > > And now you have some new methods in your view and controllers. > > > On 23/10/06, Michael Gorsuch wrote: > > Does anyone have any ideas off the top of there head how to easily > construct > > a date helper as one would see in Rails? > > > > Thanks, > > > > Michael Gorsuch > > http://www.styledbits.com > > > > > > > -- > Cheers, > zimbatm > > http://zimbatm.oree.ch > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20061023/0c1ac0ee/attachment.html From twoggle at gmail.com Thu Oct 26 05:09:39 2006 From: twoggle at gmail.com (Tim Fletcher) Date: Thu, 26 Oct 2006 10:09:39 +0100 Subject: [Markaby] Any workaround for Rails caching? Message-ID: > I mean fragment caching. I get errors like this: > > ActionView::TemplateError > (/usr/lib/ruby/gems/1.8/gems/markaby-0.5/lib/markaby/builder.rb:192:in > `method_missing': no such method `length') on line #0 > of app/views/items/index.mab: > 1: > 2: cache("#{@site.server_name}/index_items") do > > > Joe Yep, the length error is because a lot of Rails' internals still assume ERB, which uses a different buffer structure to Markaby. I'll try to get it working soon. Cheers, Tim From michael.gorsuch at gmail.com Sat Oct 28 12:40:43 2006 From: michael.gorsuch at gmail.com (Michael Gorsuch) Date: Sat, 28 Oct 2006 12:40:43 -0400 Subject: Mounting an app as '/' under Apache? Message-ID: <2a3f927b0610280940g4724f13bkfa4bef8d5682d462@mail.gmail.com> Hello everyone, I have a site with a collection of camping apps. I'm trying to force one of them, blog.rb, to run as the index ('/'). I think that I understand the RDoc as stating that I can execute the following to make that happen: Camping::FastCGI.serve File.expand_path(current), Blog But, when doing so, I recieve the following error: Camping Problem!*/*/NoMethodError undefined method `has_key?' for nil:NilClass - /home/styledbits/local/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/fastcgi.rb:176:in `serve' - /home/styledbits/local/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/fastcgi.rb:173:in `each' - /home/styledbits/local/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/fastcgi.rb:173:in `serve' - /home/styledbits/local/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/fastcgi.rb:90:in `start' - /home/styledbits/local/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/fastcgi.rb:75:in `each' - /home/styledbits/local/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/fastcgi.rb:75:in `start' - /home/styledbits/local/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/fastcgi.rb:172:in `serve' - dispatch.fcgi:9 I'm stuck trying to understand what exactly is breaking down here. I'm trying to get Apache running on my dev box to check into this further. My dispatch.fcgi file follows: #!/usr/bin/env ruby current = File.dirname(__FILE__) require 'rubygems' require 'camping/fastcgi' ENV['FORCE_ROOT'] = "1" Camping::Models::Base.establish_connection :adapter => 'sqlite3', :database => File.expand_path(current + '/camping.db') Camping::FastCGI.serve File.expand_path(current), Blog *** Any ideas? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20061028/3a469f62/attachment.html From why at whytheluckystiff.net Sat Oct 28 16:09:35 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Sat, 28 Oct 2006 15:09:35 -0500 Subject: Mounting an app as '/' under Apache? In-Reply-To: <2a3f927b0610280940g4724f13bkfa4bef8d5682d462@mail.gmail.com> References: <2a3f927b0610280940g4724f13bkfa4bef8d5682d462@mail.gmail.com> Message-ID: <20061028200934.GB72879@lstsv-3264.layeredtech.com> On Sat, Oct 28, 2006 at 12:40:43PM -0400, Michael Gorsuch wrote: > Hello everyone, I have a site with a collection of camping apps. I'm trying > to force one of them, blog.rb, to run as the index ('/'). [...] > require 'rubygems' > require 'camping/fastcgi' > ENV['FORCE_ROOT'] = "1" > Camping::Models::Base.establish_connection :adapter => 'sqlite3', :database > => File.expand_path(current + '/camping.db') > Camping::FastCGI.serve File.expand_path(current), Blog I believe you will need to load the blog app first in order to reference the Blog const you have there. But on further looking at this, I think I need to improve things to work like this: Camping::FastCGI.serve File.expand_path(current), :index => "/blog" With an optional {:redirect => true} options or such to indicate whether the app is to be moved to root or simply aliased there. I could use some other thoughts on this. _why From michael.gorsuch at gmail.com Sat Oct 28 16:57:57 2006 From: michael.gorsuch at gmail.com (Michael Gorsuch) Date: Sat, 28 Oct 2006 16:57:57 -0400 Subject: Mounting an app as '/' under Apache? In-Reply-To: <20061028200934.GB72879@lstsv-3264.layeredtech.com> References: <2a3f927b0610280940g4724f13bkfa4bef8d5682d462@mail.gmail.com> <20061028200934.GB72879@lstsv-3264.layeredtech.com> Message-ID: <2a3f927b0610281357o25bd256ex5b73e973a22013bb@mail.gmail.com> Yes - I had to run the reloader against 'blog.rb' first. That still didn't account for the issue with the reference to @mounts in the class method. I like your proposal - I think that is VERY clear and clean. On 10/28/06, why the lucky stiff wrote: > > On Sat, Oct 28, 2006 at 12:40:43PM -0400, Michael Gorsuch wrote: > > Hello everyone, I have a site with a collection of camping apps. I'm > trying > > to force one of them, blog.rb, to run as the index ('/'). > > [...] > > > require 'rubygems' > > require 'camping/fastcgi' > > ENV['FORCE_ROOT'] = "1" > > Camping::Models::Base.establish_connection :adapter => 'sqlite3', > :database > > => File.expand_path(current + '/camping.db') > > Camping::FastCGI.serve File.expand_path(current), Blog > > I believe you will need to load the blog app first in order to reference > the > Blog const you have there. > > But on further looking at this, I think I need to improve things to work > like > this: > > Camping::FastCGI.serve File.expand_path(current), :index => "/blog" > > With an optional {:redirect => true} options or such to indicate whether > the app > is to be moved to root or simply aliased there. I could use some other > thoughts > on this. > > _why > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20061028/89a7ff02/attachment.html From michael.gorsuch at gmail.com Sat Oct 28 17:02:44 2006 From: michael.gorsuch at gmail.com (Michael Gorsuch) Date: Sat, 28 Oct 2006 17:02:44 -0400 Subject: Mounting an app as '/' under Apache? In-Reply-To: <2a3f927b0610281357o25bd256ex5b73e973a22013bb@mail.gmail.com> References: <2a3f927b0610280940g4724f13bkfa4bef8d5682d462@mail.gmail.com> <20061028200934.GB72879@lstsv-3264.layeredtech.com> <2a3f927b0610281357o25bd256ex5b73e973a22013bb@mail.gmail.com> Message-ID: <2a3f927b0610281402l64207e74j6678965d19c8132b@mail.gmail.com> Ha! You know, that response probably didn't make much sense. I actually thought this was a message regarding a bug I submitted to your Trac system. It was ticket #104. I had to patch the 1.5 source to get around the exception I was receiving after I figured out that I needed to preload my Blog class. Sorry about that. On 10/28/06, Michael Gorsuch wrote: > > Yes - I had to run the reloader against 'blog.rb' first. That still > didn't account for the issue with the reference to @mounts in the class > method. > > I like your proposal - I think that is VERY clear and clean. > > On 10/28/06, why the lucky stiff wrote: > > > > On Sat, Oct 28, 2006 at 12:40:43PM -0400, Michael Gorsuch wrote: > > > Hello everyone, I have a site with a collection of camping apps. I'm > > trying > > > to force one of them, blog.rb, to run as the index ('/'). > > > > [...] > > > > > require 'rubygems' > > > require 'camping/fastcgi' > > > ENV['FORCE_ROOT'] = "1" > > > Camping::Models::Base.establish_connection :adapter => 'sqlite3', > > :database > > > => File.expand_path (current + '/camping.db') > > > Camping::FastCGI.serve File.expand_path(current), Blog > > > > I believe you will need to load the blog app first in order to reference > > the > > Blog const you have there. > > > > But on further looking at this, I think I need to improve things to work > > like > > this: > > > > Camping::FastCGI.serve File.expand_path(current), :index => "/blog" > > > > With an optional {:redirect => true} options or such to indicate whether > > the app > > is to be moved to root or simply aliased there. I could use some other > > thoughts > > on this. > > > > _why > > _______________________________________________ > > Camping-list mailing list > > Camping-list at rubyforge.org > > http://rubyforge.org/mailman/listinfo/camping-list > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20061028/781a5bee/attachment-0001.html From why at whytheluckystiff.net Sun Oct 29 01:57:18 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Sun, 29 Oct 2006 01:57:18 -0500 Subject: Mounting an app as '/' under Apache? In-Reply-To: <2a3f927b0610281402l64207e74j6678965d19c8132b@mail.gmail.com> References: <2a3f927b0610280940g4724f13bkfa4bef8d5682d462@mail.gmail.com> <20061028200934.GB72879@lstsv-3264.layeredtech.com> <2a3f927b0610281357o25bd256ex5b73e973a22013bb@mail.gmail.com> <2a3f927b0610281402l64207e74j6678965d19c8132b@mail.gmail.com> Message-ID: <20061029065718.GC72879@lstsv-3264.layeredtech.com> On Sat, Oct 28, 2006 at 05:02:44PM -0400, Michael Gorsuch wrote: > It was ticket #104. I had to patch the 1.5 source to get around the > exception I was receiving after I figured out that I needed to preload my > Blog class. Well, well, look at that. Lovely! So, thanks for stepping in and just right stamping on that nasty thing straightway. Kabllooom. Triumpfant. _why From why at whytheluckystiff.net Tue Oct 31 12:01:47 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Tue, 31 Oct 2006 11:01:47 -0600 Subject: ! camping-omnibus 1.5.176 Message-ID: <20061031170146.GC76763@lstsv-3264.layeredtech.com> gem install camping-omnibus --source code.whytheluckystiff.net Considering the number of optional dependencies now in Camping, I've put together an eigengem which will load all of the recommended libraries that most devoted campers will want: ActiveRecord, Mongrel, SQLite3, RedCloth and the acts_as_versioned gem. (Those last two are used in the examples.) Stuff like mosquito and equipment could go in this, too. Probably up to twenty libs is good. It's an omnibus, which means *B!G*. _why