[Rails] Re: routing failures

Alan Francis
2006-02-14T15:23:35Z

Craig White wrote:
> OK - one more time with clarity points added...
>
> probably something really simple but I don''t understand.
>
> Shifting to Apache to w/ fastcgi (definitely feels faster than webrick)
>
> Anyway, I set the default route in routes.rb to be
>
>   map.connect '''', :controller =>
"placements", :action => ''list''
>
> which worked once I figured out apache...
>
> Anyway, now that I have done that, all attempts to access stuff inside
> the public directory fails (stylesheets, javascripts etc.) with this in
> the logs...

It sounds more like .htaccess problem, since a request for a static file
is being passed to rails for routing, it''s somehow being skipped by the
.htaccess rules.

Here''s the relevant section from a random rails app on my HD (not sure
how old it is, but it''s the default, unchanged, .htaccess)

# 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
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]

You''ll have changed that last line to be fcgi, but all the others
should
be unchanged.... are they ?

Random aside, are you using Windows ?

--
Posted via http://www.ruby-forum.com/.