I am trying to deploy a Rails application on Dreamhost. My application works just fine in my laptop using WEBrick. The problem that I have is that I currently have my website in the public folder. I can reference everything just fine from if it is in the public folder, but if I click in a link that is an actual controller/action I get an error that the file does not exist. I followed all the instructions stated in the Dreamhost/Ruby/Rails Wiki. The way I am referencing the controller from the index.html is like so: <p><a href="/customer/submit" >Contact</a></p> this is (of course) what I get: File not found Change this error message for pages not found in public/404.html Thanks a lot for your help. Carlos Rivera -- Posted via http://www.ruby-forum.com/.
Hi ! 2006/2/13, Carlos Rivera <riverawynter@gmail.com>:> <p><a href="/customer/submit" >Contact</a></p> > > this is (of course) what I get: > > File not found > > Change this error message for pages not found in public/404.htmlHave you changed .htaccess ? Or dispatch.fcgi ? Both of these must exist and have the right permissions for things to work correctly. You can also try to run dispatch.fcgi from the command line to see if it reports any errors. Hope that helps ! -- Fran?ois Beausoleil http://blog.teksol.info/
Francois Beausoleil wrote:> Hi ! > > 2006/2/13, Carlos Rivera <riverawynter@gmail.com>: >> <p><a href="/customer/submit" >Contact</a></p> >> >> this is (of course) what I get: >> >> File not found >> >> Change this error message for pages not found in public/404.html > > Have you changed .htaccess ? Or dispatch.fcgi ? Both of these must > exist and have the right permissions for things to work correctly. > > You can also try to run dispatch.fcgi from the command line to see if > it reports any errors. > > Hope that helps !The contents of my dispatch.fcgi: require File.dirname(__FILE__) + "/../config/environment" require ''fcgi_handler'' class MyRailsFCGIHandler < RailsFCGIHandler SIGNALS = { ''TERM'' => :exit_now, } def exit_now_handler(signal) dispatcher_log :info, "ignoring request to terminate immediately" end end MyRailsFCGIHandler.process! nil, 50 The contents of my .htaccess AddHandler fastcgi-script .fcgi AddHandler cgi-script .cgi Options +FollowSymLinks +ExecCGI 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" One thing that I did after you mentioned is to run the dispatch.fcgi and I get the following error: [hoover]$ ./dispatch.fcgi Status: 500 Internal Server Error [hoover]$ I wonder if it is one of the tab issues, but I al ready ran the dos2unix script on those two files(I also changed the permission to 755) Thanks a LOT. -- Posted via http://www.ruby-forum.com/.
Have you also changed the #! line at the top of your dispatched to point to a valid ruby on Dreamhost''s servers? (#!/usr/bin/ruby1.8 I think)... james On 2/13/06, Carlos Rivera <riverawynter@gmail.com> wrote:> Francois Beausoleil wrote: > > Hi ! > > > > 2006/2/13, Carlos Rivera <riverawynter@gmail.com>: > >> <p><a href="/customer/submit" >Contact</a></p> > >> > >> this is (of course) what I get: > >> > >> File not found > >> > >> Change this error message for pages not found in public/404.html > > > > Have you changed .htaccess ? Or dispatch.fcgi ? Both of these must > > exist and have the right permissions for things to work correctly. > > > > You can also try to run dispatch.fcgi from the command line to see if > > it reports any errors. > > > > Hope that helps ! > > The contents of my dispatch.fcgi: > > require File.dirname(__FILE__) + "/../config/environment" > require ''fcgi_handler'' > > class MyRailsFCGIHandler < RailsFCGIHandler > SIGNALS = { > ''TERM'' => :exit_now, > } > > def exit_now_handler(signal) > dispatcher_log :info, "ignoring request to terminate immediately" > end > end > > MyRailsFCGIHandler.process! nil, 50 > > The contents of my .htaccess > > AddHandler fastcgi-script .fcgi > AddHandler cgi-script .cgi > Options +FollowSymLinks +ExecCGI > 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" > > One thing that I did after you mentioned is to run the dispatch.fcgi and > I get the following error: > > [hoover]$ ./dispatch.fcgi > Status: 500 Internal Server Error > [hoover]$ > > I wonder if it is one of the tab issues, but I al ready ran the dos2unix > script on those two files(I also changed the permission to 755) > > Thanks a LOT. > > > > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- * J * ~
James Adam wrote:> Have you also changed the #! line at the top of your dispatched toI had already. The logfile from the dispatch.fcgi is not giving me any clues either. -- Posted via http://www.ruby-forum.com/.