Originally posted by Lars Behnke:
How suitable is Ruby for performing the following tasks as compared to other scripting languages such as Perl, JavaScript or Groovy:
(1) Running Ruby scripts as part of an ANT/Maven build procedure.
(2) Executing Ruby scripts from a shell/batch script in order to perform
file system tasks (lets say traverse directories and rename files)
(3) Executing Ruby scripts within an java application in order to perform customizable data validations.
Regarding (1), I wrote an article back in 2003, titled
Scripting Ant for the journal, which shows how to embed Python code into an
Ant script but the same stuff can be done with Ruby, too. And, of course, running a Ruby script with the <exec/> task is just the same as running a Python or Perl script.
Regarding (2), the same functionality exists in Ruby's standard libraries as can be found in Python or Perl, for example.
Regarding (3), Ruby beats Perl 12-0. With JRuby, you can embed Ruby code into your Java application or vice versa. The same is not possible with Perl, as far as I know. For Python, however, there's Jython.