system("diskutil ..") works in one xcode project but not in another

I’m using

system("diskutil erasevolume HFS+ 'ramdisk' `hdiutil attach -nomount ram://2500000`");  

in the setup() function to create a RAM disk (Mac OS Snow Leopard). It works fine in one xcode project but when I copy the same line to another project it doesn’t work. No errors, I just don’t get a RAM disk. I guess it’s got to do with some xcode project settings but I have no clue where to look. Any hints?