最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - textmate bundle for coffeescript - Stack Overflow

programmeradmin3浏览0评论

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 badges
Add a comment  | 

3 Answers 3

Reset to default 19

Add /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

发布评论

评论列表(0)

  1. 暂无评论