Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting "Docker executable not found." #1

Open
chrisnicola opened this issue May 30, 2017 · 6 comments
Open

Getting "Docker executable not found." #1

chrisnicola opened this issue May 30, 2017 · 6 comments

Comments

@chrisnicola
Copy link

I have docker installed on OSX as well as the docker-sync gem. But I am still getting this error. docker and docker-compose commands are available in /usr/local/bin and that is in /etc/paths and available via the terminal.

The exact error is:

Docker executable not found. Install Docker or set ruby-lsc.commandWithArgs setting
@mtsmfm
Copy link
Owner

mtsmfm commented May 31, 2017

Thanks for your reporting!

Could you show me the result of echo $PATH on your terminal?

@mtsmfm
Copy link
Owner

mtsmfm commented May 31, 2017

And could you try ruby-lsc.commandWithArgs setting?

{
    "ruby-lsc.commandWithArgs": [
        "/usr/local/bin/docker", "run", "--rm", "-i", "mtsmfm/language_server-ruby"
    ]
}

@chrisnicola
Copy link
Author

Yes that and it does work. The path is:

/usr/local/opt/rbenv/shims /usr/local/sbin ./bin /Users/chrisnicola/bin /usr/local/opt/rbenv/shims /usr/local/opt/rbenv/bin /usr/local/bin /usr/bin /b
in /usr/sbin /sbin /opt/X11/bin /Library/Frameworks/Mono.framework/Versions/Current/Commands /usr/local/opt/rbenv/shims /usr/local/sbin ./bin /Users/c
hrisnicola/bin /usr/local/opt/rbenv/bin /Applications/Postgres.app/Contents/Versions/latest/bin /Users/chrisnicola/.fzf/bin /Applications/Postgres.app
/Contents/Versions/latest/bin

Only thing I can think of is that vscode isn't loading the shell path.

@mtsmfm
Copy link
Owner

mtsmfm commented May 31, 2017

Hmm, could you try restarting (not reloading) vscode and macOS?

I'll investigate how vscode detect PATH 🤔

@rebornix
Copy link

@mtsmfm VSCode loads env successfully if it's launched from command line, otherwise vscode has no idea about the shell path. To mitigate this problem, we can load the shell path manually when the extension gets activated. Here is how we handle this issue in VSCode Ruby extension https://github.com/rubyide/vscode-ruby/blob/master/src/utils.ts#L25 , we can use the same technique here.

@mtsmfm
Copy link
Owner

mtsmfm commented Sep 23, 2017

@rebornix Thank you for your information!

I can't reproduce "Docker executable not found" problem by double-click vscode icon.

image

Could you tell me how can I reproduce?


I noticed that vscode.workspace.rootPath will be undefined when we don't open any project but this is another problem so I'll create another issue

args = ["run", "--rm", "-i", "-v", `${vscode.workspace.rootPath}:${vscode.workspace.rootPath}`, image];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants