From his2000x at gmail.com Sun Jul 5 10:29:48 2009 From: his2000x at gmail.com (in-seok hwang) Date: Sun, 5 Jul 2009 23:29:48 +0900 Subject: How can I know the current web page address? Message-ID: How can I know the current web page address in some controller? plz teach me. -------------- next part -------------- An HTML attachment was scrubbed... URL: From blueberry at creativepony.com Sun Jul 5 10:36:29 2009 From: blueberry at creativepony.com (Jenna Fox) Date: Mon, 6 Jul 2009 00:36:29 +1000 Subject: How can I know the current web page address? In-Reply-To: References: Message-ID: You can get it in Camping 1.9.x by doing @request.url ? it gives you a String. If you want a URI object do URI.parse(@request.url) and then you can change the components easier than using a String#gsub. :) If you're using camping 1.5, you probably have to scavenge the various parts of the url and build the whole thing up yourself from bits like the hostname and the path. Depending on your web server, you may also be able to use REQUEST_URL environment variable inside the @env hash... but I emphasise this is a nonstandard CGI variable, and odds are it wont be available. If you do make use of it, it will severely limit the portability of your application. On 06/07/2009, at 12:29 AM, in-seok hwang wrote: > How can I know the current web page address in some controller? > > plz teach me. > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list From roland at rolandcrosby.com Mon Jul 20 14:21:14 2009 From: roland at rolandcrosby.com (Roland Crosby) Date: Mon, 20 Jul 2009 14:21:14 -0400 Subject: Easy deployment on DreamHost with Phusion Passenger Message-ID: <4a78c6fd0907201121u3043d044t36be17b28b215402@mail.gmail.com> I don't know if this has been documented anywhere, but last night I had a surprisingly easy time deploying a Camping 2.0 app to my basic DreamHost shared hosting account. After fighting with FastCGI for a while, I noticed that there's an option to point the root of a domain or subdomain at a "Rails" app's public/ directory and use Phusion Passenger. Once I made such a directory, and a basic config.ru file to set the gem paths correctly and run the app, it seemed to work just fine. Granted, the app is dead simple (one file, no database), so I don't know if this configuration would break if I changed anything, but I thought it was worth mentioning. I can add this to the Camping on Shared Hosting wiki page, if nobody knows of any huge caveats to deploying this way. Roland -------------- next part -------------- An HTML attachment was scrubbed... URL: From kprojection at gmail.com Mon Jul 20 14:55:46 2009 From: kprojection at gmail.com (Eric Mill) Date: Mon, 20 Jul 2009 14:55:46 -0400 Subject: Easy deployment on DreamHost with Phusion Passenger In-Reply-To: <4a78c6fd0907201121u3043d044t36be17b28b215402@mail.gmail.com> References: <4a78c6fd0907201121u3043d044t36be17b28b215402@mail.gmail.com> Message-ID: Please add it to the Camping on Shared Hosting wiki page - on both the Camping Github wiki, and the Dreamhost wiki. I wrote the Dreamhost section of the former, and the entirety of the latter, after much agony making FastCGI work, and I'd love to see a simpler way documented. -- Eric On Mon, Jul 20, 2009 at 2:21 PM, Roland Crosby wrote: > I don't know if this has been documented anywhere, but last night I had a > surprisingly easy time deploying a Camping 2.0 app to my basic DreamHost > shared hosting account. After fighting with FastCGI for a while, I noticed > that there's an option to point the root of a domain or subdomain at a > "Rails" app's public/ directory and use Phusion Passenger. Once I made such > a directory, and a basic config.ru file to set the gem paths correctly and > run the app, it seemed to work just fine. Granted, the app is dead simple > (one file, no database), so I don't know if this configuration would break > if I changed anything, but I thought it was worth mentioning. > > I can add this to the Camping on Shared Hosting wiki page, if nobody knows > of any huge caveats to deploying this way. > > Roland > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > From kprojection at gmail.com Mon Jul 20 14:57:10 2009 From: kprojection at gmail.com (Eric Mill) Date: Mon, 20 Jul 2009 14:57:10 -0400 Subject: Easy deployment on DreamHost with Phusion Passenger In-Reply-To: References: <4a78c6fd0907201121u3043d044t36be17b28b215402@mail.gmail.com> Message-ID: Here's the link to the page on the Dreamhost wiki: http://wiki.dreamhost.com/Camping -- Eric On Mon, Jul 20, 2009 at 2:55 PM, Eric Mill wrote: > Please add it to the Camping on Shared Hosting wiki page - on both the > Camping Github wiki, and the Dreamhost wiki. ?I wrote the Dreamhost > section of the former, and the entirety of the latter, after much > agony making FastCGI work, and I'd love to see a simpler way > documented. > > -- Eric > > On Mon, Jul 20, 2009 at 2:21 PM, Roland Crosby wrote: >> I don't know if this has been documented anywhere, but last night I had a >> surprisingly easy time deploying a Camping 2.0 app to my basic DreamHost >> shared hosting account. After fighting with FastCGI for a while, I noticed >> that there's an option to point the root of a domain or subdomain at a >> "Rails" app's public/ directory and use Phusion Passenger. Once I made such >> a directory, and a basic config.ru file to set the gem paths correctly and >> run the app, it seemed to work just fine. Granted, the app is dead simple >> (one file, no database), so I don't know if this configuration would break >> if I changed anything, but I thought it was worth mentioning. >> >> I can add this to the Camping on Shared Hosting wiki page, if nobody knows >> of any huge caveats to deploying this way. >> >> Roland >> >> _______________________________________________ >> Camping-list mailing list >> Camping-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list >> > From roland at rolandcrosby.com Mon Jul 20 22:12:43 2009 From: roland at rolandcrosby.com (Roland Crosby) Date: Mon, 20 Jul 2009 22:12:43 -0400 Subject: Easy deployment on DreamHost with Phusion Passenger In-Reply-To: References: <4a78c6fd0907201121u3043d044t36be17b28b215402@mail.gmail.com> Message-ID: <4a78c6fd0907201912rf7be007qc49444e859b2e88f@mail.gmail.com> OK, I updated the Dreamhost wiki and http://wiki.github.com/why/camping/camping-on-shared-hosting with a configuration that worked for me - other people using Dreamhost and/or Passenger, let me know if this works for you, or if there are other tips and tricks that you suggest. Roland On Mon, Jul 20, 2009 at 2:57 PM, Eric Mill wrote: > Here's the link to the page on the Dreamhost wiki: > > http://wiki.dreamhost.com/Camping > > -- Eric > > On Mon, Jul 20, 2009 at 2:55 PM, Eric Mill wrote: > > Please add it to the Camping on Shared Hosting wiki page - on both the > > Camping Github wiki, and the Dreamhost wiki. I wrote the Dreamhost > > section of the former, and the entirety of the latter, after much > > agony making FastCGI work, and I'd love to see a simpler way > > documented. > > > > -- Eric > > > > On Mon, Jul 20, 2009 at 2:21 PM, Roland Crosby > wrote: > >> I don't know if this has been documented anywhere, but last night I had > a > >> surprisingly easy time deploying a Camping 2.0 app to my basic DreamHost > >> shared hosting account. After fighting with FastCGI for a while, I > noticed > >> that there's an option to point the root of a domain or subdomain at a > >> "Rails" app's public/ directory and use Phusion Passenger. Once I made > such > >> a directory, and a basic config.ru file to set the gem paths correctly > and > >> run the app, it seemed to work just fine. Granted, the app is dead > simple > >> (one file, no database), so I don't know if this configuration would > break > >> if I changed anything, but I thought it was worth mentioning. > >> > >> I can add this to the Camping on Shared Hosting wiki page, if nobody > knows > >> of any huge caveats to deploying this way. > >> > >> Roland > >> > >> _______________________________________________ > >> Camping-list mailing list > >> Camping-list at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/camping-list > >> > > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: From somekool at gmail.com Sun Jul 26 23:21:35 2009 From: somekool at gmail.com (Mathieu Jobin) Date: Sun, 26 Jul 2009 23:21:35 -0400 Subject: Easy deployment on DreamHost with Phusion Passenger In-Reply-To: <9ADA6A48-7AD3-4D8F-9903-36F7D79095CD@creativepony.com> References: <4a78c6fd0907201121u3043d044t36be17b28b215402@mail.gmail.com> <4a78c6fd0907201912rf7be007qc49444e859b2e88f@mail.gmail.com> <9ADA6A48-7AD3-4D8F-9903-36F7D79095CD@creativepony.com> Message-ID: <78181ce60907262021x44b45f14h49fa3f8a7c90e940@mail.gmail.com> the problem with dreamhost is when your app becomes popular. not enough to afford a VPS but too popular to fit in dreamhost shared hosting allowed RAM. your process will get killed and your users will see error 500. thanks for the howto anyway. On Tue, Jul 21, 2009 at 3:38 AM, Jenna Fox wrote: > MMm yeah I've been using passenger to run talkie.me on DreamHost for a while > now without issue. I found that without those lines setting the gem paths > the app would work intermittently,?rather?frustratingly. So don't forget > those! :) > ? > Jenna > > On 21/07/2009, at 12:56 PM, Eric Mill wrote: > > You are awesome! I'm gonna switch my Camping app to passenger and test it > out at the next opportunity. > > -- Eric > > On Jul 20, 2009 8:12 PM, "Roland Crosby" wrote: > > OK, I updated the Dreamhost wiki > and?http://wiki.github.com/why/camping/camping-on-shared-hosting with a > configuration that worked for me - other people using Dreamhost and/or > Passenger, let me know if > this?works?for?you,?or?if?there?are?other?tips?and?tricks?that?you?suggest. > Roland > > On Mon, Jul 20, 2009 at 2:57 PM, Eric Mill wrote: > >> Here's the link to t... > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > -- "While the Baroque rules of chess could only have been created by humans, the rules of go are so elegant, organic, and rigorously logical that if intelligent life forms exist elsewhere in the universe, they almost certainly play go." -- Edward Lasker From deveritt at innotts.co.uk Mon Jul 27 11:06:58 2009 From: deveritt at innotts.co.uk (Dave Everitt) Date: Mon, 27 Jul 2009 16:06:58 +0100 Subject: Other lightweight Ruby frameworks Message-ID: <7B2CCBB5-98E9-4154-9B44-1A5FC98F263B@innotts.co.uk> If it's of any use in providing a context for Camping within the bigger world of Ruby Frameworks, after a long trawl through the other lightweight Ruby frameworks I added a post to StackOverflow, under 'What are the main differences between Sinatra and Ramaze?' that mentions Camping (mainly because it wasn't mentioned and there are people out there who think it's died, but also because I thought it was important to give what appear to be the best of the others a fair hearing): http://stackoverflow.com/questions/812856/what-are-the-main- differences-between-sinatra-and-ramaze/1086264#1086264 Happy to edit with further suggestions. Dave Everitt From deveritt at innotts.co.uk Mon Jul 27 10:57:04 2009 From: deveritt at innotts.co.uk (Dave Everitt) Date: Mon, 27 Jul 2009 15:57:04 +0100 Subject: New 1.5 blog example In-Reply-To: <391a49da0906091456h294ddfe1w720ddfc5d027cd71@mail.gmail.com> References: <391a49da0906090902t517b437y1376c2fd8f59fdba@mail.gmail.com> <0BA931DE-5EFC-4319-AE6D-3ED47A4812B4@innotts.co.uk> <391a49da0906091456h294ddfe1w720ddfc5d027cd71@mail.gmail.com> Message-ID: Hello Campers... I've just finished a (hopefully) nicer-looking Camping 1.5 blog example, adapted from one of the originals: http://pastie.org/560295 Things I've done: added a delete class, combined the add/edit/delete method into one, made a little 'cooked up while camping' logo, tweaked the CSS so it looks kind-of-ready for deployment, called it 'tentpole' because it's so simple (that's a joke). I know there's the clean, new example for v2 on Github, but I don't have Camping v2 up and running yet (I will, soon), so this is for anyone who needs to point to a simple, working a 1.5-ready example with minimal setup requirements. Still keen on Magnus' documentation ideas (below) and happy to start... I think the book should be a Camping app :-) Dave Everitt > Right now there is an example at camping.rubyforge.org showing a > blog skeleton (with controllers, models and views). It might be > better to rather have a tiny, fully functional one (to get the feel > of Camping), and a link to blog.rb (which should be simplified even > more, and actually work). The book could then take it from there > and slightly expand into the blog.rb (or maybe even totally > different; we should at least end up with something) Magnus' documentation proposal: > What if we split the documentation into three parts? > > - README.txt should be the first you see and should contain basic > info and links. > > - API-reference. A one-page reference to the whole Camping API > which gives you short descriptions/explanations and might also give > a link to the book (see below) for more detailed thoughts. > > - A "book" or tutorial which guides the user from A-Z, starting > with installation and how to use The Camping Server, through basic > MVC and HTTP/REST to how to use service-overrides or middlewares. > It would be really nice if this could be a clean, short and concise > guide to both Ruby and web development. From deveritt at innotts.co.uk Tue Jul 28 04:23:13 2009 From: deveritt at innotts.co.uk (Dave Everitt) Date: Tue, 28 Jul 2009 09:23:13 +0100 Subject: free Camping cloud hosting?? Message-ID: <1F12648A-F296-4C92-AE9C-3026914CB8C3@innotts.co.uk> I found this the other day - Heroku offer a free Git-driven hosting package for Ruby apps. The info on Camping is here: http://docs.heroku.com/rack#camping Encouraging that (apart from Rails) it only mentions Sinatra, Merb, Ramaze AND Camping... BTW there is a statement that "Camping 2.0 does not require the Rack adapter"... Dave Everitt From judofyr at gmail.com Tue Jul 28 14:16:48 2009 From: judofyr at gmail.com (Magnus Holm) Date: Tue, 28 Jul 2009 20:16:48 +0200 Subject: New 1.5 blog example In-Reply-To: References: <391a49da0906090902t517b437y1376c2fd8f59fdba@mail.gmail.com> <0BA931DE-5EFC-4319-AE6D-3ED47A4812B4@innotts.co.uk> <391a49da0906091456h294ddfe1w720ddfc5d027cd71@mail.gmail.com> Message-ID: While I can't have a look at it at the moment (no Internet access), it's very nice of you! Maybe we can merge them and get an even better blog.rb in v2. As for the documentation ideas, I've already implemented the templates in RDoc, so "rake docs" builds all the three parts (the book is simply files in the book directory). I still need to make a way to link book chapters from the reference, but at least it's working. A Camping app can be useful when you want to edit it, so you don't need to run the rake task all the time. I guess we could also implement it as a wiki, which might be better. Then we can't have it on camping.rubyforge.org (unless we can change the DNS-settings) though since it only allows static files. What do you think? I prefer having everything in files, and I think those who really want to contribute to the book wouldn't mind a "git clone"... Right now I'm on vacation, but I'll try to push it out when I return. Feel free to write some paragraphs if you're really keen, I only have a bare skeleton. //Magnus (written 28th July in offline mode) On 27. juli 2009, at 16.57, Dave Everitt wrote: > Hello Campers... > > I've just finished a (hopefully) nicer-looking Camping 1.5 blog > example, adapted from one of the originals: > http://pastie.org/560295 > > Things I've done: > added a delete class, > combined the add/edit/delete method into one, > made a little 'cooked up while camping' logo, > tweaked the CSS so it looks kind-of-ready for deployment, > called it 'tentpole' because it's so simple (that's a joke). > > I know there's the clean, new example for v2 on Github, but I don't > have Camping v2 up and running yet (I will, soon), so this is for > anyone who needs to point to a simple, working a 1.5-ready example > with minimal setup requirements. > > Still keen on Magnus' documentation ideas (below) and happy to > start... I think the book should be a Camping app :-) > > Dave Everitt > >> Right now there is an example at camping.rubyforge.org showing a >> blog skeleton (with controllers, models and views). It might be >> better to rather have a tiny, fully functional one (to get the feel >> of Camping), and a link to blog.rb (which should be simplified even >> more, and actually work). The book could then take it from there >> and slightly expand into the blog.rb (or maybe even totally >> different; we should at least end up with something) > > > Magnus' documentation proposal: > >> What if we split the documentation into three parts? >> >> - README.txt should be the first you see and should contain basic >> info and links. >> >> - API-reference. A one-page reference to the whole Camping API >> which gives you short descriptions/explanations and might also give >> a link to the book (see below) for more detailed thoughts. >> >> - A "book" or tutorial which guides the user from A-Z, starting >> with installation and how to use The Camping Server, through basic >> MVC and HTTP/REST to how to use service-overrides or middlewares. >> It would be really nice if this could be a clean, short and concise >> guide to both Ruby and web development. > > > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list