Hello Campers! I am working on Site5, trying to get a working Camping application running. Unfortunately, my sole option in terms of deployment is FastCGI. I have no access to sudo so I cannot create ScriptAliases. I''ve taken the Camping Short Short Example and uploaded it, along with a dispatch.fcgi and an .htaccess file. My question is - given the state of Camping development right now, what should each of these look like? I''ve tried multiple solutions offered on the mailing lists, from Post-ambles to Campingrcs, and no combination seems to work. What I have so far: * The original Short Short Camping example, with the class HomePage changed to Beta. * This .htaccess: AddHandler fastcgi-script .fcgi Options +FollowSymLinks +ExecCGI RewriteEngine On RewriteCond %{REQUEST_URI} ^/stats/(.*)$ [OR] RewriteCond %{REQUEST_URI} ^/failed_auth.html$ [OR] #RewriteCond %{REQUEST_URI} ^/static/(.*)$ [OR] RewriteCond %{REQUEST_URI} ^/mint/(.*)$ RewriteRule ^.*$ - [L] RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] * This dispatch.fcgi: #!/usr/bin/ruby require ''rubygems'' require ''camping/fastcgi'' Camping::FastCGI.start(''~/www/beta/beta.rb'') Thanks for all your help in advance!
Hi Matthew, your setup looks fine but FastCGI is vicious, so don''t abandon yet ! I loathe fastcgi but I hope that this e-mail will help you a little bit. Your ruby script looks fine but if you have an SSH access, you could try to run it by hand. The expected result, is no output at all. If it does, report back here. Terminate the app with Ctrl-C. The second thing is that we must make sure that apache is configured properly. You can find some inspiration here : http://wiki.rubyonrails.org/rails/pages/HowtoSetupApacheWithFastCGIAndRubyBindings>From the same page, it is said that it is better to use mod_fcgidinstead of mod_fastcgi because it is outdated. It would also probably help if you could provide some apache error logs. Finally, the rewrite engine is vicious too, in it''s own way. So it''s probably better to deactivate it until the rest is working. -- Cheers, zimbatm
Running ''ruby beta.rb'' produces no output and goes straight back to a prompt. Running ''ruby dispatch.fcgi'' produces no output, and when I hit enter, I''m returned to a prompt. This is the only thing I get in my error logs: [Thu Sep 27 21:35:48 2007] [warn] FastCGI: (dynamic) server "/home/ ardekant/public_html/beta/dispatch.fcgi" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds I can''t switch what Apache is using in terms of modules. I can add handlers for file extensions, and that''s it. By not using the rewrite engine, do you mean just remove my .htaccess while I test? What would I put in as a web address if that were the case? Right now http://beta.ardekantur.com points to that beta/ directory where the Camping app, .htaccess, and dispatch are. Thanks for your help! On Sep 27, 2007, at 7:19 PM, Jonas Pfenniger wrote:> Hi Matthew, > > your setup looks fine but FastCGI is vicious, so don''t abandon yet ! I > loathe fastcgi but I hope that this e-mail will help you a little bit. > > Your ruby script looks fine but if you have an SSH access, you could > try to run it by hand. The expected result, is no output at all. If it > does, report back here. Terminate the app with Ctrl-C. > > The second thing is that we must make sure that apache is configured > properly. You can find some inspiration here : > http://wiki.rubyonrails.org/rails/pages/ > HowtoSetupApacheWithFastCGIAndRubyBindings >> From the same page, it is said that it is better to use mod_fcgid > instead of mod_fastcgi because it is outdated. It would also probably > help if you could provide some apache error logs. > > Finally, the rewrite engine is vicious too, in it''s own way. So it''s > probably better to deactivate it until the rest is working. > > -- > Cheers, > zimbatm > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list
2007/9/28, Matthew Snyder <mcs532 at drexel.edu>:> Running ''ruby beta.rb'' produces no output and goes straight back to a > prompt. Running ''ruby dispatch.fcgi'' produces no output, and when I > hit enter, I''m returned to a prompt. > This is the only thing I get in my error logs: > [Thu Sep 27 21:35:48 2007] [warn] FastCGI: (dynamic) server "/home/ > ardekant/public_html/beta/dispatch.fcgi" has failed to remain running > for 30 seconds given 3 attempts, its restart interval has been backed > off to 600 secondsHmm.. try something like this to get more output : #!/usr/bin/ruby begin require ''rubygems'' require ''camping/fastcgi'' Camping::FastCGI.start(''~/www/beta/beta.rb'') rescue Object => ex File.open(''err.log'',''w''){|f| f.write(ex.inspect); f.write(ex.backtrace.join("\n")} end> By not using the rewrite engine, do you mean just remove my .htaccess > while I test? What would I put in as a web address if that were the > case? Right now http://beta.ardekantur.com points to that beta/ > directory where the Camping app, .htaccess, and dispatch are.Yes, if I am right you can access it trough http://beta.ardekantur.com/dispatch.fcgi -- Cheers, zimbatm