Re: run my Camping app as a Rack app

2011-10-09 Thread Bartosz Dziewoński
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

Re: run my Camping app as a Rack app

2011-10-09 Thread Nokan Emiro
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

Re: run my Camping app as a Rack app

2011-10-09 Thread Bartosz Dziewoński
The app itself implements Rack protocol. (That is, if you do Camping.goes :App, then your obj variable would be App - it implements .call, I think it's all that's needed?) -- Matma Rex ___ Camping-list mailing list Camping-list@rubyforge.org

Re: run my Camping app as a Rack app

2011-10-09 Thread Nokan Emiro
The app itself implements Rack protocol. Yes, that's what I've already tried. It is the case when my app stops whenever the first fastcgi request arrives: /usr/lib/ruby/1.8/rack/utils.rb:23:in `unescape': undefined method `tr' for nil:NilClass (NoMethodError) from (eval):33:in

Re: run my Camping app as a Rack app

2011-10-09 Thread Bartosz Dziewoński
Does it work the regular way? (via rackup) Does it work your way, but with a different handler? Which version of rack you're using? I can't find any usage of tr method in 1.3.4's rack/utils.rb, and line 37 of rack/session/cookie.rb is a comment. -- Matma Rex

Re: run my Camping app as a Rack app

2011-10-09 Thread Nokan Emiro
Are you running Apache? No, the webserver is nginx, and I use fastcgi to attach my apps into it. ___ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list

Re: run my Camping app as a Rack app

2011-10-09 Thread Nokan Emiro
Does it work the regular way? (via rackup) Yes, rackup makes my app run. In this case an other probleme occures, that is more Camping specific. The ActiveRecord cannot connect to any database. I think Camping makes some initialization before starting up my app, that is missing in this case.

Re: run my Camping app as a Rack app

2011-10-09 Thread Jenna Fox
It looks as if your application is getting a FastCGI request without the 'PATH_INFO' environment variable. I'm not too sure what to make of that. Can you try a rackup which runs this app? require 'rack' require 'pp' App = lambda do |env| body = '' PP.pp env, body [200,