Adding Ruby to Run Shell Script
If you want to interact with Ruby from within Automator you can do the following:
Add this XML:
<key>/usr/bin/ruby</key>
<dict>
<key>args</key>
<array>
<string>-e</string>
<string>%</string>
<string>--</string>
</array>
<key>script</key>
<array>
<string>$stdin.each { |arg| puts arg }</string>
<string>ARGV.each { |arg| puts arg }</string>
</array>
</dict>
to the file:
/System/Library/Automator/Run Shell Script.action/Contents/Resources/Shells.plist
Now when Automator is restarted /usr/bin/ruby will show up in the Shells: list of action Run Shell Script.
I got the idea from this Apple Discussion post telling how to add PHP.

I’m trying to do a project with my apple tv using a recipe from the net. this is probably a stupid question, but do i have to create the file “/System/Library/Automator/Run Shell Script.action/Contents/Resources/Shells.plist”? When I try and follow the file path i hit a dead end after /system/library/. Automator isn’t listed in that directory. How do I find/add shells.plist so that I can add Ruby support to my script? Thanks!
Brian,
Are you trying to run the script on the Apple TV itself? If so I am pretty sure it does not have Automator installed, not needed for a “locked” device.
If you are trying to run it on a Mac /System/Library/Automator/ should exist on Mac OS X 10.4 and later.