Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] A Ruby question



On Sun, 25 Feb 2007 15:06:03 +0900, Alain Hoang <hoanga@??> wrote:

burlingk@?? wrote:

 I see that information on ruby lists rbx, rhtml, ruby, and rb as
extensions associated with ruby scripts and libraries.

.rbx -> Not sure off the top of my head

I believe it is the Windows extension.

Which of these is most appropriate for a serverside script that would be
accessed via a web browser (or rather which seems to be the most
commonly used), and which would be so for a shell script?

I'd say it depends. Some people might like to stick with cgi as the file extension name in the case they decide to swap out the implementation CGI script with another language or make it transparent to the user that the only thing they should really be aware of is that it is a cgi program of sort. Some people would use .rb since they want to identify the script as a ruby file and also it might be easier for identification purposes if you're trying to use something like mod_ruby in your webserver.


I'm sure our other Ruby hackers on this ML will have their own thoughts to add.

Yes, .rb and.cgi are the most common. Of course, there is a school of thought that says your URLS should not show the programming language you are using. I personally lean towards this route.

Thus instead of http://tlug.jp/foo.rb you have http://tlug.jp/foo

Cheers,
Zev


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links