Because I didn't create textmate link when installing, so it can not find 'mate' command. who can help me to deal with this? thanks
Even though is question is more suited for Super User, I'll bite:
Creating a symbolic link can either be done by selecting Help → Terminal Usage… from the menu, or from the shell by running something like the following:
ln -s /Applications/TextMate.app/Contents/Resources/mate ~/bin/mate
This assumes that you have ~/bin created and in your path and that TextMate is installed in /Applications.
Therefore, I'd recommend looking inside of the Textmate.app
bundle :)
(Source)