# Problems deploying in Dreamhost

**URL:** <https://www.ruby-forum.com/t/problems-deploying-in-dreamhost/53717>\
**Category:** Rails\
**Created:** [February 14, 2006, 12:39am UTC](https://www.ruby-forum.com/t/problems-deploying-in-dreamhost/53717 "2006-02-14T00:39:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![carakan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@carakan](https://www.ruby-forum.com/u/carakan)\
**Post date:** [February 14, 2006, 12:39am UTC](https://www.ruby-forum.com/t/problems-deploying-in-dreamhost/53717/1 "2006-02-14T00:39:58Z")

</div>

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](https://www.ruby-forum.com/customer/submit)

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.

---

<div class="post-metadata">

**Author:** ![carakan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@carakan](https://www.ruby-forum.com/u/carakan)\
**Post date:** [February 14, 2006, 12:44am UTC](https://www.ruby-forum.com/t/problems-deploying-in-dreamhost/53717/2 "2006-02-14T00:44:59Z")

</div>

Hi !

2006/2/13, Carlos R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> [Contact](https://www.ruby-forum.com/customer/submit)
> 
> 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 !

---

<div class="post-metadata">

**Author:** ![carakan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@carakan](https://www.ruby-forum.com/u/carakan)\
**Post date:** [February 14, 2006, 12:58am UTC](https://www.ruby-forum.com/t/problems-deploying-in-dreamhost/53717/3 "2006-02-14T00:58:06Z")

</div>

Francois B. wrote:

> Hi !
> 
> 2006/2/13, Carlos R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> 
> > [Contact](https://www.ruby-forum.com/customer/submit)
> > 
> > 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.

---

<div class="post-metadata">

**Author:** ![carakan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@carakan](https://www.ruby-forum.com/u/carakan)\
**Post date:** [February 14, 2006, 3:19am UTC](https://www.ruby-forum.com/t/problems-deploying-in-dreamhost/53717/4 "2006-02-14T03:19:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![carakan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/df705f/32.png) [@carakan](https://www.ruby-forum.com/u/carakan)\
**Post date:** [February 14, 2006, 2:45am UTC](https://www.ruby-forum.com/t/problems-deploying-in-dreamhost/53717/5 "2006-02-14T02:45:08Z")

</div>

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](mailto: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/](http://www.ruby-forum.com/).
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–

- J \*  
~
