404 Error in Ruby on Rails


#1

Greetings All,

I just set up Ruby on Rails to run on my server package.
It is all set up to run fine, I get the congrads page with no errors and such.

However when create a basic app to test to make sure everything is working properly. And everytime I try to go to a controller I set up I get a 404 error. I have tried a few different controllers, and all get the 404 error.

I have tried setting the RAILS_ENV to production or developement and still get the same. I have also tried killing all ruby processes and I still get the 404.

Anyone got any ideas?


Blessed Be

Freewolf


#2

Can you tell if the 404 is being generated by Apache or by Rails? You might recognize it by the design of the response page or by checking the http headers returned by the server. Also look in your apache logs to see if there are messages there.


#3

The 404 is being generated by Ruby as it is the default 404.html page in the public directory.

I was looking at the logs and hits get recorded to the access.log but not the error.log. So it would seem that apache thinks it is serving up the request without any problems.


Blessed Be

Freewolf


#4

Ok, now check the Rails logs which I think are in RAILS_ROOT/log/ by default. Any info there?

Check your routes.rb file too to make sure it has not been modified from the default :controller/:action/:id pattern.

And just to be sure - you’re using urls like:
/pie_slice/index
and not:
/PieSlice/index
nor
/PieSliceController/index
right?