From: Marnen Laibow-Koser Date: 2009-11-26T05:38:32+09:00 Subject: Re: Ruby a good choice for CGI? David Masover wrote: [...] >> I've be told things about >> FastCGI, Passenger, mod_ruby, Rack, Sinatra, Camping, etc. and I can't >> even figure out which one I need! > > FastCGI is obsolete, so scratch that. > > Passenger and mod_ruby are essentially the same thing, IIRC. You do not RC. :) Passenger is the same as mod_rails. mod_ruby is an older module, suitable for CGI scripts but not Rails (and therefore I would assume it's not suitable for Sinatra). > But my > understanding is that Passenger works with Rack, which doesn't feel at > all > like CGI. So these might be deployment options, but they have nothing to > do > with how you write and develop your app. > > So among your options are Sinatra and Camping. Camping is by _why, who > seems > to have disappeared, but I'm sure someone's maintaining it... There's also Merb, which is used by SproutCore sort of in the way the OP is describing. > What I > like > about Sinatra is the sheer simplicity of: > > get '/' do > 'Hello, world!' > end > That looks nice! I plan to try Sinatra if I run into a project for which Rails is excessive. > In your case, assuming you still want a POST, it'll probably be > something > like: > > post '/wherever' do > # build your string from the database and return it > end > > Once you've got it working on localhost, if you can find a managed host > that'll just let you upload a Rack app (especially if they know about > Sinatra), do that. Or you could do it yourself -- right now, I'm liking > nginx > and Unicorn, which is what Github uses: > > http://github.com/blog/517-unicorn > > On the other hand, you could technically deploy this with Passenger. > Some > people find it easier, but I like deploying with Capistrano anyway. > They're not mutually exclusive. Cap + Passenger is a great combination. >> some basic >> cookie/session support. > > http://www.sinatrarb.com/faq.html#sessions > >> What's the least headache(and not terribly slow) >> way to do this? > > My vote is Sinatra. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen@marnen.org -- Posted via http://www.ruby-forum.com/.