Ruby on Rails 404


#1

I’ve followed every DH-related guide to RoR deployment, and I can’t get it to work. My app runs fine locally, but all I get is an index listing when browsing “ror-app-domain.com” and a 404 error on “ror-app-domain.com/controller”. ps -A shows no processes running. Is there something I’m missing to get this thing started up?


#2

Executing ./dispatch.fcgi results in this in the crash log:
[22/Mar/2007:15:10:16 :: 19791] Dispatcher failed to catch: private method split' called for nil:NilClass (NoMethodError) /usr/lib/ruby/1.8/cgi.rb:897:inparse’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_controller/cgi_ext/raw_post_data_fix.rb:45:in initialize_query' /usr/lib/ruby/1.8/cgi.rb:2274:ininitialize’
/usr/lib/ruby/1.8/fcgi.rb:594:in new' /usr/lib/ruby/1.8/fcgi.rb:594:ineach_cgi’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/fcgi_handler.rb:141:in process_each_request!' /usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/fcgi_handler.rb:55:inprocess!’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/fcgi_handler.rb:25:in `process!'
dispatch.fcgi:26
killed by this error

I can run the app by starting WEBrick.


#3

what is the listing of? make sure the domain manager is pointing to the public folder of your rails app, not the app’s root folder


#4

I finally got the app to run by using the .htaccess file I stumbled upon here: http://johnnunemaker.stikipad.com/jn/show/Rails+on+Dreamhost.

The listing is as follows:

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 /500.html

-Ryan