Michael Gebhart
2006-Jan-19 21:57 UTC
[Rails] RoR still not working on SuSE 9.0 - incomplete headers received
Hi, I''ve already posted my problem a few weeks ago on several forums, or lists. I still have the same problem: I have a SuSE 9.0 machine, Apache 2.x, ruby 1.8.4 I wanna get RoR working with fastCGI. I have installed different versions of fastCGI, have checked the permissions of the fcgi-ipc directory, reinstalled everything and it still doesn''t work. In the browser window I always get this error: Application error Rails application failed to start properly And this is log: fastcgi.crash.log: [16/Jan/2006:23:47:02 :: 977] starting [16/Jan/2006:23:47:03 :: 977] terminated gracefully apache.log: development.log is empty. This is my virtual host entry of apache: <VirtualHost myIP:80> ServerName myHost AddHandler fastcgi-script .fcgi AddHandler cgi-script .cgi DocumentRoot /srv/www/htdocs/web4/html/rails/public SuexecUserGroup web4 ftponly FastCgiWrapper /usr/sbin/suexec2 <Directory /srv/www/htdocs/web4/html/rails/public> RewriteEngine On RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly" Options ExecCGI FollowSymLinks AllowOverride all Allow from all Order allow,deny </Directory> </VirtualHost> Please help me!! :) I would be so happy, if I could use RoR on this server too. Webrick is working, when I try to run dispatch.fcgi I get: /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:274: warning: already initialized constant KNOWN_OPTIONS /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:279: warning: already initialized constant DEF_KEY_ATTRIBUTES /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:280: warning: already initialized constant DEF_ROOT_NAME /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:281: warning: already initialized constant DEF_CONTENT_KEY /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:282: warning: already initialized constant DEF_XML_DECLARATION /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:283: warning: already initialized constant DEF_ANONYMOUS_TAG /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:284: warning: already initialized constant DEF_FORCE_ARRAY /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:285: warning: already initialized constant DEF_INDENTATION Status: 500 Internal Server Error This should be ok, or not? Greetings Mike
David Harrison
2006-Jan-20 01:50 UTC
[Rails] RoR still not working on SuSE 9.0 - incomplete headers received
How does what you have done compare to the steps I went through to get RoR working with SUSE 9.2? http://www.stress-free.co.nz/content/view/163/59/ Is there any steps that I took that seem different to yours? From a look at your Apache config they both seem the same. Best of luck, David P.S. On the bright side at least fastcgi terminates gracefully nothing worse than an app that dies by falling flat on its face ;-) On 20/01/2006, at 11:08 AM, Michael Gebhart wrote:> Hi, > > I''ve already posted my problem a few weeks ago on several forums, or > lists. I still have the same problem: > > I have a SuSE 9.0 machine, Apache 2.x, ruby 1.8.4 I wanna get RoR > working with fastCGI. > > I have installed different versions of fastCGI, have checked the > permissions of the fcgi-ipc directory, reinstalled everything and it > still doesn''t work. > > In the browser window I always get this error: > > Application error > Rails application failed to start properly > > And this is log: > > fastcgi.crash.log: > > [16/Jan/2006:23:47:02 :: 977] starting > [16/Jan/2006:23:47:03 :: 977] terminated gracefully > > > apache.log: > > development.log is empty. > > This is my virtual host entry of apache: > > <VirtualHost myIP:80> > ServerName myHost > AddHandler fastcgi-script .fcgi > AddHandler cgi-script .cgi > DocumentRoot /srv/www/htdocs/web4/html/rails/public > SuexecUserGroup web4 ftponly > FastCgiWrapper /usr/sbin/suexec2 > <Directory /srv/www/htdocs/web4/html/rails/public> > RewriteEngine On > RewriteRule ^$ index.html [QSA] > RewriteRule ^([^.]+)$ $1.html [QSA] > RewriteCond %{REQUEST_FILENAME} !-f > RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] > ErrorDocument 500 "<h2>Application error</h2>Rails > application failed to start properly" > Options ExecCGI FollowSymLinks > AllowOverride all > Allow from all > Order allow,deny > </Directory> > </VirtualHost> > > > > Please help me!! :) I would be so happy, if I could use RoR on this > server too. Webrick is working, when I try to run dispatch.fcgi I get: > > /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:274: > warning: already initialized constant KNOWN_OPTIONS > /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:279: > warning: already initialized constant DEF_KEY_ATTRIBUTES > /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:280: > warning: already initialized constant DEF_ROOT_NAME > /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:281: > warning: already initialized constant DEF_CONTENT_KEY > /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:282: > warning: already initialized constant DEF_XML_DECLARATION > /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:283: > warning: already initialized constant DEF_ANONYMOUS_TAG > /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:284: > warning: already initialized constant DEF_FORCE_ARRAY > /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:285: > warning: already initialized constant DEF_INDENTATION > Status: 500 Internal Server Error > > > This should be ok, or not? > > Greetings > > Mike > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Scott Willson
2006-Jan-20 03:35 UTC
[Rails] RoR still not working on SuSE 9.0 - incomplete headers received
Hm. I''ve got Rails on Apache 2 + fastcgi with Ruby 1.8.2 and Suse 10.0. I know you''ve checked permissions, but it sure sounds like a permissions problem. You know, Apache gave me a warning not to put AddHandler inside of a VirtualHost. In fact, I don''t have "AddHandler fastcgi-script .fcgi" anywhere in my configs. What I _do_ have in /etc/apache2/conf.d/ mod_fastcgi.conf is: FastCgiIpcDir /tmp/fcgi_ipc/ FastCgiServer /srv/www/rails/my+app/current/public/dispatch.fcgi - initial-env RAILS_ENV=production -processes 6 -idle-timeout 600 This starts up the FastCGI servers when Apache starts up. I haven''t tested this setup in production yet, but it seems just fine in dev, even with repeated SwitchTower deployments. What else? Have you tried without SuexecUserGroup and FastCgiWrapper? How about uninstalling the xml-simple gem? That may be killing your FastCGI processes right there. Sorry for the shot-gunned attempt at help. Good luck! Scott On Jan 19, 2006, at 5:50 PM, David Harrison wrote:> How does what you have done compare to the steps I went through to > get RoR working with SUSE 9.2? > http://www.stress-free.co.nz/content/view/163/59/ > > Is there any steps that I took that seem different to yours? > From a look at your Apache config they both seem the same. > > Best of luck, > > > David > > > P.S. On the bright side at least fastcgi terminates gracefully > nothing worse than an app that dies by falling flat on its face ;-) > > > On 20/01/2006, at 11:08 AM, Michael Gebhart wrote: > >> Hi, >> >> I''ve already posted my problem a few weeks ago on several forums, or >> lists. I still have the same problem: >> >> I have a SuSE 9.0 machine, Apache 2.x, ruby 1.8.4 I wanna get RoR >> working with fastCGI. >> >> I have installed different versions of fastCGI, have checked the >> permissions of the fcgi-ipc directory, reinstalled everything and it >> still doesn''t work. >> >> In the browser window I always get this error: >> >> Application error >> Rails application failed to start properly >> >> And this is log: >> >> fastcgi.crash.log: >> >> [16/Jan/2006:23:47:02 :: 977] starting >> [16/Jan/2006:23:47:03 :: 977] terminated gracefully >> >> >> apache.log: >> >> development.log is empty. >> >> This is my virtual host entry of apache: >> >> <VirtualHost myIP:80> >> ServerName myHost >> AddHandler fastcgi-script .fcgi >> AddHandler cgi-script .cgi >> DocumentRoot /srv/www/htdocs/web4/html/rails/public >> SuexecUserGroup web4 ftponly >> FastCgiWrapper /usr/sbin/suexec2 >> <Directory /srv/www/htdocs/web4/html/rails/public> >> RewriteEngine On >> RewriteRule ^$ index.html [QSA] >> RewriteRule ^([^.]+)$ $1.html [QSA] >> RewriteCond %{REQUEST_FILENAME} !-f >> RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] >> ErrorDocument 500 "<h2>Application error</h2>Rails >> application failed to start properly" >> Options ExecCGI FollowSymLinks >> AllowOverride all >> Allow from all >> Order allow,deny >> </Directory> >> </VirtualHost> >> >> >> >> Please help me!! :) I would be so happy, if I could use RoR on this >> server too. Webrick is working, when I try to run dispatch.fcgi I >> get: >> >> /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:274: >> warning: already initialized constant KNOWN_OPTIONS >> /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:279: >> warning: already initialized constant DEF_KEY_ATTRIBUTES >> /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:280: >> warning: already initialized constant DEF_ROOT_NAME >> /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:281: >> warning: already initialized constant DEF_CONTENT_KEY >> /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:282: >> warning: already initialized constant DEF_XML_DECLARATION >> /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:283: >> warning: already initialized constant DEF_ANONYMOUS_TAG >> /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:284: >> warning: already initialized constant DEF_FORCE_ARRAY >> /usr/lib/ruby/gems/1.8/gems/xml-simple-1.0.7/lib/xmlsimple.rb:285: >> warning: already initialized constant DEF_INDENTATION >> Status: 500 Internal Server Error >> >> >> This should be ok, or not? >> >> Greetings >> >> Mike >> >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Andrew Stone
2006-Jan-20 15:33 UTC
[Rails] RoR still not working on SuSE 9.0 - incomplete headers received
Every time I''ve seen the incomplete headers received it''s usually because the shebang declaration in dispatch.fcgi #!/usr/bin/ruby is incorrect. You probably have /usr/bin/ruby1.8 and need to create a symoblic link ln -s /usr/bin/ruby1.8 /usr/bin/ruby. Either that or change the shebang declaration, but I think it''s best to use the symbolic link. (better for upgrading, etc...) -- Andrew Stone -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060120/a79b8c9d/attachment.html
Michael Gebhart
2006-Jan-20 18:16 UTC
[Rails] RoR still not working on SuSE 9.0 - incomplete headers received
Thanks!!!!! Thanks so much!!!!! This was the problem. I had /usr/bin/ruby, but in dispatch.fcgi I had ruby18. Thanks so much!!! Mike> Every time I''ve seen the incomplete headers received it''s usually > because the shebang declaration in dispatch.fcgi #!/usr/bin/ruby is > incorrect. You probably have /usr/bin/ruby1.8 and need to create a > symoblic link ln -s /usr/bin/ruby1.8 /usr/bin/ruby. Either that or > change the shebang declaration, but I think it''s best to use the > symbolic link. (better for upgrading, etc...) > > -- > Andrew Stone > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Andrew Stone
2006-Jan-20 22:35 UTC
[Rails] RoR still not working on SuSE 9.0 - incomplete headers received
You''re very welcome. Being the linux distro taster that I am, I have re-setup my apps a few times and know how frustrating not being able to find simple fixes like this are. On 1/20/06, Michael Gebhart <lists@miketech.net> wrote:> > Thanks!!!!! Thanks so much!!!!! This was the problem. I > had /usr/bin/ruby, but in dispatch.fcgi I had ruby18. > > Thanks so much!!! > > Mike > > Every time I''ve seen the incomplete headers received it''s usually > > because the shebang declaration in dispatch.fcgi #!/usr/bin/ruby is > > incorrect. You probably have /usr/bin/ruby1.8 and need to create a > > symoblic link ln -s /usr/bin/ruby1.8 /usr/bin/ruby. Either that or > > change the shebang declaration, but I think it''s best to use the > > symbolic link. (better for upgrading, etc...) > > > > -- > > Andrew Stone > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Andrew Stone -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060120/d0da5425/attachment.html