I have a problem trying to compile a directory of coffescript files from php. The code looks something like this:
$output = exec_shell("/usr/bin/coffee -c -o public/javascript public/coffeescript");
/usr/bin/coffee is a symblic link to /usr/local/lib/node_modules/coffee-script/bin/coffee, but I've also tried directly using the complete path to the executable. I've tried all php shell commands I know of (system, passthru, exec, exec_shell). MAMP is running Apache as my user on Mac OS X. I'm doing the same thing with compass, which works perfectly (without absolute path, even), and they are both installed using node with -g.
I'm trying to achieve on-demand compilation on page request in a development environment, but now I'm completely stumped.
Any insight into this will be greatly appreciated.