/RailsApp/public/dispatch.fcgi No such file or directory とエラーが出るが実際にはあるんだが・・・


[fuga@hogehoge RailsApp]$ sudo /etc/init.d/lighttpd start
Starting lighttpd:                                         [  OK  ]
[fuga@hogehoge RailsApp]$ 2009-05-14 15:20:36: (mod_fastcgi.c.1022) execve failed for: /RailsApp/public/dispatch.fcgi No such file or directory 
2009-05-14 15:20:36: (mod_fastcgi.c.1048) the fastcgi-backend /RailsApp/public/dispatch.fcgi failed to start: 
2009-05-14 15:20:36: (mod_fastcgi.c.1052) child exited with status 2 /Rails_Ap/public/dispatch.fcgi 
2009-05-14 15:20:36: (mod_fastcgi.c.1055) if you try do run PHP as FastCGI backend make sure you use the FastCGI enabled version.
You can find out if it is the right one by executing 'php -v' and it should display '(cgi-fcgi)' in the output, NOT (cgi) NOR (cli)
For more information check http://www.lighttpd.net/documentation/fastcgi.html#preparing-php-as-a-fastcgi-program 
2009-05-14 15:20:36: (mod_fastcgi.c.1060) If this is PHP on Gentoo add fastcgi to the USE flags 
2009-05-14 15:20:36: (mod_fastcgi.c.1356) [ERROR]: spawning fcgi failed. 
2009-05-14 15:20:36: (server.c.834) Configuration of plugins failed. Going down. 

「dispatch.fcgi No such file or directory」 - dispatch.fcgi は /rails_app/public/dispatch.fcgi に存在しており、実行権もある。

dispatch.fcgi を直接実行してみた。

$ ./dispatch.fcgi 
-bash: ./dispatch.fcgi: /usr/bin/ruby18: bad interpreter: No such file or directory

どうも、 /usr/bin/ruby18 がないと怒っているらしい。

たしかに、/usr/bin/ruby18 は存在しない。ということで、シンボリックリンクを作成する。

sudo ln -s /usr/local/bin/ruby /usr/bin/ruby18


$ sudo /etc/init.d/lighttpd start
Starting lighttpd:                                         [  OK  ]