The problem is that your ruby script is also a text file and apache
doesn't know if you'd just like to give back a text file or execute
the script. Per default, it does the safer option, which is just
return the text.
This script works nicely when run from the windows
However, ... on my website, ... IE or FF
wants to download the .rb file.
You need to configure the server to handle cgis. You can either do
this in the global Apache configuration or in a file called
`.htaccess` which alters the configuration for the directory you're
located in. You'll need to require something along the lines of:
to instruct the server that execution of cgi's is generally allowed, and:
AddHandler cgi-script rb
for Apache to treat .rb files as cgi's. Not sure how this is handled
on Windows, but the script also needs to be executable (chmod +x on