Mailing List Archive


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

Re: [tlug] A Ruby question



burlingk@?? wrote:
I am currently looking over the different scripting languages out there
in an attempt to bring my coding skills more up to date.

Always a noble cause :-)

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 .rhtml -> Usually means an HTML file with embedded ruby (erb) Similar to PHP or JSP .ruby -> I've never seen anyone use this as an extension. I'd suggest NOT using it. .rb -> Extension for ruby scripts (by convention). I'd suggest using these for any scripts you write in ruby and want to identify it as a ruby script

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.

Cheers,
Alain


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links