On 10/09/2012 07:32 AM, Nathan Ahmed wrote:
> On Monday, October 8, 2012, Hassan Schroeder wrote:
> 
>     On Sun, Oct 7, 2012 at 12:02 PM, Ghassen SMIDA <lists / ruby-forum.com
>     <javascript:;>> wrote:
>     > I'm developing Ruby under Windows. My web host is running under linux
>     > and supports Ruby interpreting but with one condition that the
>     extension
>     > is .pl not .rb and that's the reason.
> 
>     That's ridiculous. Find yourself a real web host.
> 
> Hassan is quite correct

While I agree on this point, I suspect that the workaround may actually
be pretty simple.  More than likely, this is a scenario where the script
is running as a CGI script.  If so, the only .rb files that need special
attention are the ones directly executed in that mode by the web server.

It should be sufficient to rename those CGI scripts with a .pl extension
and ensure that the shebang line is set correctly in each of them to run
them with a Ruby interpreter.  Files being required in by those scripts
shouldn't need any extension change since the Ruby interpreter is in
control of loading them, not the web server.

For the Windows development environment, it should be easy enough to set
the file association for .pl files to be run by a Ruby interpreter.
That will allow relatively easy testing of the CGI scripts under Windows
without renaming them to have the .rb extension.  This is pretty ugly to
do though and may lead to confusion later if you ever need to install
Perl interpreter.

All that said, it shouldn't be a difficult matter for the hosting
provider to modify the web server configuration to allow running .rb
files as CGI scripts.  If the hosting provider balks at doing so while
allowing you to hack around and use a Ruby interpreter under the covers,
you should probably consider carefully if you really want trust with any
meaningful operation.

Just my $0.02. ;-)

-Jeremy