It seems it is just a path problem as I can invoke newcocoa directly
but what is the problem?

anne-g-2:~/Desktop/cocoa anne$ newcocoa dud
-bash: newcocoa: command not found

anne-g-2:~/Desktop/cocoa anne$ /opt/local/bin/newcocoa dud
creating: dud
creating: Rakefile
creating: README
creating: other templates
NOW, Edit Rakefile

anne-g-2:~/Desktop/cocoa anne$ $PATH
-bash: /usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/private/
opt/local/bin:/private/opt/local/lib:/private/opt/local/sbin:/bin:/
sbin:/usr/bin:/usr/sbin:/usr/local/mysql/bin/: