Unable to create symbolic link with Textmate in terminal. (mate: command not found)

I am currently browsing http://ruby.railstutorial.org/ and it uses the "mate" command to access Textmate through the terminal. I have had Textmate on my Macbook Air (Lion OS) since I bought it first, but when I try to use a command like "mate .gitignore" the terminal gives me "mate: command not found".

I looked at all the other StackOverflow questions on this question and did the following:

  • Attempting to create a symbolic link through the terminal using this code.

    $ sudo ln -s /Applications/TextMate.app/Contents/SharedSupport/Support/bin/mate /usr/bin
    
          

This code allows me to enter my password and tells me that the file exists, but still prevents me from using the "mate" command.

  • Accessing Textmate / Help / Terminal Usage and tried to create a link for /usr/bin

    just to say the operation is not allowed.

  • Used alias mate='open -a textmate'

    . It works; however, I have to do this every time I open a terminal.

So my question is, can anyone tell me what is wrong? Love to figure it out!

Thank!

+3


source to share


2 answers


First, you must not add anything to /usr/bin

. You have to add it to /usr/local/bin

. Also, getting the message "file already exists" from ln

means that it has not created a link. Try the following:

ln -s /Applications/TextMate.app/Contents/SharedSupport/Support/bin/mate /usr/local/bin/mate

      



Depending on the current setup, this may need to be started with sudo

. In general, if you don't know whether to run something with sudo

or not, try without the first one and see if you get a permission error, then use sudo

.

+18


source


The best way to do it is from TextMate -> preferences -> Terminal and then check the installation all the previous methods didn't work for me.



+5


source







All Articles