Apache error

Good afternoon,

newbie question. I suppose that it must be a normal one when you are
beginning with ror, but i don´t find information to solve the problem.

The server in which i´m trying to run ror is a vps (virtual private
server) with virtuozzo. Everithing seems ok, and plesk says that ror
is correctly installed. In fact, i can execute and run everthing from /
opt/ruby/bin/.

The problem appears trying to port my app to apache. Everthing is
supossed to be correctly installed and configured (automagically by
plesk)… but i get this error:

#!/opt/ruby/bin/ruby

You may specify the path to the FastCGI crash log (a log of

unhandled

exceptions which forced the FastCGI instance to exit, great for

debugging)

and the number of requests to process before running garbage

collection.

By default, the FastCGI crash log is RAILS_ROOT/log/

fastcgi.crash.log

and the GC period is nil (turned off). A reasonable number of

requests

could range from 10-100 depending on the memory footprint of your

app.

Example:

# Default log path, normal GC behavior.

RailsFCGIHandler.process!

# Default log path, 50 requests between GC.

RailsFCGIHandler.process! nil, 50

# Custom log path, normal GC behavior.

RailsFCGIHandler.process! ‘/var/log/myapp_fcgi_crash.log’

require File.dirname(FILE) + “/…/config/environment”
require ‘fcgi_handler’

RailsFCGIHandler.process!
#’/var/www/vhosts/scsistema.com/httpdocs/gescristal/log/fcgi.log’ 1

Any idea/help please? Thanks in advance

On 4 Dec 2007, at 16:15, [email protected] wrote:

opt/ruby/bin/.

The problem appears trying to port my app to apache. Everthing is
supossed to be correctly installed and configured (automagically by
plesk)… but i get this error:

IIRC You need to add something like this to your apache config
AddHandler fastcgi-script .fcgi

Fred

Thanks for the answer. I have:

AddHandler fcgid-script .fcgi Options +FollowSymLinks +ExecCGI

i´ve added

AddHandler fastcgi-script .fcgi

but nothing happened :frowning:

On Dec 4, 2007 12:03 PM, Frederick C. [email protected]
wrote:

rgunning fcgcid then you’ve got the right thing.

problem.

IIRC You need to add something like this to your apache config
AddHandler fastcgi-script .fcgi

Fred

Make sure the she-bang line is correct for the server (which ruby)

Make sure dispatch.fcgi is executable (chmod +x dispatch.fcgi)

Jason

which ruby:

/usr/local/bin/ruby

dispatch is executable, no luck yet.

I have this line commented:

Example:

RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

if i uncomment i get the main html with an error:

About your application’s environment
Application error
Rails application failed to start properly

wish it helps

On 4 Dec 2007, at 16:55, Alex M. wrote:

i´ve added

AddHandler fastcgi-script .fcgi

but nothing happened :frowning:

What i said assumed you were running regular fastcgi, if you are
rgunning fcgcid then you’ve got the right thing.
The fact that you get the contents of dispatch.fcgi implies that it’s
not picking it up for some reason, but it’s been a long time since i
used fastcgi/fcgid so I’m out of ideas (a lot of people have moved
away from this, which may be why you can’t find much on this (There is
some info at
http://wiki.rubyonrails.org/rails/pages/HowtoSetupApacheWithFastCGIAndRubyBindings
but a lot of it seems quite old)

Fred

On Dec 4, 2007 12:36 PM, Alex M. [email protected] wrote:

which ruby:

/usr/local/bin/ruby

Change dispatch.fcgi:

#!/opt/ruby/bin/ruby

Should be

#!/usr/local/bin/ruby

Or as I prefer, a way that works on *nix systems:

#!/usr/bin/env ruby

Jason

i´ve tested nearly all the posibilities (usr/local, env, …) no luck
:frowning:

On 04/12/2007, Jason R. [email protected] wrote:

#!/opt/ruby/bin/ruby


Alejandro Moreno López
Publicidad en Buscadores y Marketing Online
http://www.tdo.es

On 4 Dec 2007, at 17:36, Alex M. wrote:

RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

if i uncomment i get the main html with an error:

About your application’s environment
Application error
Rails application failed to start properly

wish it helps

That’s getting somewhere - it’s actually trying to execute stuff. In
the past we’ve had problem like that when the user that the
dispatch.fcgi was running under couldn’t write session files
(permissions problems) and stuff like that.

Fred

On 4 Dec 2007, at 18:39, Alex M. wrote:

i´ve tested nearly all the posibilities (usr/local, env, …) no
luck :frowning:

There’s probably more than one thing wrong, but it sure as hell won’t
work with the wrong shebang.

Fred

On Dec 4, 2007 2:45 PM, Frederick C. [email protected]
wrote:

Change dispatch.fcgi:

http://www.tdo.es

Well now that we know you’ve got the right permissions on the file, and
the
right shebang, what do your logs say?

Jason

What do you mean with shebang (sorry, newbie)? The logs on the apache
directory doesn´t say anything… strange, isn´t it? I´ll check it for
apache logs.

On 04/12/2007, Jason R. [email protected] wrote:

Well now that we know you’ve got the right permissions on the file, and the
right shebang, what do your logs say?

Jason


Alejandro Moreno López
Publicidad en Buscadores y Marketing Online
http://www.tdo.es

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs