From: Dave Bass Date: 2008-12-28T20:43:45+09:00 Subject: Re: eRuby/erb outside of Rails Jonny Noog wrote: > But if things begin to look too involved, then I may just take the > pragmatic appraoch and stick to PHP for now. I took a similar pragmatic approach as my web host is rather restrictive and I was unable to get Ruby to work as CGI. I use PHP for the look-and-feel of the website (basically including HTML fragments). The PHP script calls a Perl or Ruby script which does the real work and generates the page content. This site only has a low volume of traffic so resources are not an issue. One concern is how to transfer data between PHP and Ruby/Perl. I finally settled on URL-encoded strings, as there are standard solutions in all three languages and no shell-dangerous characters are involved. An advantage of this approach of separating content from presentation is that the Perl/Ruby script can be developed independently of any web considerations. I use a little Perl script as a CLI. FWIW, I developed one particular script originally in Perl, then in Java and finally in Ruby. The Ruby version is both the shortest and the tidiest. For future developments I might call a compiled C program from Ruby, if Ruby turns out to be too slow for the number-crunching I'll need to do. I like the idea of using the appropriate language for each part of the job. Dave -- Posted via http://www.ruby-forum.com/.