Welcome Guest | Login

RoR fails to locate dispatcher


Hi there

I'm just starting up on a VPS over here, trying to move a rails app that works correctly on another location

At the current stage I'm getting the usual, not too friendly 'Rails application failed to start properly' message
I've checked everything that I could on the forums, including the page dedicated to that particular error message, to no avail.

my apache error_log reads :

[Thu Apr 24 10:00:58 2008] [error] [client 138.96.216.61] /rails/maluba/public/dispatch.cgi:7:in `require': no such file to load -- dispatcher (LoadError)
[Thu Apr 24 10:00:58 2008] [error] [client 138.96.216.61] \tfrom /rails/maluba/public/dispatch.cgi:7
[Thu Apr 24 10:00:58 2008] [error] [client 138.96.216.61] Premature end of script headers: dispatch.cgi

I'm unclear as to where this dispatcher thing should be, but here is what I'm getting:

root@hostingrails /usr/local/apache/logs # gem list rails
*** LOCAL GEMS ***
rails (2.0.2, 1.2.6)

root@hostingrails /usr/local/apache/logs # gem contents rails | grep dispatcher
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/dispatcher.rb

2008-04-24 05:23 AM

It seems apache isn't able to run the dispatch.cgi script. You might need to check if it has got correct shebangs, permission ownership etc. If you want help deploying an app in fastcgi use our tutorial below.


http://www.hostingrails.com/forums/wiki_thread/1

2008-04-24 06:49 AM

hi
I made some progress, or at least the symptom has changed:

the welcome page now displays the *text* of dispatch.fcgi instead

I've read everything that I could, checked for all mentioned common mistakes in .htaccess and environment.rb, to no avail

I'm using the centos4 ror-ready image; I've tried to understand how fcgi was supposed to be loaded in apache but could not figure it. Shouldn't there be an apache module to do that ? there's none in the modules/ directory...
How come I am requested to comment the AddHandler line about .fcgi in .htaccess? How is this supposed to work ?

Please help, I'm bumping my head against the screen


2008-04-25 10:16 AM

just to make it clear, I'm using a VPS, not a shared env.
I feel like this supposedly ror-ready centos4 image needs some tweaks..


2008-04-25 10:41 AM

Hi - Mod_fcgid is not installed on our ror-ready centos4 image by default. You can run your apps on mongrel directly or else please post a support ticket to have installed on your VPS. Thank you

2008-04-25 01:27 PM

HostingRails Support

Hello Guest! In order to post you must be an active client with us, please log in or sign up.