Forum: Ruby on Rails RoR still not working on SuSE 9.0 - incomplete headers recei

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7a1e3e4b4337a358175632374b9e1a08?d=identicon&s=25 Michael Gebhart (Guest)
on 2006-01-19 23:38
(Received via mailing list)
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
E9c9fa832d241e26d08f67f41f912939?d=identicon&s=25 David Harrison (Guest)
on 2006-01-20 03:28
(Received via mailing list)
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  ;-)
Ccaa63b09f5168501b194266b9a1e7cc?d=identicon&s=25 Scott Willson (Guest)
on 2006-01-20 05:13
(Received via mailing list)
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
18d8b0c948dd7b3d39c9667cfd4e817c?d=identicon&s=25 Andrew Stone (Guest)
on 2006-01-20 17:11
(Received via mailing list)
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...)
7a1e3e4b4337a358175632374b9e1a08?d=identicon&s=25 Michael Gebhart (Guest)
on 2006-01-20 19:54
(Received via mailing list)
Thanks!!!!! Thanks so much!!!!! This was the problem. I
had /usr/bin/ruby, but in dispatch.fcgi I had ruby18.

Thanks so much!!!

Mike
18d8b0c948dd7b3d39c9667cfd4e817c?d=identicon&s=25 Andrew Stone (Guest)
on 2006-01-21 00:14
(Received via mailing list)
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.
This topic is locked and can not be replied to.