wende / autocomplete-elixir

Intelligent Elixir autocompletion provider for Atom autocomplete-plus
MIT License
42 stars 11 forks source link

elixir not found #3

Closed l4u closed 9 years ago

l4u commented 9 years ago

if I change
ac = spawn("elixir", array.reverse()) to ac = spawn("/usr/local/bin/elixir", array.reverse()) it works.

platform: Mac OS X 10.10.3 elixir installed with homebrew

Maybe we should find elixir in PATH?

wende commented 9 years ago

You must have "elixir" command in PATH. I can't use strict path because of other OS users.

l4u commented 9 years ago

elixir is actually in $PATH But I'm not sure why atom couldn't spawn elixir.

I've tried starting atom from the terminal but it didn't work.

wende commented 9 years ago

Is it possible that You launch atom as su, while You've got Elixir in user's $PATH I've got myself several times on that

I could make a config field for a package where You specify Elixir's path manually. That should fix the exceptions where it happens

l4u commented 9 years ago

Just checked with $PATH and atom without sudo but no luck. A elixir path config should work. Also, should we use BufferedProcess instead of spawn?

wende commented 9 years ago

I don't know what BufferedProcess is. To be honest I'm quite new to Atom environment. What are advantages of using it over child_process? I see it's experimental.

l4u commented 9 years ago

I am not sure too. I haven't written any packages for atom. But I found that BufferedProcess is used by several packages for process spawning when I was trying to fix the elixir spawning issue.

BufferedProcess is a wrapper of ChildProcess.

noizu commented 9 years ago

There is a similar issue on windows, switching to elixir.bat instead of elixir appears to resolve it.

jordpo commented 9 years ago

hm - for me the issue arises when I launch Atom using Spotlight Search or from Applications instead of the command line. Running atom in the command line spawns the elixir process correctly.

wende commented 9 years ago

I just changed spawn to BufferedProcess from Atom API. Please elaborate if it's any better :)

Cheers