Problems deploying in Dreamhost


#1

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:

Contact

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 R.


#2

Hi !

2006/2/13, Carlos R. removed_email_address@domain.invalid:

Contact

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 !


#3

Francois B. wrote:

Hi !

2006/2/13, Carlos R. removed_email_address@domain.invalid:

Contact

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 “

Application error

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.


#4

James A. wrote:

Have you also changed the #! line at the top of your dispatched to

I had already. The logfile from the dispatch.fcgi is not giving me any
clues either.


#5

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 R. removed_email_address@domain.invalid wrote:

Change this error message for pages not found in public/404.html

end


Posted via http://www.ruby-forum.com/.


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

  • J *
    ~