I had this problem when the server is running nice and fine, but the controllers wont respond. Look at this post http://railsforum.com/viewtopic.php?pid=36358.
And then I realized the reason for the problem, quite by chance actually, but I found that the current location while launching the server program did matter.
When I start the server from the application-root directory (.../railsapp/sampleApp/ ) using ./script/server it always works fine.
However, if I start the server from .../railsapp/sampleApp/script using ./server it doesnt work.
I think the trick is that from application-root it seems all the application components and directories etc.
Its not a big thing, though I now wish that it was documented properly somewhere.