Rails requests return dispatch.cgi (or .fcgi) file contents

I’m running Apache2 with CGI and FastCGI alternatively. I’ve had a
problem that I haven’t been able to find more than a single reference to
online.

When my .htaccess file has the CGI rewrite rule in effect, my Rails app
works. When I change to FastCGI, all I get for Rails requests is the
contents of the dispatch.fcgi file.

Thinking I may have screwed something up trying to get things working in
the first place, I reverted all the changes to my rails app code and
tried again.

Now, FastCGI requests work, but if I change back to CGI requests, all I
get in the browser is the contents of dispatch.cgi.

So, I’ve had it happen both ways, and I can’t explain why in either
case, or why the behavior reversed itself. I have FastCGI working (which
is what I want), but I’d like to know why this happens so I can fix it
if the symptoms re-appear.

Help would be truly appreciated!