# 404 Error when trying to run

**URL:** <https://www.ruby-forum.com/t/404-error-when-trying-to-run/69378>\
**Category:** Rails\
**Created:** [September 20, 2006, 6:02pm UTC](https://www.ruby-forum.com/t/404-error-when-trying-to-run/69378 "2006-09-20T18:02:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![freewolf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/90db22/32.png) [@freewolf](https://www.ruby-forum.com/u/freewolf)\
**Post date:** [September 20, 2006, 6:02pm UTC](https://www.ruby-forum.com/t/404-error-when-trying-to-run/69378/1 "2006-09-20T18:02:08Z")

</div>

I am with Dreamhost as my ISP.

I set up Ruby on Rails as per their wiki.  
([http://wiki.dreamhost.com/index.php/Ruby\_on\_Rails](http://wiki.dreamhost.com/index.php/Ruby_on_Rails))

I can get to the index page fine.  
When I click the link to view the application enviroment it says that  
for security reasons we cannot show, so I thinking that everything is  
fine right??

Well I set up the skeleton of an application and database.  
However when I go to the page where it should be at.

I get the ruby 404 error.  
Since I get the ruby 404 error it tells me that I am hitting the public  
directory just fine.  
But I Cannot seem to get the apps to be found.

Anyone else have this problem??  
Any solutions or suggestions??

Blessed Be

Phillip

---

<div class="post-metadata">

**Author:** ![freewolf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/90db22/32.png) [@freewolf](https://www.ruby-forum.com/u/freewolf)\
**Post date:** [September 20, 2006, 7:05pm UTC](https://www.ruby-forum.com/t/404-error-when-trying-to-run/69378/2 "2006-09-20T19:05:16Z")

</div>

On 2006-09-20, at 13:02 , Phillip B. wrote:

> I am with Dreamhost as my ISP.
> 
> I get the ruby 404 error.  
> But I Cannot seem to get the apps to be found.

how’s your .htaccess?

---

<div class="post-metadata">

**Author:** ![freewolf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/90db22/32.png) [@freewolf](https://www.ruby-forum.com/u/freewolf)\
**Post date:** [September 20, 2006, 7:28pm UTC](https://www.ruby-forum.com/t/404-error-when-trying-to-run/69378/3 "2006-09-20T19:28:51Z")

</div>

Caio C. wrote:

> how’s your .htaccess?

My .htaccess is as follows

# General Apache options

AddHandler fastcgi-script .fcgi  
AddHandler cgi-script .cgi  
Options +FollowSymLinks +ExecCGI

# If you don’t want Rails to look in certain directories,

# use the following rewrite rules so that Apache won’t rewrite certain

requests

# 

# Example:

# RewriteCond %{REQUEST\_URI} ^/notrails.\*

# RewriteRule .\* - [L]

# Redirect all requests not available on the filesystem to Rails

# By default the cgi dispatcher is used which is very slow

# 

# For better performance replace the dispatcher with the fastcgi one

# 

# Example:

# RewriteRule ^(.\*)$ dispatch.fcgi [QSA,L]

RewriteEngine On

# If your Rails application is accessed via an Alias directive,

# then you MUST also set the RewriteBase in this htaccess file.

# 

# Example:

# Alias /myrailsapp /path/to/myrailsapp/public

# RewriteBase /myrailsapp

RewriteRule ^$ index.html [QSA]  
RewriteRule ^([^.]+)$ $1.html [QSA]  
RewriteCond %{REQUEST\_FILENAME} !-f  
RewriteRule ^(.\*)$ dispatch.fcgi [QSA,L]

# In case Rails experiences terminal errors

# Instead of displaying this message you can supply a file here which

will be rendered instead

# 

# Example:

# ErrorDocument 500 /500.html

ErrorDocument 500 “

## Application error
Rails application failed to  
start properly”

This is the file that is generated on the generation of a rails app by  
their system. As per their Wiki all I chnaged was

RewriteRule ^(.\*)$ dispatch.fcgi [QSA,L]

It was pointed to .cgi and I was suppose to point it to .fcgi.

I am running this under a subdomain.

Blessed Be

Phillip

---

<div class="post-metadata">

**Author:** ![freewolf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/90db22/32.png) [@freewolf](https://www.ruby-forum.com/u/freewolf)\
**Post date:** [September 20, 2006, 9:00pm UTC](https://www.ruby-forum.com/t/404-error-when-trying-to-run/69378/4 "2006-09-20T21:00:04Z")

</div>

Caio C. wrote:

> On 2006-09-20, at 14:28 , Phillip B. wrote:
> 
> > My .htaccess is as follows  
> > seems correct.
> 
> > It was pointed to .cgi and I was suppose to point it to .fcgi.
> 
> So, have you enabled fastcgi in the dreamhost panel?

Yes I have for the subdomain.  
And actually for the main domain as well I believe.

Any other ideas about where I just look or what I should try??

Blessed Be

Phillip

---

<div class="post-metadata">

**Author:** ![freewolf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/90db22/32.png) [@freewolf](https://www.ruby-forum.com/u/freewolf)\
**Post date:** [September 20, 2006, 8:47pm UTC](https://www.ruby-forum.com/t/404-error-when-trying-to-run/69378/5 "2006-09-20T20:47:39Z")

</div>

On 2006-09-20, at 14:28 , Phillip B. wrote:

> My .htaccess is as follows

seems correct.

> It was pointed to .cgi and I was suppose to point it to .fcgi.

So, have you enabled fastcgi in the dreamhost panel?

> I am running this under a subdomain.

Shouldn’t be a problem.

---

<div class="post-metadata">

**Author:** ![freewolf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/90db22/32.png) [@freewolf](https://www.ruby-forum.com/u/freewolf)\
**Post date:** [September 20, 2006, 9:25pm UTC](https://www.ruby-forum.com/t/404-error-when-trying-to-run/69378/6 "2006-09-20T21:25:43Z")

</div>

On 2006-09-20, at 16:00 , Phillip B. wrote:

> Any other ideas about where I just look or what I should try??

Your dispatchers 775’ed?

Shebang lines correct?

./script/console launches fine?

What’s in the access logs?

---

<div class="post-metadata">

**Author:** ![freewolf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/90db22/32.png) [@freewolf](https://www.ruby-forum.com/u/freewolf)\
**Post date:** [September 20, 2006, 10:46pm UTC](https://www.ruby-forum.com/t/404-error-when-trying-to-run/69378/7 "2006-09-20T22:46:23Z")

</div>

Caio C. wrote:

> > Any other ideas about where I just look or what I should try??
> 
> Your dispatchers 775’ed?

They where at 755. I switched them to 775 and still no difference (did  
not think that would matter that much)

> Shebang lines correct?

Yup. As dreamhost says in the default, but I went in with a whereis just  
in case and it is correct.

> ./script/console launches fine?

Yes that seems to load fine.

> What’s in the access logs?

In access.log

70.103.236.194 - - [20/Sep/2006:13:01:28 -0700] “GET /paycheck/  
HTTP/1.1” 200 235 “-” “Mozilla/4.0 (compatible; MSIE 7.0; Windows NT  
5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)”  
70.103.236.194 - - [20/Sep/2006:13:01:41 -0700] “GET /paycheck/  
HTTP/1.1” 200 235 “-” “Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;  
rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7”  
70.103.236.194 - - [20/Sep/2006:13:35:25 -0700] “GET /paycheck/  
HTTP/1.1” 200 235 “-” “Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;  
rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7”

In the production.log is for each page hit.

Processing InfoController#properties (for 70.103.236.194 at 2006-09-19  
14:32:16) [GET]  
Session ID: 450586f3ee6762222b9e9bfb026c5602  
Parameters: {“action”=\>“properties”, “controller”=\>“rails/info”}  
Completed in 0.00171 (583 reqs/sec) | Rendering: 0.00009 (4%) | 500  
[[http://finances.freewolf.net/rails/info/properties](http://finances.freewolf.net/rails/info/properties)]

Processing InfoController#properties (for 70.103.236.194 at 2006-09-19  
14:42:16) [GET]  
Session ID: 450586f3ee6762222b9e9bfb026c5602  
Parameters: {“action”=\>“properties”, “controller”=\>“rails/info”}  
Completed in 0.00141 (711 reqs/sec) | Rendering: 0.00008 (5%) | 500  
[[http://finances.freewolf.net/rails/info/properties](http://finances.freewolf.net/rails/info/properties)]

Processing InfoController#properties (for 70.103.236.194 at 2006-09-19  
14:42:16) [GET]  
Session ID: 450586f3ee6762222b9e9bfb026c5602  
Parameters: {“action”=\>“properties”, “controller”=\>“rails/info”}  
Completed in 0.00025 (3986 reqs/sec) | Rendering: 0.00007 (26%) | 500  
[[http://finances.freewolf.net/rails/info/properties](http://finances.freewolf.net/rails/info/properties)]

Processing PaycheckController#index (for 70.103.236.194 at 2006-09-19  
14:42:16) [GET]  
Session ID: 450586f3ee6762222b9e9bfb026c5602  
Parameters: {“action”=\>“index”, “controller”=\>“paycheck”}

ActionController::UnknownAction (No action responded to index):  
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/filters.rb:368:in  
`perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform\_action\_without\_rescue’  
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/benchmarking.rb:69:in  
`measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/benchmarking.rb:69:in `perform\_action\_without\_rescue’  
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/rescue.rb:82:in  
`perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/base.rb:408:in `send’  
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/base.rb:408:in  
`process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_controller/filters.rb:377:in `process\_without\_session\_management\_support’  
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/session\_management.rb:117:in  
`process' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in `dispatch’  
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi\_handler.rb:150:in  
`process_request' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:54:in `process!’  
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi\_handler.rb:53:in  
`each_cgi' /usr/lib/ruby/1.8/fcgi.rb:597:in `each’  
/usr/lib/ruby/1.8/fcgi.rb:597:in `each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi_handler.rb:53:in `process!’  
/usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/fcgi\_handler.rb:23:in  
`process!’  
dispatch.fcgi:33

---

<div class="post-metadata">

**Author:** ![freewolf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/90db22/32.png) [@freewolf](https://www.ruby-forum.com/u/freewolf)\
**Post date:** [September 20, 2006, 11:40pm UTC](https://www.ruby-forum.com/t/404-error-when-trying-to-run/69378/8 "2006-09-20T23:40:40Z")

</div>

Caio C. wrote:

> On 2006-09-20, at 17:46 , Phillip B. wrote:
> 
> > > What’s in the access logs?  
> > > In the production.log is for each page hit.
> 
> Well, looks like your app is running fine.
> 
> The last error says the paycheck controller doesn’t have the index  
> action. Does it?

You know know I feel really stupid.  
That was the piece missing.

I was trying to follow a tutorial to get things working.  
It lead me ot believe that even without an index there would be a  
certain error that gets thrown up. When that did not I assumed there was  
somethign wrong with how ROR was running on the system. I did not want  
to get into coding if I could not get something to work.

However adding an index and it showed up, so there was never anything  
wrong.

Thanks alot for your help.

Blessed Be

Phillip

---

<div class="post-metadata">

**Author:** ![freewolf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/90db22/32.png) [@freewolf](https://www.ruby-forum.com/u/freewolf)\
**Post date:** [September 20, 2006, 11:14pm UTC](https://www.ruby-forum.com/t/404-error-when-trying-to-run/69378/9 "2006-09-20T23:14:03Z")

</div>

On 2006-09-20, at 17:46 , Phillip B. wrote:

> > What’s in the access logs?
> 
> In the production.log is for each page hit.

Well, looks like your app is running fine.

The last error says the paycheck controller doesn’t have the index  
action. Does it?

Do accessing other controllers work?
