A second issue with using Xcode for editing Ruby is that it by default does not correctly comment code in Ruby files. This again is easy to fix:
Open the scripts menu, choose Edit User Scripts.
Select Comments: Un/Comment Selection
This will bring up a Perl script that Xcode uses to perform the comment/uncomment function. We need to modify this to recognize Ruby file types:
Replace:
# determine the type of file we have by looking for the #! line at the top
# careful--it might already be commented out!
my $commentString;
Xcode 3's language support for Ruby is somewhat broken. Fortunately, fixing it only requires a few small modifications.
One major problem, Xcode doesn't know what .erb and .rake files are.
There should be a file:
/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Versions/Current/Resources/Standard file types.pbfilespec
Copy this to /Library/Application Support/Developer/Shared/Xcode/Specifications/, creating that directory if it doesn't exist. Editing the original works, but your changes will be overwritten if you update Xcode, better to just override the standard files.
Xcode 3 allows you to specify the syntax of a language with .xclangspec files, which contain information on the structure of the language that is used not only for syntax coloring, but also for populating the symbols menu, showing the currently selected block with the "Focus Follows Selection" feature, selecting the appropriate amount of text on a double-click, etc.
The POV-Ray syntax specification file is a little crude, work still to be done with it, but already a considerable improvement over the other options on the Mac for editing POV-Ray files.