padawan-php / padawan.sublime

A ST3 plugin for padawan.php completion server
MIT License
11 stars 2 forks source link

PATH set, yet padawan executable not found #2

Closed Semmu closed 8 years ago

Semmu commented 8 years ago

I have set up my PATH so it includes the directory for padawan, yet this plugin (or Sublime Text itself) can't find the binary.

As you can see on my screenshot, the command padawan is recognized by my terminal emulator, but Sublime Text does not find it. (error message on the status bar)

screenshot from 2015-11-13 00 30 50

mkusher commented 8 years ago

@Semmu I guess you set PATH in you .zshrc or .bashrc or so. If you start SublimeText from command line, will it find padawan executable?

mkusher commented 8 years ago

@Semmu have you managed to solve the issue?

Semmu commented 8 years ago

Yes and no. Starting it from a terminal does solve the issue, but I don't understand why doesn't Sublime Text have my envvars set automatically. I do it in my ~/.bash_aliases, which is included by ~/.bashrc, which is included by ~/.profile, so every process started by me should have it.

But this is not the issue of the plugin itself :)

mkusher commented 8 years ago

try in your ~/.bash_profile

PATH="$PATH:$HOME/.composer/vendor/bin"
export PATH
atapatel commented 8 years ago

How to solve this issue in zsh Item2 terminal.

mkusher commented 8 years ago

@atapatel I guess you need to add path definition to .zprofile instead of .bash_profile

elboletaire commented 7 years ago

I have it set in .zprofile, .zshrc, and any other available .z... dotfile available in my home dir and it still doesn't find padawan. In my case all these files are symlinks which point to the original files located under ~/.dotfiles/${filename}, but this should not be an issue (and if it's an issue, would be the first time).

How should I proceed to debug this?

mkusher commented 7 years ago

@elboletaire plugin doesn't make any magic, just creates subprocess. So, when in your terminal, running echo $PATH should output the right new PATH with composer bins in it

elboletaire commented 7 years ago

It does, but then sublime says padawan is not found in my path...

imatge

imatge

mkusher commented 7 years ago

@elboletaire if you run sublime from terminal, then it'll work

elboletaire commented 7 years ago

That's not a solution 😕

mkusher commented 7 years ago

@elboletaire it only means, that the problem is not with the plugin, but with your env

elboletaire commented 7 years ago

Then... what's the solution? Should I add the composer/vendor/bin path to /etc/environment?

If so, why is this not stated in the readme file?

elboletaire commented 7 years ago

Oh, BTW, running from my command line works, but when trying to generate the index it says Error occured, code 255. But the console is empty, so can't get more information about the error...

imatge

elboletaire commented 7 years ago

Ok, sorry for the last issue, I see in https://github.com/padawan-php/padawan.vim/issues/17 that it's a memory issue

mkusher commented 7 years ago

Should I add the composer/vendor/bin path to /etc/environment?

adding to ~/.*profile and re-loggining should be enough. There is a link to composer documentation on how to achieve it.

mkusher commented 7 years ago

~yeah, it was fixed here https://github.com/padawan-php/padawan.php/issues/47~ it is tracked by https://github.com/padawan-php/padawan.php/issues/42