404 Error when trying to run

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)

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

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?

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

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

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.

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?

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]

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]

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]

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

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

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?