I'm trying to add the textmate bundle for coffeescript. I've followed the instructions on github -
When I try to compile & display JavaScript I get the following error -
/tmp/temp_textmate.8hqQGD: line 12: coffee: command not found
I'm fairly certain it's due to my path being incorrect in textmate's preferences.
I'm trying to follow the instructions on this question - CoffeeScript TextMate Run Command but I must be doing something wrong as It's not working.
When I do which coffee I get /usr/local/bin/coffee
I've no TM_PATH variable in textmate's preferences only a PATH So, what should I put in my PATH variable in textmate? I currently have /usr/bin:/bin:/usr/sbin:/sbin
I've tried changing it to /usr/local/bin/ but when I try to run a command I get
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/bash_init.sh: line 27: dirname: command not found
Any ideas?
I'm trying to add the textmate bundle for coffeescript. I've followed the instructions on github - https://github.com/jashkenas/coffee-script-tmbundle
When I try to compile & display JavaScript I get the following error -
/tmp/temp_textmate.8hqQGD: line 12: coffee: command not found
I'm fairly certain it's due to my path being incorrect in textmate's preferences.
I'm trying to follow the instructions on this question - CoffeeScript TextMate Run Command but I must be doing something wrong as It's not working.
When I do which coffee I get /usr/local/bin/coffee
I've no TM_PATH variable in textmate's preferences only a PATH So, what should I put in my PATH variable in textmate? I currently have /usr/bin:/bin:/usr/sbin:/sbin
I've tried changing it to /usr/local/bin/ but when I try to run a command I get
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/bash_init.sh: line 27: dirname: command not found
Any ideas?
Share Improve this question edited May 23, 2017 at 12:11 CommunityBot 11 silver badge asked Aug 9, 2011 at 10:49 FinnnnFinnnn 3,5806 gold badges49 silver badges69 bronze badges3 Answers
Reset to default 19Add /usr/local/bin/
to the existing path, instead of replacing it entirely:
/usr/local/bin/:/usr/bin:/bin:/usr/sbin:/sbin
should work for you. Personally, I'm using
~/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
and the bundle is working correctly for me:
Use
echo $PATH
on the command line to see your current path. Copy+paste that into TextMate's preferences as the TM_PATH
.
Bonus tip: Add a NODE_PATH
variable to your TextMate preferences and paste your $NODE_PATH
in if you want require
statements to use the same paths in TextMate that they do from the command line. Here's my setup:
you have to add /usr/local/bin
to your path and not override your path with only /usr/local/bin
so your path should look like: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
edit: you can add it like that: PATH=$PATH:/usr/local/bin