From why at whytheluckystiff.net Thu Jul 6 03:12:07 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Thu, 6 Jul 2006 02:12:07 -0500 Subject: + camping 1.4.120 Message-ID: <20060706071207.GB10933@lstsv-3264.layeredtech.com> Okay, let's see. gem install camping --source code.whytheluckystiff.net A bunch of great stuff. * Camping::Apps stores constants for all loaded apps. * bin/camping can be given a directory. [1] 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) (This is experimental, will probably change.) * Using \r\n instead of \n on output. FastCGI has these needs. _why [1] http://code.whytheluckystiff.net/camping/wiki/TheCampingServer From why at whytheluckystiff.net Thu Jul 6 10:43:34 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Thu, 6 Jul 2006 09:43:34 -0500 Subject: Trac/SVN access Message-ID: <20060706144334.GC10933@lstsv-3264.layeredtech.com> Incident to the volume of spam which is being hurriedly stuffd into any of the myriad of crevices which Trac exposes, I've locked down the wiki and ticketing system to allow only the truly dedicated student of Camping. As always, your access can be had at: https://code.whytheluckystiff.net/access/ Then you may login with one fell click to a very low link on the Trac site. Sorry for th inconvenience, naturally I'm okay if you post your tickets here or to the occassional camping threads on my Ruby-related blog. [1] _why [1] http://redhanded.hobix.com From why at whytheluckystiff.net Wed Jul 12 15:03:45 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Wed, 12 Jul 2006 14:03:45 -0500 Subject: + camping 1.4.123 Message-ID: <20060712190345.GB18507@lstsv-3264.layeredtech.com> And now: gem install camping --source code.whytheluckystiff.net I hope this will be the last development release before 1.5. * 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 TheCampingServer[1]) * you can now issue POSTs with the Camping method proxy. also, set environment variables and query vars. Blog.post(:Login, :input => {'username' => 'admin', 'password' => 'camping'}) #=> # Blog.get(:Info, :env => {:HTTP_HOST => 'wagon'}) #=> #'wagon'} ...> * ~/.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(). * the private `markaview` method has gone away. use `markaby` method, if you really need to. * 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... _why [1] https://code.whytheluckystiff.net/camping/wiki/TheCampingServer From why at whytheluckystiff.net Wed Jul 12 15:42:00 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Wed, 12 Jul 2006 14:42:00 -0500 Subject: + camping 1.4.134 In-Reply-To: <20060712190345.GB18507@lstsv-3264.layeredtech.com> References: <20060712190345.GB18507@lstsv-3264.layeredtech.com> Message-ID: <20060712194200.GC18507@lstsv-3264.layeredtech.com> Check that. It's the 1.4.134 release. _why From lninyo at gmail.com Sat Jul 15 11:27:58 2006 From: lninyo at gmail.com (Amr Malik) Date: Sat, 15 Jul 2006 11:27:58 -0400 Subject: Hello Message-ID: Hello, just checking into the amazing world famous 4k web-framework mailing list esquire! -El -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060715/f1f487ee/attachment.html From nertzy at gmail.com Sat Jul 15 11:32:49 2006 From: nertzy at gmail.com (Grant Hutchins) Date: Sat, 15 Jul 2006 15:32:49 +0000 Subject: Hello In-Reply-To: References: Message-ID: Hi Amr, Welcome! Oh wait, I just joined too. Hello list people. By the way, _why, what happened to hookwink.d? I just joined and now it's busted!?!? Grant On 7/15/06, Amr Malik wrote: > Hello, just checking into the amazing world famous 4k web-framework mailing > list esquire! > > -El > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > > -- Grant Hutchins nertzy at gmail.com From lninyo at gmail.com Sat Jul 15 11:50:40 2006 From: lninyo at gmail.com (Amr Malik) Date: Sat, 15 Jul 2006 11:50:40 -0400 Subject: Hello In-Reply-To: References: Message-ID: hi Grant welcome as well :) On 7/15/06, Grant Hutchins wrote: > > Hi Amr, > > Welcome! Oh wait, I just joined too. Hello list people. > > By the way, _why, what happened to hookwink.d? I just joined and now > it's busted!?!? > > Grant > > On 7/15/06, Amr Malik wrote: > > Hello, just checking into the amazing world famous 4k web-framework > mailing > > list esquire! > > > > -El > > > > _______________________________________________ > > Camping-list mailing list > > Camping-list at rubyforge.org > > http://rubyforge.org/mailman/listinfo/camping-list > > > > > > > -- > Grant Hutchins > nertzy at gmail.com > _______________________________________________ > 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/20060715/7f93781f/attachment.html From adamb at mit.edu Sat Jul 15 12:27:21 2006 From: adamb at mit.edu (Adam Bouhenguel) Date: Sat, 15 Jul 2006 12:27:21 -0400 Subject: camping - inspiring new way to write applications Message-ID: hi all, curious about your input on this latest design experience i've had with camping. none of that developing a traditional html ui, a ruby backend, and ajax-ifying the application after being built. - i started straight off with a camping-based json api (for the model). - next step was writing the controller in pure js - no dom interactions here. - then finishing off with a view that's generated onload by pure js. and hooks into the controller by observing relevant actions. camping allowed the complexity of the application to be pushed into the model on the server-side. putting the view and controller on the same side of the internet seems to make development and use of the application way more fun. how can we stretch and pull on this camping business to let the view and controller to live even closer? is there a prototype/camping perspective on rjs? perhaps bundling js hooks in markaby? anyone having a similar experience? -adam From zimba.tm at gmail.com Sat Jul 15 12:58:57 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Sat, 15 Jul 2006 18:58:57 +0200 Subject: Hello In-Reply-To: References: Message-ID: <3ff63f9b0607150958n139d143fj481af2ceb3f12d80@mail.gmail.com> Hi :-) I'm the developper of the Equipment package. A Camping extension library. It's pretty rough right now but the next release will be much better. Welcome Amr and Grant :-) I hope we'll have a lot of fun in the following times :-) (isn't is _why ?) -- Cheers, zimbatm http://zimbatm.oree.ch From zimba.tm at gmail.com Sat Jul 15 19:59:21 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Sun, 16 Jul 2006 01:59:21 +0200 Subject: camping - inspiring new way to write applications In-Reply-To: References: Message-ID: <3ff63f9b0607151659s5b1694aasef08951760152718@mail.gmail.com> Hi Adam, On 15/07/06, Adam Bouhenguel wrote: > none of that developing a traditional html ui, a ruby backend, and > ajax-ifying the application after being built. > - i started straight off with a camping-based json api (for the model). > - next step was writing the controller in pure js - no dom interactions here. > - then finishing off with a view that's generated onload by pure js. > and hooks into the controller by observing relevant actions. That looks interesting. Would you like to show some code ? Another question that comes to my mind : does the browser always stay on the same url ? > how can we stretch and pull on this camping business to let the view > and controller to live even closer? is there a prototype/camping > perspective on rjs? perhaps bundling js hooks in markaby? anyone > having a similar experience? I have some suggestions. To make the model available to the web, a kind of ActiveRessouce for Camping could be nice. A standardized way to access the model trough a RESTful API. I've already started to design something for my Equipment lib but it is not quite there yet. There is a generic part and a specialized one for Og. Maybe you want to work on the AR one ? The second would be to add content-type detection to Camping. I've heard Rails already has a similar mechanism. Actually I thinkt this can be done pretty easily by changing the render/method_missing method a little bit. The basics are pretty the same. I've put a small page in the wiki to show the differences : http://code.whytheluckystiff.net/camping/wiki/RespondTo Also, my personnal opinion on RJS is that it's bad because you can't recreate the whole language. I prefer putting efforts in making javascript easier to use. I particularly like the event-selectors javascript library to decouple the javascript in a separate page. http://encytemedia.com/event-selectors/ -- Cheers, zimbatm http://zimbatm.oree.ch From why at whytheluckystiff.net Sun Jul 16 00:00:21 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Sat, 15 Jul 2006 23:00:21 -0500 Subject: Hello In-Reply-To: References: Message-ID: <20060716040021.GA72166@lstsv-3264.layeredtech.com> On Sat, Jul 15, 2006 at 03:32:49PM +0000, Grant Hutchins wrote: > Welcome! Oh wait, I just joined too. Hello list people. > > On 7/15/06, Amr Malik wrote: > > Hello, just checking into the amazing world famous 4k web-framework mailing > > list esquire! Glad to have you both, Amr and Grant. Please use the facilities at #camping on irc.freenode.net. indian_chief announces all camping, markaby and hpricot checkins to the channel and he'll eval ruby code and stuff. (By the way, if he gets stuck: ?eval reset...) Grant: yeah, Hoodwink.d is a Camping app and I think it's running an older version of ActiveRecord or something. I'll upgrade and get to the bottom of that. _why From why at whytheluckystiff.net Sun Jul 16 00:46:54 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Sat, 15 Jul 2006 23:46:54 -0500 Subject: camping - inspiring new way to write applications In-Reply-To: References: Message-ID: <20060716044654.GB72166@lstsv-3264.layeredtech.com> On Sat, Jul 15, 2006 at 12:27:21PM -0400, Adam Bouhenguel wrote: > how can we stretch and pull on this camping business to let the view > and controller to live even closer? is there a prototype/camping > perspective on rjs? perhaps bundling js hooks in markaby? anyone > having a similar experience? I use JQuery with Camping and it works just great. I'm not that great with JavaScript, though, and I never have any ideas for it, so I always overlook the possibilities. Doing all the controllers in JSON is a good one. I'll bet there are some clever `service` overrides which could lead to `get_json`, `get_html`, `post_json` and that sort of thing. Or helpful conversion of objects returned from `get` or `post` to JSON, HTML, whatever's in Accept. I don't know, my ideas are pretty limited. I can't wait to see what you all cook up, though. _why From zimba.tm at gmail.com Sun Jul 16 10:58:41 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Sun, 16 Jul 2006 16:58:41 +0200 Subject: camping - inspiring new way to write applications In-Reply-To: <20060716044654.GB72166@lstsv-3264.layeredtech.com> References: <20060716044654.GB72166@lstsv-3264.layeredtech.com> Message-ID: <3ff63f9b0607160758h7bd10a9bi6df2a3650098fdba@mail.gmail.com> On 16/07/06, why the lucky stiff wrote: > I use JQuery with Camping and it works just great. I'm not that great with > JavaScript, though, and I never have any ideas for it, so I always overlook > the possibilities. Yay, JQuery is very smart ! Thanks :-) > Doing all the controllers in JSON is a good one. I'll bet there are some clever > `service` overrides which could lead to `get_json`, `get_html`, `post_json` and > that sort of thing. Or helpful conversion of objects returned from `get` or > `post` to JSON, HTML, whatever's in Accept. > > I don't know, my ideas are pretty limited. I can't wait to see what you all > cook up, though. Content negociation is pretty hairy. At least apache's one : http://httpd.apache.org/docs/2.0/content-negotiation.html Your get_#{ext} is a pretty good idea. It would allow external discovery of available content-types. I'll try to implement this to see how it does. -- Cheers, zimbatm http://zimbatm.oree.ch From adamb at mit.edu Sun Jul 16 12:06:13 2006 From: adamb at mit.edu (Adam Bouhenguel) Date: Sun, 16 Jul 2006 12:06:13 -0400 Subject: camping - inspiring new way to write applications In-Reply-To: <3ff63f9b0607151659s5b1694aasef08951760152718@mail.gmail.com> References: <3ff63f9b0607151659s5b1694aasef08951760152718@mail.gmail.com> Message-ID: > > none of that developing a traditional html ui, a ruby backend, and > > ajax-ifying the application after being built. > > - i started straight off with a camping-based json api (for the model). > > - next step was writing the controller in pure js - no dom interactions here. > > - then finishing off with a view that's generated onload by pure js. > > and hooks into the controller by observing relevant actions. > > That looks interesting. Would you like to show some code ? Another > question that comes to my mind : does the browser always stay on the > same url ? The code for this application is in a bit of an in-between state, but I'll see what I can pull out. At the moment, yes - the browser does always stay on the same url. but that's more a feature of this particular application than representative of the general method that i'm using. > I have some suggestions. > > To make the model available to the web, a kind of ActiveRessouce for > Camping could be nice. A standardized way to access the model trough a > RESTful API. I've already started to design something for my Equipment > lib but it is not quite there yet. There is a generic part and a > specialized one for Og. Maybe you want to work on the AR one ? Excellent idea - an AR binding for javascript would be a cool piece of work. You said there's a general part of your lib? Is it extractable/sharable at the moment? > The second would be to add content-type detection to Camping. I've > heard Rails already has a similar mechanism. Actually I thinkt this > can be done pretty easily by changing the render/method_missing method > a little bit. The basics are pretty the same. I've put a small page in > the wiki to show the differences : > http://code.whytheluckystiff.net/camping/wiki/RespondTo > > Also, my personnal opinion on RJS is that it's bad because you can't > recreate the whole language. I prefer putting efforts in making > javascript easier to use. I particularly like the event-selectors > javascript library to decouple the javascript in a separate page. > http://encytemedia.com/event-selectors/ I agree with the failings of rjs, though I was talking about some clever way of keeping all your js in the same file. if, as we're suggesting, there's a MVC relationship on top of the one camping provides, and parts of the controllers live in the browser, it would be nice to keep those bits in the camping file as well. best, adam From adamb at mit.edu Sun Jul 16 12:14:11 2006 From: adamb at mit.edu (Adam Bouhenguel) Date: Sun, 16 Jul 2006 12:14:11 -0400 Subject: camping - inspiring new way to write applications In-Reply-To: <3ff63f9b0607160758h7bd10a9bi6df2a3650098fdba@mail.gmail.com> References: <20060716044654.GB72166@lstsv-3264.layeredtech.com> <3ff63f9b0607160758h7bd10a9bi6df2a3650098fdba@mail.gmail.com> Message-ID: > > Doing all the controllers in JSON is a good one. I'll bet there are some clever > > `service` overrides which could lead to `get_json`, `get_html`, `post_json` and > > that sort of thing. Or helpful conversion of objects returned from `get` or > > `post` to JSON, HTML, whatever's in Accept. > > > > Your get_#{ext} is a pretty good idea. It would allow external > discovery of available content-types. I'll try to implement this to > see how it does. > i like the idea of get_gist or get_auto, where whatever's returned is converted via to_html, to_json, to_xml, etc. adam From daniel2501 at gmail.com Sun Jul 16 13:25:52 2006 From: daniel2501 at gmail.com (Daniel Benedict) Date: Sun, 16 Jul 2006 13:25:52 -0400 Subject: Hello~!~ Message-ID: <200607161325.52529.daniel2501@gmail.com> Just saying hello and I'm looking forward to seeing all the cool camping stuff on this list. I'm just starting out with Ruby and have a long way to go. I hope that I can learn a lot here. Adam: sounds really interesting. _why: My condolences about those bruises. I assume they're from the pelting you got on RedHanded a while back. Harsh. If it makes you feel any better, I thought I'd let you know that if it weren't for your cartoon foxes, I'd probably still be banging my head against php. Thanks! -D From zimba.tm at gmail.com Sun Jul 16 13:58:15 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Sun, 16 Jul 2006 19:58:15 +0200 Subject: camping - inspiring new way to write applications In-Reply-To: References: <3ff63f9b0607151659s5b1694aasef08951760152718@mail.gmail.com> Message-ID: <3ff63f9b0607161058j3ce5f1b1rc78410a8d5f1f42d@mail.gmail.com> On 16/07/06, Adam Bouhenguel wrote: > > That looks interesting. Would you like to show some code ? Another > > question that comes to my mind : does the browser always stay on the > > same url ? > > The code for this application is in a bit of an in-between state, but > I'll see what I can pull out. At the moment, yes - the browser does > always stay on the same url. but that's more a feature of this > particular application than representative of the general method that > i'm using. Ok, let us know when it's ready :-) > > To make the model available to the web, a kind of ActiveRessouce for > > Camping could be nice. A standardized way to access the model trough a > > RESTful API. I've already started to design something for my Equipment > > lib but it is not quite there yet. There is a generic part and a > > specialized one for Og. Maybe you want to work on the AR one ? > > Excellent idea - an AR binding for javascript would be a cool piece of > work. You said there's a general part of your lib? Is it > extractable/sharable at the moment? I do have something, but it's not quite finished. You can get equipment's source with "svn checkout svn://rubyforge.org//var/svn/equipment/trunk". The file is in ext/ressource.rb > > The second would be to add content-type detection to Camping. I've > > heard Rails already has a similar mechanism. Actually I thinkt this > > can be done pretty easily by changing the render/method_missing method > > a little bit. The basics are pretty the same. I've put a small page in > > the wiki to show the differences : > > http://code.whytheluckystiff.net/camping/wiki/RespondTo > > > > Also, my personnal opinion on RJS is that it's bad because you can't > > recreate the whole language. I prefer putting efforts in making > > javascript easier to use. I particularly like the event-selectors > > javascript library to decouple the javascript in a separate page. > > http://encytemedia.com/event-selectors/ > I agree with the failings of rjs, though I was talking about some > clever way of keeping all your js in the same file. if, as we're > suggesting, there's a MVC relationship on top of the one camping > provides, and parts of the controllers live in the browser, it would > be nice to keep those bits in the camping file as well. JQuery looks really nice. You don't have to put your javascript in the page since it loads the element asychronously. You can also look in ext/js_helpers.rb for joined scripts (to avoid IE loading order bug) -- Cheers, zimbatm http://zimbatm.oree.ch From lionel.orry at gmail.com Mon Jul 17 03:05:43 2006 From: lionel.orry at gmail.com (Lionel Orry) Date: Mon, 17 Jul 2006 09:05:43 +0200 Subject: Just to say hello Message-ID: <44BB36C7.1040705@gmail.com> Just a short message to say hello to everybody. I'm new here, but it's a step forward to dive into _why's deepesy secrets... I'm sure this list will bring a lot of ideas to a lot of people. I kinda like the way of saying 'You know, when there's a shorter way to the solution, this way is probably simpler, clearer and more fun as well. I wish a happy list-watching to everybody. It will be for me. cheers Lionel From lionel.orry at gmail.com Mon Jul 17 11:05:10 2006 From: lionel.orry at gmail.com (Lionel Orry) Date: Mon, 17 Jul 2006 17:05:10 +0200 Subject: Where are the balloons ? Message-ID: <44BBA726.6070203@gmail.com> Just for information, the Balloons site (http://balloon.hobix.com) raises an Camping error. I tried to blow a balloon ('blow blow') and the answer is "balloon not found". Seems that the MySQL server has crashed ! _why, will you get some time to fix this ( or is it due to temporary maintenance) ? BTW, Camping would be nice to develop a small 'rescue server' (on an error of the main server, redirection to an context-analysis-capable app... could be an idea). Have a nice day everybody. -chickenkiller From why at whytheluckystiff.net Mon Jul 17 17:25:18 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Mon, 17 Jul 2006 16:25:18 -0500 Subject: Overriding 500 (was Re: Where are the balloons ?) In-Reply-To: <44BBA726.6070203@gmail.com> References: <44BBA726.6070203@gmail.com> Message-ID: <20060717212518.GA58540@lstsv-3264.layeredtech.com> On Mon, Jul 17, 2006 at 05:05:10PM +0200, Lionel Orry wrote: > BTW, Camping would be nice to develop a small 'rescue server' (on an error of the main server, redirection to an context-analysis-capable app... could be an idea). You can override the ServerError class to show something else if you're not into Camping Problem! modules Balloon::Controllers class ServerError def get(klass, meth, err) @status = 500 render :no_camping_problem end end end module Balloon::Views def no_camping_problem div { ... } end end The nice thing about this approach is that is picks up your layout. The bad thing about this is that if your ServerError override throws an error, things will really go dark. _why From why at whytheluckystiff.net Mon Jul 17 17:55:55 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Mon, 17 Jul 2006 16:55:55 -0500 Subject: Hello~!~ In-Reply-To: <200607161325.52529.daniel2501@gmail.com> References: <200607161325.52529.daniel2501@gmail.com> Message-ID: <20060717215554.GB58540@lstsv-3264.layeredtech.com> On Sun, Jul 16, 2006 at 01:25:52PM -0400, Daniel Benedict wrote: > _why: My condolences about those bruises. I assume they're from the pelting > you got on RedHanded a while back. Harsh. If it makes you feel any better, I > thought I'd let you know that if it weren't for your cartoon foxes, I'd > probably still be banging my head against php. Thanks! Nice to have you, Daniel. Don't worry at all. I deserve those lashings. If I were an important person, I would beat up on me, too. Now, please enjoy the lush palisades of Camping. _why From mathieu at justbudget.com Tue Jul 18 00:36:15 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Tue, 18 Jul 2006 13:36:15 +0900 Subject: intro Message-ID: <78181ce60607172136r412d1aay1f4853b8374d93bd@mail.gmail.com> Hi !!! I've just seen this message on http://redhanded.hobix.com/inspect/theCampingServer.html I'd really like to see distributions offer a package which would allow simple setup of TheCampingServer, just as you see with PHP. If you're interested in seeing this happen for the upcoming Camping 1.5 release, introduce yourself on the camping-list . I would really like to see camping app to work just by dropping a the file in a directory. and it is exactly what I am trying to do. here is what I did so far: I use a simple FastCGI postamble Blog::Models::Base.establish_connection :adapter => 'sqlite3', :database => '/home/mathieu/mv/rf/public/blog-new.db' Blog::Models::Base.logger = Logger.new('camping.log') Blog::Models::Base.threaded_connections=false Blog.create if Blog.respond_to? :create require 'fcgi' require 'camping/fastcgi' Dir.chdir(File.dirname(__FILE__)) Camping::FastCGI.start(Blog) the lib/camping/fastcgi.rb was missing in the camping 1.4.2 gem, so I took it from SVN trying to debug stuff, I could not get a backtrace, I found that a PLUS_SIGN was missing at line 88 of fastcgi.rb I first renamed the blog.rb to blog.fcgi but then I decided to use AddHandler fastcgi-script .rb I copied the .htaccess from rails, to make it so /blog.rb is loaded automatically. i dont know how I could make /blog to launch /blog.rb unless this is just Apache magic which let you drop the extension. by the way, I use Apache and it is what I want to use. I feel I am very close from the goal, but now the NotFound class get called saying /blog.rb not found any idea what am I doing wrong ???? thanks -- 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/20060718/12eaaff3/attachment.html From wharsojo at gmail.com Tue Jul 18 01:57:52 2006 From: wharsojo at gmail.com (Widi Harsojo) Date: Tue, 18 Jul 2006 12:57:52 +0700 Subject: Just to say hello In-Reply-To: <44BB36C7.1040705@gmail.com> References: <44BB36C7.1040705@gmail.com> Message-ID: Hi all, me new too in this list. :-) From why at whytheluckystiff.net Tue Jul 18 02:24:22 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Tue, 18 Jul 2006 01:24:22 -0500 Subject: intro In-Reply-To: <78181ce60607172136r412d1aay1f4853b8374d93bd@mail.gmail.com> References: <78181ce60607172136r412d1aay1f4853b8374d93bd@mail.gmail.com> Message-ID: <20060718062422.GA72766@lstsv-3264.layeredtech.com> On Tue, Jul 18, 2006 at 01:36:15PM +0900, Mathieu Jobin wrote: > I would really like to see camping app to work just by dropping a the file > in a directory. and it is exactly what I am trying to do. You'll need to use Camping::FastCGI.serve instead of Camping::FastCGI.start. The `serve` method loads (and watches) a directory. The `start` method mounts a single class. > the lib/camping/fastcgi.rb was missing in the camping 1.4.2 gem, so I took > it from SVN Install the latest development gem, it's quite stable. gem install camping --source code.whytheluckystiff.net > by the way, I use Apache and it is what I want to use. There are many Apaches in your forest and we all respect that, Mathieu. _why From mathieu at justbudget.com Tue Jul 18 03:15:19 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Tue, 18 Jul 2006 16:15:19 +0900 Subject: intro In-Reply-To: <20060718062422.GA72766@lstsv-3264.layeredtech.com> References: <78181ce60607172136r412d1aay1f4853b8374d93bd@mail.gmail.com> <20060718062422.GA72766@lstsv-3264.layeredtech.com> Message-ID: <78181ce60607180015l6778e85pf55e1a34bc632e20@mail.gmail.com> thank you, I don't quite get it where should I use .serve ? do I need to create a 'global' camping file, or put .serve in each camping application ? On 7/18/06, why the lucky stiff wrote: > > On Tue, Jul 18, 2006 at 01:36:15PM +0900, Mathieu Jobin wrote: > > I would really like to see camping app to work just by dropping a the > file > > in a directory. and it is exactly what I am trying to do. > > You'll need to use Camping::FastCGI.serve instead of Camping:: > FastCGI.start. > The `serve` method loads (and watches) a directory. The `start` method > mounts a > single class. > > > the lib/camping/fastcgi.rb was missing in the camping 1.4.2 gem, so I > took > > it from SVN > > Install the latest development gem, it's quite stable. > > gem install camping --source code.whytheluckystiff.net > > > by the way, I use Apache and it is what I want to use. > > There are many Apaches in your forest and we all respect that, Mathieu. > > _why > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -- 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/20060718/d9c57174/attachment-0001.html From zimba.tm at gmail.com Tue Jul 18 04:24:25 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 18 Jul 2006 10:24:25 +0200 Subject: Overriding 500 (was Re: Where are the balloons ?) In-Reply-To: <20060717212518.GA58540@lstsv-3264.layeredtech.com> References: <44BBA726.6070203@gmail.com> <20060717212518.GA58540@lstsv-3264.layeredtech.com> Message-ID: <3ff63f9b0607180124y6b90a7e8j1e5a870217703111@mail.gmail.com> Then we would need a rescue of the rescue.. Hmm. -- Cheers, zimbatm http://zimbatm.oree.ch From lionel.orry at gmail.com Tue Jul 18 04:29:57 2006 From: lionel.orry at gmail.com (Lionel Orry) Date: Tue, 18 Jul 2006 10:29:57 +0200 Subject: Overriding 500 (was Re: Where are the balloons ?) In-Reply-To: <20060717212518.GA58540@lstsv-3264.layeredtech.com> References: <44BBA726.6070203@gmail.com> <20060717212518.GA58540@lstsv-3264.layeredtech.com> Message-ID: <44BC9C05.7070008@gmail.com> Indeed I am not into dark things, let's keep it simple and clear. That's the philosophy after all, isn't it ? regards why the lucky stiff wrote: > On Mon, Jul 17, 2006 at 05:05:10PM +0200, Lionel Orry wrote: >> BTW, Camping would be nice to develop a small 'rescue server' (on an error of the main server, redirection to an context-analysis-capable app... could be an idea). > > You can override the ServerError class to show something else if you're not into > Camping Problem! > > modules Balloon::Controllers > class ServerError > def get(klass, meth, err) > @status = 500 > render :no_camping_problem > end > end > end > > module Balloon::Views > def no_camping_problem > div { ... } > end > end > > The nice thing about this approach is that is picks up your layout. The bad > thing about this is that if your ServerError override throws an error, things > will really go dark. > > _why > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From why at whytheluckystiff.net Tue Jul 18 11:48:23 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Tue, 18 Jul 2006 10:48:23 -0500 Subject: intro In-Reply-To: <78181ce60607180015l6778e85pf55e1a34bc632e20@mail.gmail.com> References: <78181ce60607172136r412d1aay1f4853b8374d93bd@mail.gmail.com> <20060718062422.GA72766@lstsv-3264.layeredtech.com> <78181ce60607180015l6778e85pf55e1a34bc632e20@mail.gmail.com> Message-ID: <20060718154823.GB72766@lstsv-3264.layeredtech.com> On Tue, Jul 18, 2006 at 04:15:19PM +0900, Mathieu Jobin wrote: > thank you, I don't quite get it where should I use .serve ? do I need to > create a 'global' camping file, or put .serve in each camping application ? You can put in the "postamble" if you like. Wherever it's going to get executed by FastCGI. All of the different FastCGI options (with code) are explained here: _why From why at whytheluckystiff.net Tue Jul 18 16:32:35 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Tue, 18 Jul 2006 15:32:35 -0500 Subject: + camping 1.4.138 Message-ID: <20060718203234.GB91557@lstsv-3264.layeredtech.com> Just up: gem install camping --source code.whytheluckystiff.net The changes: * Both bin/camping and Camping::FastCGI.serve now act according to the Camping Server specification.[1] * Docs are complete. _why [1] https://code.whytheluckystiff.net/camping/wiki/TheCampingServer From mathieu at justbudget.com Sun Jul 23 22:53:51 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Mon, 24 Jul 2006 11:53:51 +0900 Subject: + camping 1.4.138 In-Reply-To: <20060718203234.GB91557@lstsv-3264.layeredtech.com> References: <20060718203234.GB91557@lstsv-3264.layeredtech.com> Message-ID: <78181ce60607231953y7209430cj4955ff3205358ef7@mail.gmail.com> errors installing [mathieu at hikonehq ~/mv]$ sudo gem install camping --source code.whytheluckystiff.net Password: Attempting local installation of 'camping' Local gem file not found: camping*.gem Attempting remote installation of 'camping' Updating Gem source index for: http://code.whytheluckystiff.net Install required dependency markaby? [Yn] Successfully installed camping-1.4.138 Successfully installed markaby-0.4.65 Installing RDoc documentation for camping-1.4.138... Installing RDoc documentation for markaby-0.4.65... /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:25: warning: already initialized constant FONTS /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:235: warning: already initialized constant STYLE /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:335: warning: already initialized constant FILE_PAGE /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:384: warning: already initialized constant CLASS_PAGE /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:604: warning: already initialized constant METHOD_LIST /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:621: warning: already initialized constant BODY /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:649: warning: already initialized constant FR_INDEX_BODY /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:675: warning: already initialized constant FILE_INDEX /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:677: warning: already initialized constant CLASS_INDEX /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:678: warning: already initialized constant METHOD_INDEX /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:704: warning: already initialized constant INDEX /usr/local/lib/ruby/1.8/rdoc/generators/template/html/one_page_html.rb:76: warning: already initialized constant CONTENTS_XML Error in template: Template error: can't find variable 'title' Original line: %title% [mathieu at hikonehq ~/mv]$ warnings does not matter too much, but the last one should be corrected I suppose regards, On 7/19/06, why the lucky stiff wrote: > > Just up: > > gem install camping --source code.whytheluckystiff.net > > The changes: > > * Both bin/camping and Camping::FastCGI.serve now act according to the > Camping Server specification.[1] > * Docs are complete. > > _why > > [1] https://code.whytheluckystiff.net/camping/wiki/TheCampingServer > _______________________________________________ > 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/20060724/6706a642/attachment.html From mathieu at justbudget.com Sun Jul 23 23:02:39 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Mon, 24 Jul 2006 12:02:39 +0900 Subject: intro In-Reply-To: <20060718154823.GB72766@lstsv-3264.layeredtech.com> References: <78181ce60607172136r412d1aay1f4853b8374d93bd@mail.gmail.com> <20060718062422.GA72766@lstsv-3264.layeredtech.com> <78181ce60607180015l6778e85pf55e1a34bc632e20@mail.gmail.com> <20060718154823.GB72766@lstsv-3264.layeredtech.com> Message-ID: <78181ce60607232002y49d4e2c5mf87eea4a31f5706b@mail.gmail.com> Hi, I still don't understand why should I use .serve? You are saying .serve loads and watches a directory. A postamble is usually to load a single class, thus .start should be use, no? also, I don't understand where the rewriting magic should be done so /blog.fcgi can be written /blog/ ? thanks On 7/19/06, why the lucky stiff wrote: > > On Tue, Jul 18, 2006 at 04:15:19PM +0900, Mathieu Jobin wrote: > > thank you, I don't quite get it where should I use .serve ? do I need to > > create a 'global' camping file, or put .serve in each camping > application ? > > You can put in the "postamble" if you like. Wherever it's going to get > executed > by FastCGI. > > All of the different FastCGI options (with code) are explained here: > > > _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/20060724/aac5e845/attachment.html From mathieu at justbudget.com Sun Jul 23 23:18:30 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Mon, 24 Jul 2006 12:18:30 +0900 Subject: problem running Blog using CSS Message-ID: <78181ce60607232018o2d6c25f0i367affa5bbc2c201@mail.gmail.com> I am not using latest camping (sudo gem install camping --source code.whytheluckystiff.net) and I'm getting this error executing Blog.run (eval):14:in `initialize': private method `sub' called for nil:NilClass (NoMethodError) from (eval):44:in `run' from /home/mathieu/mv/rf/public/blog.rb:303 -- 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/20060724/2094461b/attachment.html From mathieu at justbudget.com Mon Jul 24 02:50:46 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Mon, 24 Jul 2006 15:50:46 +0900 Subject: difference between running unabridged Message-ID: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> 22 sudo mv camping.rb camping-abridged.rb 23 sudo mv camping-unabridged.rb camping.rb when running into problems, the abridged version of camping is rather difficult to debug. so I'm moving to unabridged, but I'm getting this error. [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in `const_missing' [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] : [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] uninitialized constant X [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ( [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] NameError [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ) [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing' [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in `const_missing' [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom (eval):682:in `run' [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom /home/mathieu/mv/rf/public/diary.cgi:341 [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] Premature end of script headers: diary.cgi -- 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/20060724/f9eda083/attachment-0001.html From mathieu at justbudget.com Mon Jul 24 03:09:49 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Mon, 24 Jul 2006 16:09:49 +0900 Subject: difference between running unabridged In-Reply-To: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> Message-ID: <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> X = Controllers def run(r=$stdin,e=ENV) X.M k,a=X.D un("/#{e['PATH_INFO']}".gsub(/\/+/,'/')) k.new(r,e,(m=e['REQUEST_METHOD']||"GET")).service *a rescue Exception=>x X::ServerError.new(r,e,'get').service(k,m,x) end placing a X = Controllers above the run method fixed it. On 7/24/06, Mathieu Jobin wrote: > > 22 sudo mv camping.rb camping-abridged.rb > 23 sudo mv camping-unabridged.rb camping.rb > > when running into problems, the abridged version of camping is rather > difficult to debug. > so I'm moving to unabridged, but I'm getting this error. > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in > `const_missing' > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] : > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] uninitialized > constant X > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ( > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] NameError > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ) > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in > `const_missing' > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in > `const_missing' > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > (eval):682:in `run' > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > /home/mathieu/mv/rf/public/diary.cgi:341 > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] Premature end > of script headers: diary.cgi > > > -- > 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 > -- 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/20060724/65ae189f/attachment.html From mathieu at justbudget.com Mon Jul 24 03:17:37 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Mon, 24 Jul 2006 16:17:37 +0900 Subject: difference between running unabridged In-Reply-To: <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> Message-ID: <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> still, in camping 1.4.138 line 88 of "camping/fastcgi.rb" is missing a + at the end. On 7/24/06, Mathieu Jobin wrote: > > X = Controllers > def run(r=$stdin,e=ENV) > X.M > k,a=X.D un("/#{e['PATH_INFO']}".gsub(/\/+/,'/')) > k.new(r,e,(m=e['REQUEST_METHOD']||"GET")).service *a > rescue Exception=>x > X::ServerError.new(r,e,'get').service(k,m,x) > end > > placing a X = Controllers above the run method fixed it. > > > On 7/24/06, Mathieu Jobin wrote: > > > > 22 sudo mv camping.rb camping-abridged.rb > > 23 sudo mv camping-unabridged.rb camping.rb > > > > when running into problems, the abridged version of camping is rather > > difficult to debug. > > so I'm moving to unabridged, but I'm getting this error. > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] > > /usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:100:in > > `const_missing' > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] : > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] uninitialized > > constant X > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ( > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] NameError > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ) > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > > /usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:131:in > > `const_missing' > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > > /usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:133:in > > `const_missing' > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > > (eval):682:in `run' > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > > /home/mathieu/mv/rf/public/diary.cgi:341 > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] Premature end > > of script headers: diary.cgi > > > > > > -- > > 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 > > > > > > -- > 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 > -- 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/20060724/a3a5a676/attachment.html From zimba.tm at gmail.com Mon Jul 24 03:38:58 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Mon, 24 Jul 2006 09:38:58 +0200 Subject: difference between running unabridged In-Reply-To: <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> Message-ID: <3ff63f9b0607240038j633d033etc7532231b752530f@mail.gmail.com> Yes, unabridged is mostry there for the doc, but this is good. -- Cheers, zimbatm http://zimbatm.oree.ch From mathieu at justbudget.com Mon Jul 24 03:39:20 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Mon, 24 Jul 2006 16:39:20 +0900 Subject: difference between running unabridged In-Reply-To: <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> Message-ID: <78181ce60607240039k57305f4ah42ca4e40b92f66d6@mail.gmail.com> another problem.... for some reason on line 75 of /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/fastcgi.rb req.env['PATH_INFO'] is nil making any of my FastCGI app to error out. adding .to_s skip that error, I'm not sure is that PATH_INFO var next error happens in camping-unabridged line 433 def to_s "Status: #{@status}#{Z+ at headers.map{|k,v|[*v].map{|x|"#{k}: #{x}"}}* Z+Z*2+ at body}" end TypeError can't convert Diary::Mab into String which line is very hard to debug. first its rather unreadable, second his output is crucial for the HTTP response. is it @body the problem ? On 7/24/06, Mathieu Jobin wrote: > > still, in camping 1.4.138 > line 88 of "camping/fastcgi.rb" is missing a + at the end. > > > > > On 7/24/06, Mathieu Jobin < mathieu at justbudget.com> wrote: > > > > X = Controllers > > def run(r=$stdin,e=ENV) > > X.M > > k,a=X.D un("/#{e['PATH_INFO']}".gsub(/\/+/,'/')) > > k.new(r,e,(m=e['REQUEST_METHOD']||"GET")).service *a > > rescue Exception=>x > > X::ServerError.new(r,e,'get').service(k,m,x) > > end > > > > placing a X = Controllers above the run method fixed it. > > > > > > > > On 7/24/06, Mathieu Jobin wrote: > > > > > > 22 sudo mv camping.rb camping-abridged.rb > > > 23 sudo mv camping-unabridged.rb camping.rb > > > > > > when running into problems, the abridged version of camping is rather difficult to debug. > > > so I'm moving to unabridged, but I'm getting this error. > > > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100 ] /usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:100:in `const_missing' > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] : > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] uninitialized constant X > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ( > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] NameError > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ) > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom /usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:131:in `const_missing' > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100 ] \tfrom /usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:133:in `const_missing' > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom (eval):682:in `run' > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100 ] \tfrom /home/mathieu/mv/rf/public/diary.cgi:341 > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100 ] Premature end of script headers: diary.cgi > > > > > > > > > -- > > > 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 > > > > > > > > -- > > 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 > > > > -- > 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 -- 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/20060724/18bed35c/attachment-0001.html From mathieu at justbudget.com Mon Jul 24 04:32:43 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Mon, 24 Jul 2006 17:32:43 +0900 Subject: difference between running unabridged In-Reply-To: <78181ce60607240039k57305f4ah42ca4e40b92f66d6@mail.gmail.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> <78181ce60607240039k57305f4ah42ca4e40b92f66d6@mail.gmail.com> Message-ID: <78181ce60607240132h48463eb7pa045169ad0e00dc6@mail.gmail.com> I have been able to get a .inspect of @body by passing it into a @headers field ;) #Camping Problem!

/diary.fcgi not found

", ""]], @tagset=Markaby::XHTMLTransitional, @builder=

Camping Problem!

/diary.fcgi not found

, @output_helpers=true, @auto_validation=true, @helpers=nil, @output_xml_instruction=true, @image_tag_options={:border=>"0", :alt=>""}, @assigns={}, @output_meta_tag=true> so, I'm getting this error again /diary.fcgi not found. so I try changing .start into .serve and it's just worse. first I rename my app to .rb because .serve is scanning for .rb files. although .serve could be change to support .fcgi something like this.... Dir[File.join(path, '*.{rb,fcgi}')].each &script_load fast.start do |dir, app| Dir[File.join(path, dir, '*.{rb,fcgi}')].each do |script| smount = "/" + File.gsub(/\.(rb|fcgi)$/, '') script_load[script] unless @mounts.has_key? smount end end should do fine and I'm getting the following error. /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:184:in `establish_connection': ActiveRecord::AdapterNotSpecified (ActiveRecord::AdapterNotSpecified) from /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/reloader.rb:139:in `conditional_connect' from /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/reloader.rb:80:in `load_app' from /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/reloader.rb:40:in `initialize' from /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/fastcgi.rb:123:in `serve' from /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/fastcgi.rb:127:in `serve' from /home/mathieu/mv/rf/public/diary.rb:346 !! trouble loading diary: [TypeError] (eval):552: superclass mismatch for class NotFound On 7/24/06, Mathieu Jobin wrote: > > another problem.... > for some reason > on line 75 of > /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/fastcgi.rb > req.env['PATH_INFO'] is nil > making any of my FastCGI app to error out. > adding .to_s skip that error, I'm not sure is that PATH_INFO var > > next error happens in camping-unabridged line 433 > > def to_s > "Status: #{@status}#{Z+ at headers.map{|k,v|[*v].map{|x|"#{k}: #{x}"}}* > Z+Z*2+ at body}" > end > > TypeError can't convert Diary::Mab into String > > which line is very hard to debug. first its rather unreadable, second his > output is crucial for the HTTP response. > is it @body the problem ? > > > On 7/24/06, Mathieu Jobin < mathieu at justbudget.com> wrote: > > > > still, in camping 1.4.138 > > line 88 of "camping/fastcgi.rb" is missing a + at the end. > > > > > > > > > > On 7/24/06, Mathieu Jobin < mathieu at justbudget.com> wrote: > > > > > > X = Controllers > > > def run(r=$stdin,e=ENV) > > > X.M > > > k,a=X.D un("/#{e['PATH_INFO']}".gsub(/\/+/,'/')) > > > k.new(r,e,(m=e['REQUEST_METHOD']||"GET")).service *a > > > rescue Exception=>x > > > X::ServerError.new(r,e,'get').service(k,m,x) > > > end > > > > > > placing a X = Controllers above the run method fixed it. > > > > > > > > > > > > On 7/24/06, Mathieu Jobin wrote: > > > > > > > > 22 sudo mv camping.rb camping-abridged.rb > > > > 23 sudo mv camping-unabridged.rb camping.rb > > > > > > > > when running into problems, the abridged version of camping is > rather difficult to debug. > > > > so I'm moving to unabridged, but I'm getting this error. > > > > > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100 ] > /usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:100:in > `const_missing' > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] : > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] > uninitialized constant X > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ( > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] > NameError > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] ) > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > /usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:131:in > `const_missing' > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100 ] \tfrom > /usr/local/lib/ruby/gems/1.8/gems/activesupport- 1.3.1/lib/active_support/dependencies.rb:133:in > `const_missing' > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100] \tfrom > (eval):682:in `run' > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100 ] \tfrom > /home/mathieu/mv/rf/public/diary.cgi:341 > > > > [Mon Jul 24 15:50:18 2006] [error] [client 192.168.11.100 ] > Premature end of script headers: diary.cgi > > > > > > > > > > > > -- > > > > 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 > > > > > > > > > > > > -- > > > 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 > > > > > > > > -- > > 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 > > > > -- > 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 > -- 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/20060724/da11d9ec/attachment.html From mathieu at justbudget.com Mon Jul 24 04:36:12 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Mon, 24 Jul 2006 17:36:12 +0900 Subject: difference between running unabridged In-Reply-To: <3ff63f9b0607240038j633d033etc7532231b752530f@mail.gmail.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> <3ff63f9b0607240038j633d033etc7532231b752530f@mail.gmail.com> Message-ID: <78181ce60607240136i39ffeb54w58027bd6bb5e8bf2@mail.gmail.com> how are you maintaining this camping.rb file ? I thought you were editing the unabridged version which was automatically compressed into camping.rb no ? On 7/24/06, Jonas Pfenniger wrote: > > Yes, unabridged is mostry there for the doc, but this is good. > > -- > Cheers, > zimbatm > > http://zimbatm.oree.ch > _______________________________________________ > 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/20060724/aa1cb5b4/attachment.html From mathieu at justbudget.com Mon Jul 24 05:01:16 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Mon, 24 Jul 2006 18:01:16 +0900 Subject: difference between running unabridged In-Reply-To: <78181ce60607240136i39ffeb54w58027bd6bb5e8bf2@mail.gmail.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> <3ff63f9b0607240038j633d033etc7532231b752530f@mail.gmail.com> <78181ce60607240136i39ffeb54w58027bd6bb5e8bf2@mail.gmail.com> Message-ID: <78181ce60607240201r60fa4798j9f2436b31915f64c@mail.gmail.com> did anyone ever got camping to work on Apache/FastCGI ? (14.138) On 7/24/06, Mathieu Jobin wrote: > > how are you maintaining this camping.rb file ? > I thought you were editing the unabridged version which was automatically > compressed into camping.rb > no ? > > > On 7/24/06, Jonas Pfenniger wrote: > > > > Yes, unabridged is mostry there for the doc, but this is good. > > > > -- > > Cheers, > > zimbatm > > > > http://zimbatm.oree.ch > > _______________________________________________ > > 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 > -- 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/20060724/6d00a65a/attachment-0001.html From zimba.tm at gmail.com Mon Jul 24 05:08:12 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Mon, 24 Jul 2006 11:08:12 +0200 Subject: difference between running unabridged In-Reply-To: <78181ce60607240136i39ffeb54w58027bd6bb5e8bf2@mail.gmail.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> <3ff63f9b0607240038j633d033etc7532231b752530f@mail.gmail.com> <78181ce60607240136i39ffeb54w58027bd6bb5e8bf2@mail.gmail.com> Message-ID: <3ff63f9b0607240208y2f90901ap8d38f865d43ad636@mail.gmail.com> On 24/07/06, Mathieu Jobin wrote: > how are you maintaining this camping.rb file ? > I thought you were editing the unabridged version which was automatically > compressed into camping.rb > no ? No, camping.rb is recoded by hand. This is why both files sometimes get out of sync. I'm sorry I'm not using fcgi. You should try to get the following : * Camping from SVN, and apply the [PATCH] AR fixes patch from Trac. * Markaby from SVN, the xhtml-careful branch. And join #camping on freenode ;-) -- Cheers, zimbatm http://zimbatm.oree.ch From mathieu at justbudget.com Mon Jul 24 05:14:39 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Mon, 24 Jul 2006 18:14:39 +0900 Subject: difference between running unabridged In-Reply-To: <3ff63f9b0607240208y2f90901ap8d38f865d43ad636@mail.gmail.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> <3ff63f9b0607240038j633d033etc7532231b752530f@mail.gmail.com> <78181ce60607240136i39ffeb54w58027bd6bb5e8bf2@mail.gmail.com> <3ff63f9b0607240208y2f90901ap8d38f865d43ad636@mail.gmail.com> Message-ID: <78181ce60607240214r63a47e20g93f1c55c130b6e23@mail.gmail.com> may I ask how are you recoded by hand? you are editing the file directly without uncompressing it ? would not that be a good idea to always edit the unabridged version and relaunch that script that removed comments and compress the lines? this way, it would be easier for the developer and both version would be in sync. nothing more than my opinion. On 7/24/06, Jonas Pfenniger wrote: > > On 24/07/06, Mathieu Jobin wrote: > > how are you maintaining this camping.rb file ? > > I thought you were editing the unabridged version which was > automatically > > compressed into camping.rb > > no ? > > No, camping.rb is recoded by hand. This is why both files sometimes > get out of sync. > I'm sorry I'm not using fcgi. You should try to get the following : > * Camping from SVN, and apply the [PATCH] AR fixes patch from Trac. > * Markaby from SVN, the xhtml-careful branch. > > And join #camping on freenode ;-) > > -- > Cheers, > zimbatm > > http://zimbatm.oree.ch > _______________________________________________ > 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/20060724/27b41af2/attachment.html From manfred at gmail.com Mon Jul 24 05:20:24 2006 From: manfred at gmail.com (Manfred Stienstra) Date: Mon, 24 Jul 2006 11:20:24 +0200 Subject: difference between running unabridged In-Reply-To: <3ff63f9b0607240208y2f90901ap8d38f865d43ad636@mail.gmail.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> <3ff63f9b0607240038j633d033etc7532231b752530f@mail.gmail.com> <78181ce60607240136i39ffeb54w58027bd6bb5e8bf2@mail.gmail.com> <3ff63f9b0607240208y2f90901ap8d38f865d43ad636@mail.gmail.com> Message-ID: On 24-jul-2006, at 11:08, Jonas Pfenniger wrote: > On 24/07/06, Mathieu Jobin wrote: >> how are you maintaining this camping.rb file ? >> I thought you were editing the unabridged version which was >> automatically >> compressed into camping.rb >> no ? > > No, camping.rb is recoded by hand. This is why both files sometimes > get out of sync. > I'm sorry I'm not using fcgi. You should try to get the following : > * Camping from SVN, and apply the [PATCH] AR fixes patch from Trac. > * Markaby from SVN, the xhtml-careful branch. > > And join #camping on freenode ;-) I did experience a lot of trouble running camping with cgi under apache. I never got fcgi working. Most of the problems have to do with SCRIPT_NAME and path related stuff. I had to do the following to get it to work: module ForestWatcher def service(*a) @root = ENV['SCRIPT_NAME'].sub '/forestwatcher.rb', '' unless ENV ['SCRIPT_NAME'].nil? super(*a) end end From manfred at gmail.com Mon Jul 24 05:41:50 2006 From: manfred at gmail.com (Manfred Stienstra) Date: Mon, 24 Jul 2006 11:41:50 +0200 Subject: difference between running unabridged In-Reply-To: <78181ce60607240214r63a47e20g93f1c55c130b6e23@mail.gmail.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> <3ff63f9b0607240038j633d033etc7532231b752530f@mail.gmail.com> <78181ce60607240136i39ffeb54w58027bd6bb5e8bf2@mail.gmail.com> <3ff63f9b0607240208y2f90901ap8d38f865d43ad636@mail.gmail.com> <78181ce60607240214r63a47e20g93f1c55c130b6e23@mail.gmail.com> Message-ID: On 24-jul-2006, at 11:14, Mathieu Jobin wrote: > may I ask how are you recoded by hand? you are editing the file > directly without uncompressing it ? > would not that be a good idea to always edit the unabridged version > and relaunch that script that removed comments and compress the > lines? this way, it would be easier for the developer and both > version would be in sync. > > nothing more than my opinion. If I understand correctly the camping.rb file is maintained by hand to be able to minimize the size of the file to the full extend. If some script would produce this it might not be optimal. From zimba.tm at gmail.com Mon Jul 24 06:08:52 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Mon, 24 Jul 2006 12:08:52 +0200 Subject: difference between running unabridged In-Reply-To: References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> <3ff63f9b0607240038j633d033etc7532231b752530f@mail.gmail.com> <78181ce60607240136i39ffeb54w58027bd6bb5e8bf2@mail.gmail.com> <3ff63f9b0607240208y2f90901ap8d38f865d43ad636@mail.gmail.com> <78181ce60607240214r63a47e20g93f1c55c130b6e23@mail.gmail.com> Message-ID: <3ff63f9b0607240308k189abb39s63c17c5ebb8ff10a@mail.gmail.com> On 24/07/06, Manfred Stienstra wrote: > If I understand correctly the camping.rb file is maintained by hand > to be able to minimize the size of the file to the full extend. If > some script would produce this it might not be optimal. Yes this is right. I've started a ruby-compresser project on my disk but didn't get quite far. The problem is that you'll need a lexer and sexp processor to output compressed code and you'll have to redefine each element of the ruby language which is quite long to do. -- Cheers, zimbatm http://zimbatm.oree.ch From why at whytheluckystiff.net Mon Jul 24 11:21:05 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Mon, 24 Jul 2006 10:21:05 -0500 Subject: difference between running unabridged In-Reply-To: <78181ce60607240136i39ffeb54w58027bd6bb5e8bf2@mail.gmail.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> <3ff63f9b0607240038j633d033etc7532231b752530f@mail.gmail.com> <78181ce60607240136i39ffeb54w58027bd6bb5e8bf2@mail.gmail.com> Message-ID: <20060724152105.GC31525@lstsv-3264.layeredtech.com> On Mon, Jul 24, 2006 at 05:36:12PM +0900, Mathieu Jobin wrote: > how are you maintaining this camping.rb file ? > I thought you were editing the unabridged version which was automatically > compressed into camping.rb It's just the opposite. I write camping.rb and expand it into camping-unabridged.rb. Thankyou for your patches, I will merge them today. _why From why at whytheluckystiff.net Mon Jul 24 11:23:37 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Mon, 24 Jul 2006 10:23:37 -0500 Subject: + camping 1.4.138 In-Reply-To: <78181ce60607231953y7209430cj4955ff3205358ef7@mail.gmail.com> References: <20060718203234.GB91557@lstsv-3264.layeredtech.com> <78181ce60607231953y7209430cj4955ff3205358ef7@mail.gmail.com> Message-ID: <20060724152337.GD31525@lstsv-3264.layeredtech.com> On Mon, Jul 24, 2006 at 11:53:51AM +0900, Mathieu Jobin wrote: > Installing RDoc documentation for markaby-0.4.65... > /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:25: warning: > already initialized constant FONTS Yes, all these errors from Markaby are harmless. I need to examine the Rakefile. _why From why at whytheluckystiff.net Mon Jul 24 11:54:44 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Mon, 24 Jul 2006 10:54:44 -0500 Subject: difference between running unabridged In-Reply-To: <78181ce60607240039k57305f4ah42ca4e40b92f66d6@mail.gmail.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> <78181ce60607240039k57305f4ah42ca4e40b92f66d6@mail.gmail.com> Message-ID: <20060724155444.GE31525@lstsv-3264.layeredtech.com> On Mon, Jul 24, 2006 at 04:39:20PM +0900, Mathieu Jobin wrote: > another problem.... > for some reason > on line 75 of > /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/fastcgi.rb > req.env['PATH_INFO'] is nil > making any of my FastCGI app to error out. > adding .to_s skip that error, I'm not sure is that PATH_INFO var This could be how Apache/FastCGI works. I have not tried with Apache/FastCGI yet, so I will try it and get back to you. Okay, I see that you are only serving a single file now, Mathieu. I've just released the 1.4.139 gem, which will let you pass a single script into .serve: #!/usr/local/bin/ruby require 'rubygems' require 'camping/fastcgi' Camping::Models::Base.establish_connection :adapter => 'sqlite3', :database => "/var/www/camping.db" Camping::FastCGI.serve("/var/www/diary.rb") Or tarball is available: http://code.whytheluckystiff.net/dist/camping-1.4.139.tgz _why From mathieu at justbudget.com Mon Jul 24 20:19:34 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Tue, 25 Jul 2006 09:19:34 +0900 Subject: difference between running unabridged In-Reply-To: <20060724155444.GE31525@lstsv-3264.layeredtech.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> <78181ce60607240039k57305f4ah42ca4e40b92f66d6@mail.gmail.com> <20060724155444.GE31525@lstsv-3264.layeredtech.com> Message-ID: <78181ce60607241719x7aba9e96hfb3907ecb6435002@mail.gmail.com> thank you very much. but quick question, isn't .start the same as .serve for a single file ? is .start broken or usefull only for mongrel and friends? thanks for the updated gem, I'll try it today. Mathieu On 7/25/06, why the lucky stiff wrote: > > On Mon, Jul 24, 2006 at 04:39:20PM +0900, Mathieu Jobin wrote: > > another problem.... > > for some reason > > on line 75 of > > /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/fastcgi.rb > > req.env['PATH_INFO'] is nil > > making any of my FastCGI app to error out. > > adding .to_s skip that error, I'm not sure is that PATH_INFO var > > This could be how Apache/FastCGI works. I have not tried with > Apache/FastCGI > yet, so I will try it and get back to you. > > Okay, I see that you are only serving a single file now, Mathieu. I've > just > released the 1.4.139 gem, which will let you pass a single script into > .serve: > > #!/usr/local/bin/ruby > require 'rubygems' > require 'camping/fastcgi' > Camping::Models::Base.establish_connection :adapter => 'sqlite3', > :database => "/var/www/camping.db" > Camping::FastCGI.serve("/var/www/diary.rb") > > Or tarball is available: > > http://code.whytheluckystiff.net/dist/camping-1.4.139.tgz > > _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/20060725/694fa755/attachment-0001.html From mathieu at justbudget.com Mon Jul 24 20:19:34 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Tue, 25 Jul 2006 09:19:34 +0900 Subject: difference between running unabridged In-Reply-To: <20060724155444.GE31525@lstsv-3264.layeredtech.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> <78181ce60607240039k57305f4ah42ca4e40b92f66d6@mail.gmail.com> <20060724155444.GE31525@lstsv-3264.layeredtech.com> Message-ID: <78181ce60607241719x7aba9e96hfb3907ecb6435002@mail.gmail.com> thank you very much. but quick question, isn't .start the same as .serve for a single file ? is .start broken or usefull only for mongrel and friends? thanks for the updated gem, I'll try it today. Mathieu On 7/25/06, why the lucky stiff wrote: > > On Mon, Jul 24, 2006 at 04:39:20PM +0900, Mathieu Jobin wrote: > > another problem.... > > for some reason > > on line 75 of > > /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.138/lib/camping/fastcgi.rb > > req.env['PATH_INFO'] is nil > > making any of my FastCGI app to error out. > > adding .to_s skip that error, I'm not sure is that PATH_INFO var > > This could be how Apache/FastCGI works. I have not tried with > Apache/FastCGI > yet, so I will try it and get back to you. > > Okay, I see that you are only serving a single file now, Mathieu. I've > just > released the 1.4.139 gem, which will let you pass a single script into > .serve: > > #!/usr/local/bin/ruby > require 'rubygems' > require 'camping/fastcgi' > Camping::Models::Base.establish_connection :adapter => 'sqlite3', > :database => "/var/www/camping.db" > Camping::FastCGI.serve("/var/www/diary.rb") > > Or tarball is available: > > http://code.whytheluckystiff.net/dist/camping-1.4.139.tgz > > _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/20060725/694fa755/attachment-0002.html From why at whytheluckystiff.net Mon Jul 24 20:44:27 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Mon, 24 Jul 2006 19:44:27 -0500 Subject: difference between running unabridged In-Reply-To: <78181ce60607241719x7aba9e96hfb3907ecb6435002@mail.gmail.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> <78181ce60607240039k57305f4ah42ca4e40b92f66d6@mail.gmail.com> <20060724155444.GE31525@lstsv-3264.layeredtech.com> <78181ce60607241719x7aba9e96hfb3907ecb6435002@mail.gmail.com> Message-ID: <20060725004426.GH31525@lstsv-3264.layeredtech.com> On Tue, Jul 25, 2006 at 09:19:34AM +0900, Mathieu Jobin wrote: > thank you very much. > but quick question, isn't .start the same as .serve for a single file ? is > .start broken or usefull only for mongrel and friends? Camping::FastCGI#serve loads the app(s) through Camping::Reloader, which will refresh the script should it change. Camping::FastCGI#start mounts a single class at the route. It is less useful, but I'm keeping it as an example of how to use the app without the automatic reload. For example, if we get other frameworks to run playfully alongside Camping, then people may want to use a myriad of frameworks to do their thing. _why From why at whytheluckystiff.net Mon Jul 24 20:48:54 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Mon, 24 Jul 2006 19:48:54 -0500 Subject: [UHH] any blogs sprung from camping? Message-ID: <20060725004854.GI31525@lstsv-3264.layeredtech.com> Hal Fulton has been e-mailing me about putting together a simple blogging package for Camping. Perhaps start with the blog in the examples and add a few things. Does anyone here want to collaborate with him? Or do any of you have your own works to offer? He's mentioned he wants something with its own template syntax, but I think he could hack that in. _why From mathieu at justbudget.com Mon Jul 24 22:01:22 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Tue, 25 Jul 2006 11:01:22 +0900 Subject: difference between running unabridged In-Reply-To: References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> <3ff63f9b0607240038j633d033etc7532231b752530f@mail.gmail.com> <78181ce60607240136i39ffeb54w58027bd6bb5e8bf2@mail.gmail.com> <3ff63f9b0607240208y2f90901ap8d38f865d43ad636@mail.gmail.com> Message-ID: <78181ce60607241901t472c09adn52b6a9392dceba1c@mail.gmail.com> CGI works fine for me. only FastCGI is a problem. your module ForestWatcher, is it for CGI or FastCGI ? Mathieu On 7/24/06, Manfred Stienstra wrote: > > > On 24-jul-2006, at 11:08, Jonas Pfenniger wrote: > > > On 24/07/06, Mathieu Jobin wrote: > >> how are you maintaining this camping.rb file ? > >> I thought you were editing the unabridged version which was > >> automatically > >> compressed into camping.rb > >> no ? > > > > No, camping.rb is recoded by hand. This is why both files sometimes > > get out of sync. > > I'm sorry I'm not using fcgi. You should try to get the following : > > * Camping from SVN, and apply the [PATCH] AR fixes patch from Trac. > > * Markaby from SVN, the xhtml-careful branch. > > > > And join #camping on freenode ;-) > > I did experience a lot of trouble running camping with cgi under > apache. I never got fcgi working. Most of the problems have to do > with SCRIPT_NAME and path related stuff. I had to do the following to > get it to work: > > module ForestWatcher > def service(*a) > @root = ENV['SCRIPT_NAME'].sub '/forestwatcher.rb', '' unless ENV > ['SCRIPT_NAME'].nil? > super(*a) > end > end > _______________________________________________ > 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/20060725/7537a2c4/attachment.html From mathieu at justbudget.com Mon Jul 24 22:11:58 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Tue, 25 Jul 2006 11:11:58 +0900 Subject: about PATH_INFO and FastCGI Message-ID: <78181ce60607241911s32b71515u7983ac952c35a130@mail.gmail.com> in one of my recent email, I add .to_s to PATH_INFO in camping code. actually, this is probably very wrong. the problem is probably something like PATH_INFO does not exist when using FastCGI. I have not done all my homework, but so far what I found is lighttpd has a special option "broken-scriptfilename": breaks SCRIPT_FILENAME in a wat that PHP can extract PATH_INFO from it (default: disabled) which seems to do what we need. maybe there is an equivalent in Apache, or Camping needs to cut PATH_INFO from SCRIPT_FILENAME. also, I quickly saw a reference about FILEPATH_INFO, I'm not sure what is the difference. or if we can use it. /me back to work..... tanoshimi ne -- 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/20060725/93dfa7c7/attachment.html From mathieu at justbudget.com Mon Jul 24 22:17:16 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Tue, 25 Jul 2006 11:17:16 +0900 Subject: about PATH_INFO and FastCGI In-Reply-To: <78181ce60607241911s32b71515u7983ac952c35a130@mail.gmail.com> References: <78181ce60607241911s32b71515u7983ac952c35a130@mail.gmail.com> Message-ID: <78181ce60607241917x601cd669q9a1be0fd37c3023b@mail.gmail.com> apparently FILEPATH_INFO would be the "old" value of PATH_INFO has it was in Apache 1.1 On 7/25/06, Mathieu Jobin wrote: > > in one of my recent email, I add .to_s to PATH_INFO in camping code. > actually, this is probably very wrong. the problem is probably something > like PATH_INFO does not exist when using FastCGI. > I have not done all my homework, but so far what I found is lighttpd has a > special option > > "broken-scriptfilename": breaks SCRIPT_FILENAME in a wat that PHP can > extract PATH_INFO from it (default: disabled) > which seems to do what we need. maybe there is an equivalent in Apache, or > Camping needs to cut PATH_INFO from SCRIPT_FILENAME. > also, I quickly saw a reference about FILEPATH_INFO, I'm not sure what is > the difference. or if we can use it. > > /me back to work..... tanoshimi ne > > -- > 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 > -- 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/20060725/4afe1704/attachment.html From mathieu at justbudget.com Mon Jul 24 22:35:27 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Tue, 25 Jul 2006 11:35:27 +0900 Subject: about PATH_INFO and FastCGI In-Reply-To: <78181ce60607241917x601cd669q9a1be0fd37c3023b@mail.gmail.com> References: <78181ce60607241911s32b71515u7983ac952c35a130@mail.gmail.com> <78181ce60607241917x601cd669q9a1be0fd37c3023b@mail.gmail.com> Message-ID: <78181ce60607241935r222fbf11k12143c82093b7f44@mail.gmail.com> may I ask what exactly are you looking for in the PATH_INFO variable ? all the info I can find dates from 1997-2002 > grep -i -rn 'PATH_INFO' . | grep -v "\.svn" ./lib/camping.rb:683: k,a=X.D un("/#{e['PATH_INFO']}".gsub(/\/+/,'/')) ./lib/camping/fastcgi.rb:75: #raise [req.env['SCRIPT_NAME'], req.env['PATH_INFO'], req.env].inspect ./lib/camping/fastcgi.rb:76: path = req.env['SCRIPT_NAME'] + req.env['PATH_INFO'].to_s ./lib/camping/fastcgi.rb:83: req.env['PATH_INFO'] = path.gsub(/^#{dir}/, '') ./lib/camping-tmp.rb :43:'PATH_INFO']}".gsub(/\/+/,'/'));k.new(r,e,(m=e['REQUEST_METHOD']||"GET")). -tmp is short camping.rb and camping.rb is unabridged. maybe we could find the content of PATH_INFO in some newer variable? Mathieu On 7/25/06, Mathieu Jobin wrote: > > apparently FILEPATH_INFO would be the "old" value of PATH_INFO has it was > in Apache 1.1 > > > On 7/25/06, Mathieu Jobin < mathieu at justbudget.com> wrote: > > > > in one of my recent email, I add .to_s to PATH_INFO in camping code. > > actually, this is probably very wrong. the problem is probably something > > like PATH_INFO does not exist when using FastCGI. > > I have not done all my homework, but so far what I found is lighttpd has > > a special option > > > > "broken-scriptfilename": breaks SCRIPT_FILENAME in a wat that PHP can > > extract PATH_INFO from it (default: disabled) > > which seems to do what we need. maybe there is an equivalent in Apache, > > or Camping needs to cut PATH_INFO from SCRIPT_FILENAME. > > also, I quickly saw a reference about FILEPATH_INFO, I'm not sure what > > is the difference. or if we can use it. > > > > /me back to work..... tanoshimi ne > > > > -- > > 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 > > > > > > -- > 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 > -- 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/20060725/dee8cbea/attachment-0001.html From why at whytheluckystiff.net Tue Jul 25 00:42:49 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Mon, 24 Jul 2006 23:42:49 -0500 Subject: about PATH_INFO and FastCGI In-Reply-To: <78181ce60607241935r222fbf11k12143c82093b7f44@mail.gmail.com> References: <78181ce60607241911s32b71515u7983ac952c35a130@mail.gmail.com> <78181ce60607241917x601cd669q9a1be0fd37c3023b@mail.gmail.com> <78181ce60607241935r222fbf11k12143c82093b7f44@mail.gmail.com> Message-ID: <20060725044249.GJ31525@lstsv-3264.layeredtech.com> On Tue, Jul 25, 2006 at 11:35:27AM +0900, Mathieu Jobin wrote: > may I ask what exactly are you looking for in the PATH_INFO variable ? SCRIPT_NAME contains the path the script is attached to. PATH_INFO is the remaining parts of the URL. For example, under traditional CGI, a blog.rb placed under the web server's /scripts/ directory could be called like this: REQUEST_URI SCRIPT_NAME PATH_INFO ------------------------+------------------+------------- /scripts/blog.rb/ /scripts/blog.rb / /scripts/blog.rb/add /scripts/blog.rb /add /scripts/blog.rb/view/1 /scripts/blog.rb /view/1 In most cases, we're mounting the script at /. Or maybe at a directory: /app. Camping is designed to use these same variables. Usually it's a matter of finding the right configuration settings. I don't think mod_fastcgi or mod_fcgid have options to mount a single app, though, so it might need some rewrite rules. _why From mathieu at justbudget.com Tue Jul 25 01:39:31 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Tue, 25 Jul 2006 14:39:31 +0900 Subject: about PATH_INFO and FastCGI In-Reply-To: <20060725044249.GJ31525@lstsv-3264.layeredtech.com> References: <78181ce60607241911s32b71515u7983ac952c35a130@mail.gmail.com> <78181ce60607241917x601cd669q9a1be0fd37c3023b@mail.gmail.com> <78181ce60607241935r222fbf11k12143c82093b7f44@mail.gmail.com> <20060725044249.GJ31525@lstsv-3264.layeredtech.com> Message-ID: <78181ce60607242239n75b1b6c3w4b390a5e938e2485@mail.gmail.com> actually i would not mind using some rewriting rules, mounting the app at a special URL is not mandatory. all I want is to get Camping to work with Apache/mod_fastcgi which does not seems to be possible, as it is now. thanks On 7/25/06, why the lucky stiff wrote: > > On Tue, Jul 25, 2006 at 11:35:27AM +0900, Mathieu Jobin wrote: > > may I ask what exactly are you looking for in the PATH_INFO variable ? > > SCRIPT_NAME contains the path the script is attached to. > PATH_INFO is the remaining parts of the URL. > > For example, under traditional CGI, a blog.rb placed under the web > server's > /scripts/ directory could be called like this: > > REQUEST_URI SCRIPT_NAME PATH_INFO > ------------------------+------------------+------------- > /scripts/blog.rb/ /scripts/blog.rb / > /scripts/blog.rb/add /scripts/blog.rb /add > /scripts/blog.rb/view/1 /scripts/blog.rb /view/1 > > In most cases, we're mounting the script at /. Or maybe at a directory: > /app. > > Camping is designed to use these same variables. Usually it's a matter of > finding the right configuration settings. I don't think mod_fastcgi or > mod_fcgid have options to mount a single app, though, so it might need > some > rewrite rules. > > _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/20060725/e126293b/attachment.html From mathieu at justbudget.com Tue Jul 25 02:14:24 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Tue, 25 Jul 2006 15:14:24 +0900 Subject: + camping 1.4.138 In-Reply-To: <78181ce60607231953y7209430cj4955ff3205358ef7@mail.gmail.com> References: <20060718203234.GB91557@lstsv-3264.layeredtech.com> <78181ce60607231953y7209430cj4955ff3205358ef7@mail.gmail.com> Message-ID: <78181ce60607242314u32784e9cwc32d2da8c698570d@mail.gmail.com> FYI : those warnings seems to be from markaby not camping On 7/24/06, Mathieu Jobin wrote: > > errors installing > > [mathieu at hikonehq ~/mv]$ sudo gem install camping --source > code.whytheluckystiff.net > Password: > Attempting local installation of 'camping' > Local gem file not found: camping*.gem > Attempting remote installation of 'camping' > Updating Gem source index for: http://code.whytheluckystiff.net > Install required dependency markaby? [Yn] > Successfully installed camping-1.4.138 > Successfully installed markaby-0.4.65 > Installing RDoc documentation for camping-1.4.138... > Installing RDoc documentation for markaby-0.4.65... > /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:25: warning: > already initialized constant FONTS > /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:235: > warning: already initialized constant STYLE > /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:335: > warning: already initialized constant FILE_PAGE > /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:384: > warning: already initialized constant CLASS_PAGE > /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:604: > warning: already initialized constant METHOD_LIST > /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:621: > warning: already initialized constant BODY > /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:649: > warning: already initialized constant FR_INDEX_BODY > /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:675: > warning: already initialized constant FILE_INDEX > /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:677: > warning: already initialized constant CLASS_INDEX > /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:678: > warning: already initialized constant METHOD_INDEX > /usr/local/lib/ruby/1.8/rdoc/generators/template/html/html.rb:704: > warning: already initialized constant INDEX > /usr/local/lib/ruby/1.8/rdoc/generators/template/html/one_page_html.rb:76: > warning: already initialized constant CONTENTS_XML > Error in template: Template error: can't find variable 'title' > Original line: %title% > [mathieu at hikonehq ~/mv]$ > > warnings does not matter too much, but the last one should be corrected I > suppose > > regards, > > > > On 7/19/06, why the lucky stiff wrote: > > > > Just up: > > > > gem install camping --source code.whytheluckystiff.net > > > > The changes: > > > > * Both bin/camping and Camping::FastCGI.serve now act according to the > > Camping Server specification.[1] > > * Docs are complete. > > > > _why > > > > [1] https://code.whytheluckystiff.net/camping/wiki/TheCampingServer > > _______________________________________________ > > 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 > -- 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/20060725/fdd2f526/attachment.html From manfred at gmail.com Tue Jul 25 02:33:05 2006 From: manfred at gmail.com (Manfred Stienstra) Date: Tue, 25 Jul 2006 08:33:05 +0200 Subject: difference between running unabridged In-Reply-To: <78181ce60607241901t472c09adn52b6a9392dceba1c@mail.gmail.com> References: <78181ce60607232350x761fdc61ycea66e9ef6e63f52@mail.gmail.com> <78181ce60607240009t46618550k1b1376749dd3e7c0@mail.gmail.com> <78181ce60607240017k71e56139g6dc420932888b42f@mail.gmail.com> <3ff63f9b0607240038j633d033etc7532231b752530f@mail.gmail.com> <78181ce60607240136i39ffeb54w58027bd6bb5e8bf2@mail.gmail.com> <3ff63f9b0607240208y2f90901ap8d38f865d43ad636@mail.gmail.com> <78181ce60607241901t472c09adn52b6a9392dceba1c@mail.gmail.com> Message-ID: On Jul 25, 2006, at 4:01 AM, Mathieu Jobin wrote: > CGI works fine for me. only FastCGI is a problem. > your module ForestWatcher, is it for CGI or FastCGI The app is called ForestWatcher, and it's running on CGI right now. Manfred From why at whytheluckystiff.net Tue Jul 25 03:03:44 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Tue, 25 Jul 2006 02:03:44 -0500 Subject: + camping 1.4.140 -- apache+fastcgi, lighttpd+fastcgi Message-ID: <20060725070344.GA32504@lstsv-3264.layeredtech.com> Okay, I have tested mounting several of my apps under Lighttpd and Apache, both running FastCGI. I'm going to explain the configuration, but first: update. gem install camping --source code.whytheluckstiff.net == Mounting Root for Lighttpd+FastCGI == server.port = 3045 server.bind = "192.168.0.103" server.modules = ( "mod_fastcgi" ) server.document-root = "/usr/local/www/data/examples/" server.errorlog = "/usr/local/www/data/examples/error.log" #### fastcgi module fastcgi.server = ( "" => ( "localhost" => ( "socket" => "/tmp/camping-examples.socket", "bin-path" => "/usr/local/www/data/examples.rb", "bin-environment" => ("FORCE_ROOT" => "1"), "check-local" => "disable", "max-procs" => 1 ) ) ) Notice the FORCE_ROOT setting. When you mount at "", PATH_INFO breaks. Lots of other web framework just use SCRIPT_NAME everytime lighttpd is found (see: Jifty, Catalyst.) I don't want to do that, it's unpredictable. Mount at "" and use FORCE_ROOT. DO NOT MOUNT AT "/". == Mounting Root for Apache2+FastCGI == AddHandler fastcgi-script rb ScriptAlias / /usr/local/www/data/examples.rb/ This is if mod_fastcgi is loaded. I haven't figured out mod_fcgid yet. == Mounting Subdirectory for Lighttpd+FastCGI == server.port = 3045 server.bind = "192.168.0.103" server.modules = ( "mod_fastcgi" ) server.document-root = "/usr/local/www/data/examples/" server.errorlog = "/usr/local/www/data/examples/error.log" #### fastcgi module fastcgi.server = ( "/examples" => ( "localhost" => ( "socket" => "/tmp/camping-examples.socket", "bin-path" => "/usr/local/www/data/examples.rb", "check-local" => "disable", "max-procs" => 1 ) ) ) No need to use FORCE_ROOT. DO NOT PUT A SLASH AT THE END OF YOUR SUBDIRECTORY NAME. See, "/examples/" will break the above. == Mounting Subdirectory for Apache2+FastCGI == AddHandler fastcgi-script rb ScriptAlias /examples /usr/local/www/data/examples.rb/ == What does /usr/local/www/data/examples.rb look like? == I'm testing with all my development paths in there. #!/home/why/sand/RUBY-1_8_HEAD/bin/ruby require 'rubygems' require 'camping/fastcgi' Camping::Models::Base.establish_connection :adapter => 'sqlite3', :database => "/tmp/camping.db" Camping::FastCGI.serve("/home/why/cvs/camping/examples/") == What if I only want to serve up one file? == Change the path. Point to a file instead of a directory. See the last line here: #!/home/why/sand/RUBY-1_8_HEAD/bin/ruby require 'rubygems' require 'camping/fastcgi' Camping::Models::Base.establish_connection :adapter => 'sqlite3', :database => "/tmp/camping.db" Camping::FastCGI.serve("/home/why/cvs/camping/examples/blog.rb") These changes only work with r140. _why From manfred at gmail.com Tue Jul 25 03:36:02 2006 From: manfred at gmail.com (Manfred Stienstra) Date: Tue, 25 Jul 2006 09:36:02 +0200 Subject: + camping 1.4.140 -- apache+fastcgi, lighttpd+fastcgi In-Reply-To: <20060725070344.GA32504@lstsv-3264.layeredtech.com> References: <20060725070344.GA32504@lstsv-3264.layeredtech.com> Message-ID: On 25-jul-2006, at 9:03, why the lucky stiff wrote: > Okay, I have tested mounting several of my apps under Lighttpd and > Apache, > both running FastCGI. I'm going to explain the configuration, but > first: > update. Ah very nice, thanks _why. Are you putting this on the wiki as well? From mathieu at justbudget.com Tue Jul 25 03:38:18 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Tue, 25 Jul 2006 16:38:18 +0900 Subject: + camping 1.4.140 -- apache+fastcgi, lighttpd+fastcgi In-Reply-To: <20060725070344.GA32504@lstsv-3264.layeredtech.com> References: <20060725070344.GA32504@lstsv-3264.layeredtech.com> Message-ID: <78181ce60607250038s110713ddsaf3272e70cfb6c6f@mail.gmail.com> actually I cannot beleive it, I also got it to work, with 1.4.139 :) [mathieu at hikonehq /usr/home/mathieu/camping]$ diff -r /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.139/lib lib Only in lib: .svn Only in lib/camping: .svn diff -r /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.139/lib/camping/fastcgi.rb lib/camping/fastcgi.rb 75c75 < path = req.env['SCRIPT_NAME'] + req.env['PATH_INFO'].to_s --- > path = req.env['SCRIPT_NAME'] + req.env['PATH_INFO'] 126c126 < Dir[File.join(path, '*.{rb,fcgi}')].each &script_load --- > Dir[File.join(path, '*.rb')].each &script_load 130,131c130,131 < Dir[File.join(path, dir, '*.{rb,fcgi}')].each do |script| < smount = "/" + script # .gsub(/\.(rb|fcgi)$/, '') --- > Dir[File.join(path, dir, '*.rb')].each do |script| > smount = "/" + File.basename(script, '.rb') [mathieu at hikonehq /usr/home/mathieu/camping]$ svn stat lib [mathieu at hikonehq /usr/home/mathieu/camping]$ please pay attention here. /usr/local/lib/ruby/gems/1.8/gems/camping-1.4.139/lib/ is the MODIFIED version ./lib is unmodified. with this patch 139 works with Apache 2.2 and mod_fastcgi which is all I care about. now _why thanks for your advice with ScriptAlias I might just use that to hide the cgi name thanks a bunch ! now the fun starts !!!!!!!!!!!!!!!!! On 7/25/06, why the lucky stiff wrote: > > Okay, I have tested mounting several of my apps under Lighttpd and Apache, > both running FastCGI. I'm going to explain the configuration, but first: > update. > > gem install camping --source code.whytheluckstiff.net > > == Mounting Root for Lighttpd+FastCGI == > > server.port = 3045 > server.bind = "192.168.0.103" > server.modules = ( "mod_fastcgi" ) > server.document-root = "/usr/local/www/data/examples/" > server.errorlog = "/usr/local/www/data/examples/error.log" > > #### fastcgi module > fastcgi.server = ( "" => ( > "localhost" => ( > "socket" => "/tmp/camping-examples.socket", > "bin-path" => "/usr/local/www/data/examples.rb", > "bin-environment" => ("FORCE_ROOT" => "1"), > "check-local" => "disable", > "max-procs" => 1 ) ) ) > > Notice the FORCE_ROOT setting. When you mount at "", PATH_INFO > breaks. Lots of > other web framework just use SCRIPT_NAME everytime lighttpd is found (see: > Jifty, Catalyst.) I don't want to do that, it's unpredictable. > > Mount at "" and use FORCE_ROOT. DO NOT MOUNT AT "/". > > == Mounting Root for Apache2+FastCGI == > > AddHandler fastcgi-script rb > ScriptAlias / /usr/local/www/data/examples.rb/ > > This is if mod_fastcgi is loaded. I haven't figured out mod_fcgid yet. > > == Mounting Subdirectory for Lighttpd+FastCGI == > > server.port = 3045 > server.bind = "192.168.0.103" > server.modules = ( "mod_fastcgi" ) > server.document-root = "/usr/local/www/data/examples/" > server.errorlog = "/usr/local/www/data/examples/error.log" > > #### fastcgi module > fastcgi.server = ( "/examples" => ( > "localhost" => ( > "socket" => "/tmp/camping-examples.socket", > "bin-path" => "/usr/local/www/data/examples.rb", > "check-local" => "disable", > "max-procs" => 1 ) ) ) > > No need to use FORCE_ROOT. DO NOT PUT A SLASH AT THE END OF YOUR > SUBDIRECTORY > NAME. See, "/examples/" will break the above. > > == Mounting Subdirectory for Apache2+FastCGI == > > AddHandler fastcgi-script rb > ScriptAlias /examples /usr/local/www/data/examples.rb/ > > == What does /usr/local/www/data/examples.rb look like? == > > I'm testing with all my development paths in there. > > #!/home/why/sand/RUBY-1_8_HEAD/bin/ruby > require 'rubygems' > require 'camping/fastcgi' > Camping::Models::Base.establish_connection :adapter => 'sqlite3', > :database => "/tmp/camping.db" > Camping::FastCGI.serve("/home/why/cvs/camping/examples/") > > == What if I only want to serve up one file? == > > Change the path. Point to a file instead of a directory. See the last > line > here: > > #!/home/why/sand/RUBY-1_8_HEAD/bin/ruby > require 'rubygems' > require 'camping/fastcgi' > Camping::Models::Base.establish_connection :adapter => 'sqlite3', > :database => "/tmp/camping.db" > Camping::FastCGI.serve("/home/why/cvs/camping/examples/blog.rb") > > These changes only work with r140. > > _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/20060725/ff34e044/attachment-0001.html From mathieu at justbudget.com Tue Jul 25 04:57:54 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Tue, 25 Jul 2006 17:57:54 +0900 Subject: ran into a weird bug.... Message-ID: <78181ce60607250157h486e5c23u3879fe64fc9fc20c@mail.gmail.com> I'm modifying the Blog example, as it is, its nearly unmodified. If I access /blog.rb/add I am asked to login (of course), once logged in, If I access /blog.rb/add again, I get a 404 Not Found error from Apache, not from Camping saying...... Not Found The requested URL /rf.mathieu.mv.sha/blog.rb/ was not found on this server. the URL accessed is http://rf.mathieu.mv.sha/blog.rb/add rf.mathieu.mv.sha is the HOST, why(HOW) the hell Apache thinks its part of the path? rather impossible, unless ENV variable are being manipulated, oh wait,... does not Camping actually modify those variables???? any idea where the problem could be coming from? need help here. THANKS ! this is using Apache/CGI (yes, simple CGI for development) also, I realized, that access /add would automatically create an empty Blog row. and accessing /edit would execute the 'def post' code. would not post and get being inverted somewhere????????? regards -- 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/20060725/b2e3ec11/attachment.html From zimba.tm at gmail.com Tue Jul 25 06:47:47 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 25 Jul 2006 12:47:47 +0200 Subject: [UHH] any blogs sprung from camping? In-Reply-To: <20060725004854.GI31525@lstsv-3264.layeredtech.com> References: <20060725004854.GI31525@lstsv-3264.layeredtech.com> Message-ID: <3ff63f9b0607250347t7f19f0dfp1af44c99f71f87ed@mail.gmail.com> Do you have his e-mail address ? On 25/07/06, why the lucky stiff wrote: > Hal Fulton has been e-mailing me about putting together a simple blogging > package for Camping. Perhaps start with the blog in the examples and add a few > things. Does anyone here want to collaborate with him? Or do any of you have > your own works to offer? > > He's mentioned he wants something with its own template syntax, but I think he > could hack that in. > > _why > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -- Cheers, zimbatm http://zimbatm.oree.ch From mando.escamilla at gmail.com Tue Jul 25 09:52:32 2006 From: mando.escamilla at gmail.com (Mando Escamilla) Date: Tue, 25 Jul 2006 08:52:32 -0500 Subject: [UHH] any blogs sprung from camping? In-Reply-To: <3ff63f9b0607250347t7f19f0dfp1af44c99f71f87ed@mail.gmail.com> References: <20060725004854.GI31525@lstsv-3264.layeredtech.com> <3ff63f9b0607250347t7f19f0dfp1af44c99f71f87ed@mail.gmail.com> Message-ID: <4c4d90610607250652l305a6e61q65a3582176f5f706@mail.gmail.com> Jonas, Hal and I have been going back and forth about some of the things we want our little blog to do. I can send you my notes if you like. In fact, if anyone else is interested in working on this, please drop me or Hal a note. The more the merrier :). You can reach Hal at *hal9000 at hypermetrics.com.* -- Mando On 7/25/06, Jonas Pfenniger wrote: > > Do you have his e-mail address ? > > On 25/07/06, why the lucky stiff wrote: > > Hal Fulton has been e-mailing me about putting together a simple > blogging > > package for Camping. Perhaps start with the blog in the examples and > add a few > > things. Does anyone here want to collaborate with him? Or do any of > you have > > your own works to offer? > > > > He's mentioned he wants something with its own template syntax, but I > think he > > could hack that in. > > > > _why > > _______________________________________________ > > Camping-list mailing list > > Camping-list at rubyforge.org > > http://rubyforge.org/mailman/listinfo/camping-list > > > > > -- > 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/20060725/016c9cd3/attachment.html From why at whytheluckystiff.net Tue Jul 25 10:42:52 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Tue, 25 Jul 2006 09:42:52 -0500 Subject: + camping 1.4.140 -- apache+fastcgi, lighttpd+fastcgi In-Reply-To: References: <20060725070344.GA32504@lstsv-3264.layeredtech.com> Message-ID: <20060725144252.GB32504@lstsv-3264.layeredtech.com> On Tue, Jul 25, 2006 at 09:36:02AM +0200, Manfred Stienstra wrote: > Ah very nice, thanks _why. Are you putting this on the wiki as well? Yes, they are under TheCampingServer recipes[1]. _why [1] http://code.whytheluckystiff.net/camping/wiki/TheCampingServer#WebServerRecipes From zimba.tm at gmail.com Tue Jul 25 11:07:11 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Tue, 25 Jul 2006 17:07:11 +0200 Subject: [UHH] any blogs sprung from camping? In-Reply-To: <4c4d90610607250652l305a6e61q65a3582176f5f706@mail.gmail.com> References: <20060725004854.GI31525@lstsv-3264.layeredtech.com> <3ff63f9b0607250347t7f19f0dfp1af44c99f71f87ed@mail.gmail.com> <4c4d90610607250652l305a6e61q65a3582176f5f706@mail.gmail.com> Message-ID: <3ff63f9b0607250807t33c9f5b6o81ea48337267929d@mail.gmail.com> What is interesting in Camping is it's structure. It makes you want to create tons of little apps that are flying around the world. Ah, I'm really bad at writing so i've joined a little schema of how I see the thing. The biggest problem in Camping is authentication. This is a problem I propose to solve by providing an extension. That little bit of code uses the path to allow/disallow urls. That way it is unobstrusive. In the future I would also like to make an OpenID client and server for Camping. The second problem is that you can only run one instance of an app in a server. I would find it better to be able to duplicate instances, cool for multi blogging. But I digress. Did you already made a list of features that you want in your future Blog engine ? -- Cheers, zimbatm http://zimbatm.oree.ch -------------- next part -------------- A non-text attachment was scrubbed... Name: structure.png Type: image/png Size: 18900 bytes Desc: not available Url : http://rubyforge.org/pipermail/camping-list/attachments/20060725/e3b29e8a/attachment-0001.png From mathieu at justbudget.com Tue Jul 25 20:39:06 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Wed, 26 Jul 2006 09:39:06 +0900 Subject: get/post bug Message-ID: <78181ce60607251739y6f0a682fu2e5e2d8627469f82@mail.gmail.com> I'm not sure if its a bug in the blog example or in the framework but each time I hit edit, both get and post get called, no matter of the actual http method. anyone encounter that bug? -- 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/20060726/7f5db192/attachment.html From mathieu at justbudget.com Tue Jul 25 23:59:00 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Wed, 26 Jul 2006 12:59:00 +0900 Subject: get/post bug In-Reply-To: <78181ce60607251739y6f0a682fu2e5e2d8627469f82@mail.gmail.com> References: <78181ce60607251739y6f0a682fu2e5e2d8627469f82@mail.gmail.com> Message-ID: <78181ce60607252059o7c24680br2c655f67d7fa00f6@mail.gmail.com> ok, its fine now. something I was miss understanding. now, I'm not sure how the magic is done to call get and post. but I wish the same magic would be there for all REST method. get/post/put/delete On 7/26/06, Mathieu Jobin wrote: > > I'm not sure if its a bug in the blog example or in the framework but each > time I hit edit, both get and post get called, no matter of the actual http > method. > > anyone encounter that bug? > > -- > 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 > -- 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/20060726/89037a26/attachment.html From tlockney at gmail.com Wed Jul 26 00:55:25 2006 From: tlockney at gmail.com (Thomas Lockney) Date: Tue, 25 Jul 2006 21:55:25 -0700 Subject: get/post bug In-Reply-To: <78181ce60607252059o7c24680br2c655f67d7fa00f6@mail.gmail.com> References: <78181ce60607251739y6f0a682fu2e5e2d8627469f82@mail.gmail.com> <78181ce60607252059o7c24680br2c655f67d7fa00f6@mail.gmail.com> Message-ID: On 7/25/06, Mathieu Jobin wrote: > ok, its fine now. something I was miss understanding. > > now, I'm not sure how the magic is done to call get and post. but I wish the > same magic would be there for all REST method. > > get/post/put/delete Mathieu, there's not much magic in that handling. It just takes the incoming HTTP method and calls the corresponding method in your class. In theory, all it would take to handle put or delete is to add those methods to your code. The problem is that HTML does not support those methods. That is
doesn't work. It sucks, but that's the way it is. Even if we beg and plead the powers-that-be at the W3C to add it, it'll take years for the browsers to catch up. Rails gets around this problem by faking it and adding a hidden form value with the method. The things people will do... From mathieu at justbudget.com Wed Jul 26 01:57:00 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Wed, 26 Jul 2006 14:57:00 +0900 Subject: get/post bug In-Reply-To: References: <78181ce60607251739y6f0a682fu2e5e2d8627469f82@mail.gmail.com> <78181ce60607252059o7c24680br2c655f67d7fa00f6@mail.gmail.com> Message-ID: <78181ce60607252257padf5663h80aea8cdbd2d05f3@mail.gmail.com> The things people will do ....... ? its like an horror movie where the guy talk on the phone and suddenly gets his throat cut. unfortunately, its physically impossible for me to run to his house see how his doing and get myself killed in turn. back to the real life, what you said is true. I did not realize the browsers and the HTML did not support those methods. I thought the browser was stupidly sending to the server whatever and the server would reject method other than get and post. actually I can't find it in my httpd.conf but I really thought GET and POST was specially specified as ACCEPTED. in the mean time rails way ain't bad I guess . On 7/26/06, Thomas Lockney wrote: > > On 7/25/06, Mathieu Jobin wrote: > > ok, its fine now. something I was miss understanding. > > > > now, I'm not sure how the magic is done to call get and post. but I wish > the > > same magic would be there for all REST method. > > > > get/post/put/delete > > Mathieu, there's not much magic in that handling. It just takes the > incoming HTTP method and calls the corresponding method in your class. > In theory, all it would take to handle put or delete is to add those > methods to your code. The problem is that HTML does not support those > methods. That is
doesn't work. It sucks, > but that's the way it is. Even if we beg and plead the powers-that-be > at the W3C to add it, it'll take years for the browsers to catch up. > Rails gets around this problem by faking it and adding a hidden form > value with the method. The things people will do... > _______________________________________________ > 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/20060726/2067b459/attachment.html From mathieu at justbudget.com Wed Jul 26 02:02:05 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Wed, 26 Jul 2006 15:02:05 +0900 Subject: get/post bug In-Reply-To: <78181ce60607252257padf5663h80aea8cdbd2d05f3@mail.gmail.com> References: <78181ce60607251739y6f0a682fu2e5e2d8627469f82@mail.gmail.com> <78181ce60607252059o7c24680br2c655f67d7fa00f6@mail.gmail.com> <78181ce60607252257padf5663h80aea8cdbd2d05f3@mail.gmail.com> Message-ID: <78181ce60607252302l6def0cf6j8193d5819e28281e@mail.gmail.com> http://httpd.apache.org/docs/2.2/mod/core.html#limit looks like there is more than 4 On 7/26/06, Mathieu Jobin wrote: > > The things people will do ....... ? > > its like an horror movie where the guy talk on the phone and suddenly gets > his throat cut. > unfortunately, its physically impossible for me to run to his house see > how his doing and get myself killed in turn. > > back to the real life, what you said is true. I did not realize the > browsers and the HTML did not support those methods. I thought the browser > was stupidly sending to the server whatever and the server would reject > method other than get and post. actually I can't find it in my httpd.confbut I really thought GET and POST was specially specified as ACCEPTED. > > in the mean time rails way ain't bad I guess . > > > On 7/26/06, Thomas Lockney wrote: > > > > On 7/25/06, Mathieu Jobin < mathieu at justbudget.com > wrote: > > > ok, its fine now. something I was miss understanding. > > > > > > now, I'm not sure how the magic is done to call get and post. but I > > wish the > > > same magic would be there for all REST method. > > > > > > get/post/put/delete > > > > Mathieu, there's not much magic in that handling. It just takes the > > incoming HTTP method and calls the corresponding method in your class. > > In theory, all it would take to handle put or delete is to add those > > methods to your code. The problem is that HTML does not support those > > methods. That is
doesn't work. It sucks, > > but that's the way it is. Even if we beg and plead the powers-that-be > > at the W3C to add it, it'll take years for the browsers to catch up. > > Rails gets around this problem by faking it and adding a hidden form > > value with the method. The things people will do... > > _______________________________________________ > > 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 > -- 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/20060726/ed9c23c4/attachment.html From mathieu at justbudget.com Wed Jul 26 02:09:47 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Wed, 26 Jul 2006 15:09:47 +0900 Subject: get/post bug In-Reply-To: <78181ce60607252302l6def0cf6j8193d5819e28281e@mail.gmail.com> References: <78181ce60607251739y6f0a682fu2e5e2d8627469f82@mail.gmail.com> <78181ce60607252059o7c24680br2c655f67d7fa00f6@mail.gmail.com> <78181ce60607252257padf5663h80aea8cdbd2d05f3@mail.gmail.com> <78181ce60607252302l6def0cf6j8193d5819e28281e@mail.gmail.com> Message-ID: <78181ce60607252309v6f0e27d1h1acd0debc5942918@mail.gmail.com> this is really stupid,... the protection(limitation) is really in the browser server accepts anything. oldserverip:~ mathieu$ telnet somekool.net 80 Trying 64.111.120.165... Connected to somekool.net. Escape character is '^]'. GET /test_rest.php HTTP/1.1 host: www.somekool.net HTTP/1.1 200 OK Date: Wed, 26 Jul 2006 06:07:56 GMT Server: Apache/1.3.33 (Unix) mod_throttle/3.1.2 DAV/1.0.3 mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a PHP/4.4.2 mod_ssl/2.8.22 OpenSSL/0.9.7e X-Powered-By: PHP/5.1.2 Transfer-Encoding: chunked Content-Type: text/html 154 GET

GET

GET
0 PUConnection closed by foreign host. oldserverip:~ mathieu$ telnet somekool.net 80 Trying 64.111.120.165... Connected to somekool.net. Escape character is '^]'. PUT /test_rest.php HTTP/1.1 host: www.somekool.net HTTP/1.1 200 OK Date: Wed, 26 Jul 2006 06:08:15 GMT Server: Apache/1.3.33 (Unix) mod_throttle/3.1.2 DAV/1.0.3 mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a PHP/4.4.2 mod_ssl/2.8.22 OpenSSL/0.9.7e X-Powered-By: PHP/5.1.2 Transfer-Encoding: chunked Content-Type: text/html 154 PUT

PUT

PUT
0 Connection closed by foreign host. oldserverip:~ mathieu$ telnet somekool.net 80 Trying 64.111.120.165... Connected to somekool.net. Escape character is '^]'. WHATEVER /test_rest.php HTTP/1.1 host: www.somekool.net HTTP/1.1 200 OK Date: Wed, 26 Jul 2006 06:08:41 GMT Server: Apache/1.3.33 (Unix) mod_throttle/3.1.2 DAV/1.0.3 mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a PHP/4.4.2 mod_ssl/2.8.22 OpenSSL/0.9.7e X-Powered-By: PHP/5.1.2 Transfer-Encoding: chunked Content-Type: text/html 163 WHATEVER

WHATEVER

WHATEVER
0 Connection closed by foreign host. oldserverip:~ mathieu$ On 7/26/06, Mathieu Jobin wrote: > > http://httpd.apache.org/docs/2.2/mod/core.html#limit > > looks like there is more than 4 > > > On 7/26/06, Mathieu Jobin wrote: > > > > The things people will do ....... ? > > > > its like an horror movie where the guy talk on the phone and suddenly > > gets his throat cut. > > unfortunately, its physically impossible for me to run to his house see > > how his doing and get myself killed in turn. > > > > back to the real life, what you said is true. I did not realize the > > browsers and the HTML did not support those methods. I thought the browser > > was stupidly sending to the server whatever and the server would reject > > method other than get and post. actually I can't find it in my > > httpd.conf but I really thought GET and POST was specially specified as > > ACCEPTED. > > > > in the mean time rails way ain't bad I guess . > > > > > > On 7/26/06, Thomas Lockney wrote: > > > > > > On 7/25/06, Mathieu Jobin < mathieu at justbudget.com > wrote: > > > > ok, its fine now. something I was miss understanding. > > > > > > > > now, I'm not sure how the magic is done to call get and post. but I > > > wish the > > > > same magic would be there for all REST method. > > > > > > > > get/post/put/delete > > > > > > Mathieu, there's not much magic in that handling. It just takes the > > > incoming HTTP method and calls the corresponding method in your class. > > > In theory, all it would take to handle put or delete is to add those > > > methods to your code. The problem is that HTML does not support those > > > methods. That is
doesn't work. It sucks, > > > but that's the way it is. Even if we beg and plead the powers-that-be > > > at the W3C to add it, it'll take years for the browsers to catch up. > > > Rails gets around this problem by faking it and adding a hidden form > > > value with the method. The things people will do... > > > _______________________________________________ > > > 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 > > > > > > -- > 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 > -- 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/20060726/de764f3b/attachment-0001.html From manfred at gmail.com Wed Jul 26 02:29:02 2006 From: manfred at gmail.com (Manfred Stienstra) Date: Wed, 26 Jul 2006 08:29:02 +0200 Subject: get/post bug In-Reply-To: <78181ce60607252309v6f0e27d1h1acd0debc5942918@mail.gmail.com> References: <78181ce60607251739y6f0a682fu2e5e2d8627469f82@mail.gmail.com> <78181ce60607252059o7c24680br2c655f67d7fa00f6@mail.gmail.com> <78181ce60607252257padf5663h80aea8cdbd2d05f3@mail.gmail.com> <78181ce60607252302l6def0cf6j8193d5819e28281e@mail.gmail.com> <78181ce60607252309v6f0e27d1h1acd0debc5942918@mail.gmail.com> Message-ID: <42206927-459C-4699-818B-99BF9359DB7B@gmail.com> On Jul 26, 2006, at 8:09 AM, Mathieu Jobin wrote: > this is really stupid,... the protection(limitation) is really in > the browser > server accepts anything. I think this is because of mod_php, try to WHATEVER on a file served directly from the filesystem. From zimba.tm at gmail.com Wed Jul 26 02:36:47 2006 From: zimba.tm at gmail.com (Jonas Pfenniger) Date: Wed, 26 Jul 2006 08:36:47 +0200 Subject: get/post bug In-Reply-To: <78181ce60607252309v6f0e27d1h1acd0debc5942918@mail.gmail.com> References: <78181ce60607251739y6f0a682fu2e5e2d8627469f82@mail.gmail.com> <78181ce60607252059o7c24680br2c655f67d7fa00f6@mail.gmail.com> <78181ce60607252257padf5663h80aea8cdbd2d05f3@mail.gmail.com> <78181ce60607252302l6def0cf6j8193d5819e28281e@mail.gmail.com> <78181ce60607252309v6f0e27d1h1acd0debc5942918@mail.gmail.com> Message-ID: <3ff63f9b0607252336g6db0c977v377e627b12ac1efe@mail.gmail.com> According to the W3C draft on XMLHttpRequest[1], it should support PUT and DELETE. But I'm not convinced that it works on all browsers. Safari at least looks buggy[2]. -- Cheers, zimbatm [0] [0] : http://zimbatm.oree.ch [1] : http://www.w3.org/TR/XMLHttpRequest/#xmlhttprequest [2] : http://www.opendarwin.org/pipermail/webkit-unassigned/2006-February/004838.html From mathieu at justbudget.com Wed Jul 26 02:42:01 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Wed, 26 Jul 2006 15:42:01 +0900 Subject: get/post bug In-Reply-To: <42206927-459C-4699-818B-99BF9359DB7B@gmail.com> References: <78181ce60607251739y6f0a682fu2e5e2d8627469f82@mail.gmail.com> <78181ce60607252059o7c24680br2c655f67d7fa00f6@mail.gmail.com> <78181ce60607252257padf5663h80aea8cdbd2d05f3@mail.gmail.com> <78181ce60607252302l6def0cf6j8193d5819e28281e@mail.gmail.com> <78181ce60607252309v6f0e27d1h1acd0debc5942918@mail.gmail.com> <42206927-459C-4699-818B-99BF9359DB7B@gmail.com> Message-ID: <78181ce60607252342l20a49f13ke6c7c3246d85735@mail.gmail.com> you are right. its mod_php..... I get a 501 on .html with WHATEVER and a 405 with PUT probably because PUT/POST/DELETE needs to be a CGI, and .html is not executable or something like that... its good though to see the list of supported METHOD. [mathieu at hikonehq /usr/home/mathieu]$ telnet somekool.net 80 Trying 64.111.120.165... Connected to somekool.net. Escape character is '^]'. WHATEVER /saito1.html HTTP/1.1 host: www.somekool.net HTTP/1.1 501 Method Not Implemented Date: Wed, 26 Jul 2006 06:39:06 GMT Server: Apache/1.3.33 (Unix) mod_throttle/3.1.2 DAV/1.0.3 mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a PHP/4.4.2 mod_ssl/2.8.22 OpenSSL/0.9.7e Allow: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, TRACE Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1 10e 501 Method Not Implemented

Method Not Implemented

WHATEVER to /saito1.html not supported.

Invalid method in request WHATEVER /saito1.html HTTP/1.1

0 Connection closed by foreign host. [mathieu at hikonehq /usr/home/mathieu]$ telnet somekool.net 80 Trying 64.111.120.165... Connected to somekool.net. Escape character is '^]'. PUT /saito1.html HTTP/1.1 host: www.somekool.net HTTP/1.1 405 Method Not Allowed Date: Wed, 26 Jul 2006 06:40:03 GMT Server: Apache/1.3.33 (Unix) mod_throttle/3.1.2 DAV/1.0.3 mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a PHP/4.4.2 mod_ssl/2.8.22 OpenSSL/0.9.7e Allow: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, TRACE Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1 e4 405 Method Not Allowed

Method Not Allowed

The requested method PUT is not allowed for the URL /saito1.html.

0 Connection closed by foreign host. [mathieu at hikonehq /usr/home/mathieu]$ On 7/26/06, Manfred Stienstra wrote: > > > On Jul 26, 2006, at 8:09 AM, Mathieu Jobin wrote: > > > this is really stupid,... the protection(limitation) is really in > > the browser > > server accepts anything. > > I think this is because of mod_php, try to WHATEVER on a file served > directly from the filesystem. > > > _______________________________________________ > 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/20060726/df207762/attachment.html From manfred at gmail.com Wed Jul 26 02:44:06 2006 From: manfred at gmail.com (Manfred Stienstra) Date: Wed, 26 Jul 2006 08:44:06 +0200 Subject: get/post bug In-Reply-To: <78181ce60607252342l20a49f13ke6c7c3246d85735@mail.gmail.com> References: <78181ce60607251739y6f0a682fu2e5e2d8627469f82@mail.gmail.com> <78181ce60607252059o7c24680br2c655f67d7fa00f6@mail.gmail.com> <78181ce60607252257padf5663h80aea8cdbd2d05f3@mail.gmail.com> <78181ce60607252302l6def0cf6j8193d5819e28281e@mail.gmail.com> <78181ce60607252309v6f0e27d1h1acd0debc5942918@mail.gmail.com> <42206927-459C-4699-818B-99BF9359DB7B@gmail.com> <78181ce60607252342l20a49f13ke6c7c3246d85735@mail.gmail.com> Message-ID: On Jul 26, 2006, at 8:42 AM, Mathieu Jobin wrote: > Allow: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, PATCH, > PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, TRACE Het methods behind the Famous Five are all DAV methods, they're not part of the HTTP specs. From mathieu at justbudget.com Wed Jul 26 02:45:46 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Wed, 26 Jul 2006 15:45:46 +0900 Subject: get/post bug In-Reply-To: <3ff63f9b0607252336g6db0c977v377e627b12ac1efe@mail.gmail.com> References: <78181ce60607251739y6f0a682fu2e5e2d8627469f82@mail.gmail.com> <78181ce60607252059o7c24680br2c655f67d7fa00f6@mail.gmail.com> <78181ce60607252257padf5663h80aea8cdbd2d05f3@mail.gmail.com> <78181ce60607252302l6def0cf6j8193d5819e28281e@mail.gmail.com> <78181ce60607252309v6f0e27d1h1acd0debc5942918@mail.gmail.com> <3ff63f9b0607252336g6db0c977v377e627b12ac1efe@mail.gmail.com> Message-ID: <78181ce60607252345i6cb2912j40f73e4a2449e55b@mail.gmail.com> interresting XMLHttpRequest supports it. but HTML does not ;) http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#adef-method On 7/26/06, Jonas Pfenniger wrote: > > According to the W3C draft on XMLHttpRequest[1], it should support PUT > and DELETE. But I'm not convinced that it works on all browsers. > Safari at least looks buggy[2]. > > -- > Cheers, > zimbatm [0] > > [0] : http://zimbatm.oree.ch > [1] : http://www.w3.org/TR/XMLHttpRequest/#xmlhttprequest > [2] : > http://www.opendarwin.org/pipermail/webkit-unassigned/2006-February/004838.html > _______________________________________________ > 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/20060726/f802cc50/attachment.html From mathieu at justbudget.com Wed Jul 26 03:55:45 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Wed, 26 Jul 2006 16:55:45 +0900 Subject: file upload Message-ID: <78181ce60607260055j4410e1dat7cf7bfb4a3cd33a8@mail.gmail.com> I'm looking for file upload documentation on the wiki, cant find anything. I only found the changeset that supports file upload. should the file be part of 'input' ? please help. thanks -- 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/20060726/97aea8c8/attachment.html From manfred at gmail.com Wed Jul 26 04:36:44 2006 From: manfred at gmail.com (Manfred Stienstra) Date: Wed, 26 Jul 2006 10:36:44 +0200 Subject: file upload In-Reply-To: <78181ce60607260055j4410e1dat7cf7bfb4a3cd33a8@mail.gmail.com> References: <78181ce60607260055j4410e1dat7cf7bfb4a3cd33a8@mail.gmail.com> Message-ID: <0BB4B47B-6A3C-41D8-9BEF-D714D4D4932E@gmail.com> On 26-jul-2006, at 9:55, Mathieu Jobin wrote: > I'm looking for file upload documentation on the wiki, cant find > anything. > I only found the changeset that supports file upload. > > should the file be part of 'input' ? It might be nice the visit the IRC channel #camping on irc.freenode.net that way you don't have to send 5 emails every day (: From mathieu at justbudget.com Wed Jul 26 04:37:51 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Wed, 26 Jul 2006 17:37:51 +0900 Subject: Seek Error ? Message-ID: <78181ce60607260137h34c9ab67y515455a99e4a8bab@mail.gmail.com> anyone ever got this error ? [Wed Jul 26 17:36:25 2006] [error] [client 192.168.11.100] (eval):21:in `seek', referer: http://rf.mathieu.mv.sha/diary.cgi/edit/1?someting=true [Wed Jul 26 17:36:25 2006] [error] [client 192.168.11.100] : , referer: http://rf.mathieu.mv.sha/diary.cgi/edit/1?someting=true [Wed Jul 26 17:36:25 2006] [error] [client 192.168.11.100] Illegal seek, referer: http://rf.mathieu.mv.sha/diary.cgi/edit/1?someting=true [Wed Jul 26 17:36:25 2006] [error] [client 192.168.11.100] (, referer: http://rf.mathieu.mv.sha/diary.cgi/edit/1?someting=true [Wed Jul 26 17:36:25 2006] [error] [client 192.168.11.100] Errno::ESPIPE, referer: http://rf.mathieu.mv.sha/diary.cgi/edit/1?someting=true [Wed Jul 26 17:36:25 2006] [error] [client 192.168.11.100] ), referer: http://rf.mathieu.mv.sha/diary.cgi/edit/1?someting=true [Wed Jul 26 17:36:25 2006] [error] [client 192.168.11.100] \tfrom (eval):21:in `initialize', referer: http://rf.mathieu.mv.sha/diary.cgi/edit/1?someting=true [Wed Jul 26 17:36:25 2006] [error] [client 192.168.11.100] \tfrom (eval):44:in `run', referer: http://rf.mathieu.mv.sha/diary.cgi/edit/1?someting=true [Wed Jul 26 17:36:25 2006] [error] [client 192.168.11.100] \tfrom /home/mathieu/mv/rf/public/diary.cgi:463, referer: http://rf.mathieu.mv.sha/diary.cgi/edit/1?someting=true [Wed Jul 26 17:36:25 2006] [error] [client 192.168.11.100] Premature end of script headers: diary.cgi, referer: http://rf.mathieu.mv.sha/diary.cgi/edit/1?someting=true Diary::Controllers::Edit.POSTErrno::ESPIPE Illegal seek: - (eval):21:in `seek' - (eval):21:in `initialize' - (eval):43:in `run' - /home/mathieu/mv/rf/public/diary.cgi:463 -- 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/20060726/c6f6a57f/attachment.html From mathieu at justbudget.com Wed Jul 26 04:39:19 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Wed, 26 Jul 2006 17:39:19 +0900 Subject: file upload In-Reply-To: <0BB4B47B-6A3C-41D8-9BEF-D714D4D4932E@gmail.com> References: <78181ce60607260055j4410e1dat7cf7bfb4a3cd33a8@mail.gmail.com> <0BB4B47B-6A3C-41D8-9BEF-D714D4D4932E@gmail.com> Message-ID: <78181ce60607260139s695f7c4ckf71622fc538e8158@mail.gmail.com> I am on the IRC channel. but I thought mailling list was better as everybody can participate(reply) whenever they have time. and mailling list get archived and thus googlable, not IRC. On 7/26/06, Manfred Stienstra wrote: > > > On 26-jul-2006, at 9:55, Mathieu Jobin wrote: > > > I'm looking for file upload documentation on the wiki, cant find > > anything. > > I only found the changeset that supports file upload. > > > > should the file be part of 'input' ? > > It might be nice the visit the IRC channel #camping on > irc.freenode.net that way you don't have to send 5 emails every day (: > _______________________________________________ > 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/20060726/9f1a6529/attachment.html From manfred at gmail.com Wed Jul 26 04:55:34 2006 From: manfred at gmail.com (Manfred Stienstra) Date: Wed, 26 Jul 2006 10:55:34 +0200 Subject: Seek Error ? In-Reply-To: <78181ce60607260137h34c9ab67y515455a99e4a8bab@mail.gmail.com> References: <78181ce60607260137h34c9ab67y515455a99e4a8bab@mail.gmail.com> Message-ID: <265EB28C-1130-4374-B2DB-370E4E747EA5@gmail.com> On 26-jul-2006, at 10:37, Mathieu Jobin wrote: > > Diary::Controllers::Edit.POSTErrno::ESPIPE Illegal seek: > > - (eval):21:in `seek' > - (eval):21:in `initialize' > - (eval):43:in `run' > - /home/mathieu/mv/rf/public/diary.cgi:463 Yes, when I tried to do @in.rewind in cgi. From tlockney at gmail.com Wed Jul 26 13:58:15 2006 From: tlockney at gmail.com (Thomas Lockney) Date: Wed, 26 Jul 2006 10:58:15 -0700 Subject: file upload In-Reply-To: <78181ce60607260055j4410e1dat7cf7bfb4a3cd33a8@mail.gmail.com> References: <78181ce60607260055j4410e1dat7cf7bfb4a3cd33a8@mail.gmail.com> Message-ID: On 7/26/06, Mathieu Jobin wrote: > I'm looking for file upload documentation on the wiki, cant find anything. > I only found the changeset that supports file upload. > > should the file be part of 'input' ? > > please help. > > thanks Take a look at Parkplace: http://code.whytheluckystiff.net./svn/parkplace/trunk/lib/parkplace/ From mathieu at justbudget.com Wed Jul 26 19:42:32 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Thu, 27 Jul 2006 08:42:32 +0900 Subject: file upload In-Reply-To: References: <78181ce60607260055j4410e1dat7cf7bfb4a3cd33a8@mail.gmail.com> Message-ID: <78181ce60607261642i11a8b058k10f1ecc0986024fc@mail.gmail.com> Is there a live version of parkplace I could try ? I see that parkplace requires mongrel..... would not it work with Apache? On 7/27/06, Thomas Lockney wrote: > > On 7/26/06, Mathieu Jobin wrote: > > I'm looking for file upload documentation on the wiki, cant find > anything. > > I only found the changeset that supports file upload. > > > > should the file be part of 'input' ? > > > > please help. > > > > thanks > > Take a look at Parkplace: > http://code.whytheluckystiff.net./svn/parkplace/trunk/lib/parkplace/ > _______________________________________________ > 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/20060727/31ad7bb8/attachment.html From mathieu at justbudget.com Wed Jul 26 21:57:59 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Thu, 27 Jul 2006 10:57:59 +0900 Subject: more on file upload Message-ID: <78181ce60607261857t2fe95612gfeb34a3379acee02@mail.gmail.com> well, so File upload seems to be only working under mongrel. I have not tried it, but Camping crash extracting the request parameters on both CGI and FastCGI. I'm looking at rails code for inspiration, but it's a bit outside of my knowledge..... not sure what to do with a FCGI::Stream object ..... this is what rails do for CGI, I'm not sure if it works the same for FCGI, I have not found the code yet. require actionpack-1.12.3/lib/action_controller/cgi_ext/cgi_methods.rb def query_parameters (qs = self.query_string).empty? ? {} : CGIMethods.parse_query_parameters(qs) end def request_parameters if ActionController::Base.param_parsers.has_key?(content_type) CGIMethods.parse_formatted_request_parameters(content_type, @env['RAW_POST_DATA']) else CGIMethods.parse_request_parameters(@cgi.params) end end regards, On 7/26/06, Jonas Pfenniger wrote: > > File upload is implemented in Camping. I guess you can have some > problems if you're not running Camping+Mongrel since it wasn't tested > very well. > > NOTE : I've just corrected Ext::Flash. It was buggy. > > On 26/07/06, Mathieu Jobin wrote: > > do you know if with Camping 1.4.139 you absolutely need equipement or > > Camping can do file upload just fine? > > > > > > On 7/26/06, Jonas Pfenniger < zimba.tm at gmail.com> wrote: > > > You can read the rdoc or look at the file. I also encourage using the > > > SVN because the last release is a bit out of date. I'm now working > > > with Camping from SVN too. There is also the test and example folders > > > with some mini apps. > > > > > > Next release will happend with Camping 1.5 and have all the doc > updated. > > > > > > On 26/07/06, Mathieu Jobin wrote: > > > > is there docs for using the Flash and FIle upload module ? I'd like > to > > start > > > > off by trying to use those. > > > > > > > > thanks > > > > > > > > -- > > > > 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 > > > > _______________________________________________ > > > > Equipment-for-all mailing list > > > > Equipment-for-all at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/equipment-for-all > > > > > > > > > > > > > > > > > -- > > > Cheers, > > > zimbatm > > > > > > http://zimbatm.oree.ch > > > > > > > > > > > -- > > > > 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 > > > -- > Cheers, > zimbatm > > http://zimbatm.oree.ch > -- 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/20060727/048941c5/attachment-0001.html From mathieu at justbudget.com Wed Jul 26 21:59:22 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Thu, 27 Jul 2006 10:59:22 +0900 Subject: more on file upload In-Reply-To: <78181ce60607261857t2fe95612gfeb34a3379acee02@mail.gmail.com> References: <78181ce60607261857t2fe95612gfeb34a3379acee02@mail.gmail.com> Message-ID: <78181ce60607261859w4f4a6bf3x6fed4fa7aaf7d251@mail.gmail.com> when I said I did not tried it... I meant mongrel. On 7/27/06, Mathieu Jobin wrote: > > well, so File upload seems to be only working under mongrel. > I have not tried it, but Camping crash extracting the request parameters > on both CGI and FastCGI. > > I'm looking at rails code for inspiration, but it's a bit outside of my > knowledge..... > not sure what to do with a FCGI::Stream object ..... > > this is what rails do for CGI, I'm not sure if it works the same for FCGI, > I have not found the code yet. > > require actionpack-1.12.3/lib/action_controller/cgi_ext/cgi_methods.rb > > def query_parameters > (qs = self.query_string).empty? ? {} : > CGIMethods.parse_query_parameters(qs) > end > > def request_parameters > if ActionController::Base.param_parsers.has_key? (content_type) > CGIMethods.parse_formatted_request_parameters(content_type, > @env['RAW_POST_DATA']) > else > CGIMethods.parse_request_parameters(@cgi.params) > end > end > > regards, > > > On 7/26/06, Jonas Pfenniger wrote: > > > > File upload is implemented in Camping. I guess you can have some > > problems if you're not running Camping+Mongrel since it wasn't tested > > very well. > > > > NOTE : I've just corrected Ext::Flash. It was buggy. > > > > On 26/07/06, Mathieu Jobin < mathieu at justbudget.com> wrote: > > > do you know if with Camping 1.4.139 you absolutely need equipement or > > > Camping can do file upload just fine? > > > > > > > > > On 7/26/06, Jonas Pfenniger < zimba.tm at gmail.com> wrote: > > > > You can read the rdoc or look at the file. I also encourage using > > the > > > > SVN because the last release is a bit out of date. I'm now working > > > > with Camping from SVN too. There is also the test and example > > folders > > > > with some mini apps. > > > > > > > > Next release will happend with Camping 1.5 and have all the doc > > updated. > > > > > > > > On 26/07/06, Mathieu Jobin wrote: > > > > > is there docs for using the Flash and FIle upload module ? I'd > > like to > > > start > > > > > off by trying to use those. > > > > > > > > > > thanks > > > > > > > > > > -- > > > > > 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 > > > > > _______________________________________________ > > > > > Equipment-for-all mailing list > > > > > Equipment-for-all at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/equipment-for-all > > > > > > > > > > > > > > > > > > > > > > -- > > > > Cheers, > > > > zimbatm > > > > > > > > http://zimbatm.oree.ch > > > > > > > > > > > > > > > > -- > > > > > > 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 > > > > > > -- > > Cheers, > > zimbatm > > > > http://zimbatm.oree.ch > > > > > > -- > 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 > -- 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/20060727/72607760/attachment.html From mathieu at justbudget.com Wed Jul 26 22:44:36 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Thu, 27 Jul 2006 11:44:36 +0900 Subject: more on file upload In-Reply-To: <78181ce60607261859w4f4a6bf3x6fed4fa7aaf7d251@mail.gmail.com> References: <78181ce60607261857t2fe95612gfeb34a3379acee02@mail.gmail.com> <78181ce60607261859w4f4a6bf3x6fed4fa7aaf7d251@mail.gmail.com> Message-ID: <78181ce60607261944g23f14730q31820db3a503393d@mail.gmail.com> not done testing here but changing for l in @in into for l in (@in.is_a?(FCGI::Stream) ? @in.read : @in) ## Crash on Apache/FastCGI seems to have done it ;) I'll keep you up to date if it works. On 7/27/06, Mathieu Jobin wrote: > > when I said I did not tried it... I meant mongrel. > > > On 7/27/06, Mathieu Jobin wrote: > > > > well, so File upload seems to be only working under mongrel. > > I have not tried it, but Camping crash extracting the request parameters > > on both CGI and FastCGI. > > > > I'm looking at rails code for inspiration, but it's a bit outside of my > > knowledge..... > > not sure what to do with a FCGI::Stream object ..... > > > > this is what rails do for CGI, I'm not sure if it works the same for > > FCGI, I have not found the code yet. > > > > require actionpack-1.12.3/lib/action_controller/cgi_ext/cgi_methods.rb > > > > def query_parameters > > (qs = self.query_string).empty? ? {} : > > CGIMethods.parse_query_parameters(qs) > > end > > > > def request_parameters > > if ActionController::Base.param_parsers.has_key? (content_type) > > CGIMethods.parse_formatted_request_parameters(content_type, > > @env['RAW_POST_DATA']) > > else > > CGIMethods.parse_request_parameters(@cgi.params) > > end > > end > > > > regards, > > > > > > On 7/26/06, Jonas Pfenniger < zimba.tm at gmail.com> wrote: > > > > > > File upload is implemented in Camping. I guess you can have some > > > problems if you're not running Camping+Mongrel since it wasn't tested > > > very well. > > > > > > NOTE : I've just corrected Ext::Flash. It was buggy. > > > > > > On 26/07/06, Mathieu Jobin < mathieu at justbudget.com> wrote: > > > > do you know if with Camping 1.4.139 you absolutely need equipement > > > or > > > > Camping can do file upload just fine? > > > > > > > > > > > > On 7/26/06, Jonas Pfenniger < zimba.tm at gmail.com> wrote: > > > > > You can read the rdoc or look at the file. I also encourage using > > > the > > > > > SVN because the last release is a bit out of date. I'm now working > > > > > > > > with Camping from SVN too. There is also the test and example > > > folders > > > > > with some mini apps. > > > > > > > > > > Next release will happend with Camping 1.5 and have all the doc > > > updated. > > > > > > > > > > On 26/07/06, Mathieu Jobin wrote: > > > > > > is there docs for using the Flash and FIle upload module ? I'd > > > like to > > > > start > > > > > > off by trying to use those. > > > > > > > > > > > > thanks > > > > > > > > > > > > -- > > > > > > 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 > > > > > > _______________________________________________ > > > > > > Equipment-for-all mailing list > > > > > > Equipment-for-all at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/equipment-for-all > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Cheers, > > > > > zimbatm > > > > > > > > > > http://zimbatm.oree.ch > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > 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 > > > > > > > > > -- > > > Cheers, > > > zimbatm > > > > > > http://zimbatm.oree.ch > > > > > > > > > > > -- > > 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 > > > > > > -- > > 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 > -- 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/20060727/0fe2895d/attachment.html From mathieu at justbudget.com Thu Jul 27 22:01:51 2006 From: mathieu at justbudget.com (Mathieu Jobin) Date: Fri, 28 Jul 2006 11:01:51 +0900 Subject: multipart/form-data support for Camping Apache/FastCGI Message-ID: <78181ce60607271901r131cfd14m2baa8d33a9c7850c@mail.gmail.com> sorry I broke it for mongrel, but the programmer who did the work for mongrel should not have much problem integrating the two I think. Apache/CGI is different and still will not work. I fuck around for a full day at the end of the day, I found Iowa another web framework and I try using their code but using Iowa::Request.new.read_multipart was more confusing than anything, although it helped me figuring it all out. I still use Iowa::FileData.new(nil, fh[:type], rx[((rx =~ /\r\n\r\n/) + 4)..-1]).store but a simple Tempfile could be used instead. I found another bug.... camping does not let me save more than 423 caracters in a sqlite text field. I have not look into the problem yet. but right from sqlite3 shell, I can store way much more data. another bug I found, is the way a href and img src is overritten to add the base url. I think this is wrong. R() should add the base url. most images won't need the base url. if the image is generated by an action, I will use R. now, I can't use the markaby img tag. I have to do. text "image" cordially yours, -- 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/20060728/8813864d/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: Request.rb Type: application/octet-stream Size: 5602 bytes Desc: not available Url : http://rubyforge.org/pipermail/camping-list/attachments/20060728/8813864d/attachment-0003.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: Util.rb Type: application/octet-stream Size: 5492 bytes Desc: not available Url : http://rubyforge.org/pipermail/camping-list/attachments/20060728/8813864d/attachment-0004.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: camping-fastcgi.patch Type: application/octet-stream Size: 2318 bytes Desc: not available Url : http://rubyforge.org/pipermail/camping-list/attachments/20060728/8813864d/attachment-0005.obj From why at whytheluckystiff.net Fri Jul 28 00:16:46 2006 From: why at whytheluckystiff.net (why the lucky stiff) Date: Thu, 27 Jul 2006 23:16:46 -0500 Subject: where do images go? (was Re: multipart/form-data support for Camping Apache/FastCGI) In-Reply-To: <78181ce60607271901r131cfd14m2baa8d33a9c7850c@mail.gmail.com> References: <78181ce60607271901r131cfd14m2baa8d33a9c7850c@mail.gmail.com> Message-ID: <20060728041646.GA39089@lstsv-3264.layeredtech.com> On Fri, Jul 28, 2006 at 11:01:51AM +0900, Mathieu Jobin wrote: > another bug I found, is the way a href and img src is overritten to add the > base url. I think this is wrong. R() should add the base url. most images > won't need the base url. if the image is generated by an action, I will use > R. now, I can't use the markaby img tag. I have to do. > > text "image" > This is part of Camping's design. Camping apps are supposed to be self-contained. If your app is mounted at /blog, your images should be under that subdirectory (i.e. /blog/images.) You can then use X-Sendfile to serve those images. So you checkout someone's app and run bin/camping and it works. If your app doesn't work by typing bin/camping app.rb, then it's a broken Camping app. You know what I mean? But when you deploy, you can certainly optimize FastCGI or Apache to serve static files directly. Okay? Good luck, Mathieu. _why