RoR still not working on SuSE 9.0 - incomplete headers recei

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:

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 RewriteEngine On RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] ErrorDocument 500 "

Application error

Rails application failed to start properly" Options ExecCGI FollowSymLinks AllowOverride all Allow from all Order allow,deny

Please help me!! :slight_smile: 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

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 :wink:

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

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…)

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.

Thanks!!! Thanks so much!!! This was the problem. I
had /usr/bin/ruby, but in dispatch.fcgi I had ruby18.

Thanks so much!!!

Mike