[MacRuby-devel] An easy way to add .rb files to Xcode build automatically?

Nick Ludlam nick at recoil.org
Wed Jul 28 16:03:57 PDT 2010


On 27 Jul 2010, at 18:25, Michael Jackson wrote:

> I tried adding a folder to the root of my project called "Classes" in
> which I put all of my Ruby code. I then added that folder reference to
> the project. However, when I build the project the files are copied to
> a "Classes" folder in the build instead of to the project root where
> they can be found by main.rb.


Hi Michael,
In the XCode project tree, does your 'Classes' folder have a blue or yellow icon? There are two types of folders that you can add to the source tree. Blue folders (folder references) are 'physical' in the sense that the structure will be preserved when copied to the Resources folder of your application's bundle.

Yellow folders (groups) are more like logical folders for partitioning your project files within XCode. They don't strictly enforce or correspond to any structure on disk unless you specifically set it up that way, and anything under these folders will become flattened into the final Resources destination folder.

Within my current MacRuby project, I only use the blue folder references for any packaged gems that I want to include. All normal ruby project files are in yellow group folders.

There's a good post about it at http://iphonedevelopertips.com/xcode/xcode-folders-and-the-file-system-part-1.html

Nick



More information about the MacRuby-devel mailing list