Setting OS X Path variable for Sublime

I'm setting up Sublime to run with NodeJs on my Mac. I get the error below

enter image description here

However, looking at my Path variable, /usr/bin/local is in the Path (I assume these are different?). I'm interested to know why the Node plugin isn't pulling the same $PATH as I get in terminal.

enter image description here


Solution 1:

Quick Workaround:

Just launch SublimeText2 via your Terminal by typing: subl Then the Plugin has the PATH that is otherwise not really initialized.

Solution 2:

For GUI applications in Mountain Lion you need to set the PATH variable in /etc/launchd.conf. You cannot append to the existing PATH variable because this file doesn't have access to the environment variable. So you must overwrite the existing PATH variable. Also a restart is required every time you edit /etc/launchd.conf.

setenv PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

Source: Overwatering Blog - Setting the PATH on OS X Mountain Lion