Textmate bundle for coffeescript

I am trying to add a textmate package for coffeescript. I followed the instructions on github - https://github.com/jashkenas/coffee-script-tmbundle

When I try to compile and display JavaScript, I get the following error:

/tmp/temp_textmate.8hqQGD: line 12: coffee: command not found 

I am pretty sure that due to the wrong path in the textmate settings.

I am trying to follow the instructions on this subject - TextScript start command in HTML format>, but I have to do something wrong since it does not work.

When I make coffee, I get / usr / local / bin / coffee

I don't have TM_PATH variable in textmate settings, only PATH So what should I put in PATH variable in textmate? I currently have / usr / bin: / bin: / usr / sbin: / sbin

I tried changing it to / usr / local / bin /, but when I try to run the command, I get

 /Applications/TextMate.app/Contents/SharedSupport/Support/lib/bash_init.sh: line 27: dirname: command not found 

Any ideas?

+7
source share
3 answers

Add /usr/local/bin/ to the existing path, instead of replacing it completely:

 /usr/local/bin/:/usr/bin:/bin:/usr/sbin:/sbin 

should work for you. I personally use

 ~/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin 

and the package works correctly for me:

enter image description here

+19
source

Using

 echo $PATH 

on the command line to see your current path. Copy + paste into TextMate settings as TM_PATH .

Bonus tip . Add the NODE_PATH variable to your TextMate settings and insert your $NODE_PATH if you want the require statements to use the same paths in TextMate as they are from the line command. Here is my setup:

enter image description here

+3
source

you need to add /usr/local/bin to your path and not redefine your path with only /usr/local/bin

so your path should look like this: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

edit : you can add it like this: PATH=$PATH:/usr/local/bin

+2
source

All Articles