Yes, You are right, that works in this way. But this is a bit different what I want to do. rackup runs my Rack application in a webserver (webrick or mongrel), and I can't use orher handlers than these. I prefer to use Rack in a bit lower level.
Suppose that in a standard Ruby script the object `obj` implements tha Rack interface. In this case I can simply run it in this way: require 'rack' Rack::Handler::WEBrick.run obj or require 'rack' Rack::Handler::Mongrel.run obj without all the magic of rackup. This has the advantage to use other handlers, not only WEBrick and Mongrel. I can user Rack::Handler::Thin, ...::CGI, and even ...::FastCGI. What I really want to do is to run my Camping app using the Rack::Handler::FastCGI. I would like to know how can I convert my Camping app into an object (module, class, lambda or anything else) in Ruby that implements the Rack interface, and I can push it to Rack::Handler::FastCGI.run(). If there is any other way to run a Camping app as a fastcgi, that can be also a good solution. -- uzlee 2011/10/9 Bartosz Dziewoński <matma....@gmail.com> > I'm not sure what are you trying to accomplish. > > Can't you just create a config.ru file like this: > require './yourapp.rb' > run YourApp > > And then use `rackup` to start the app? > > config.ru files are widely understood, the same thing works for > example with mod_passenger or Heroku. > > -- Matma Rex > _______________________________________________ > Camping-list mailing list > Camping-list@rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >
_______________________________________________ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list