Open byteshiva opened 4 years ago
This is somethong to with /bin/sh
and the rustup can't be found in the $PATH
.
Command failed: rustup toolchain list /bin/sh: rustup: command not found
I got the same problem on macOS. I checked which rustup
using $ sh
, $ bash
and $ zsh
. Rustup is always found under /Users/user/.cargo/bin/rustup
. So it does not seem to be a $PATH
problem. rls
is also found /Users/user/.cargo/bin/rls
.
UPDATE:
I solved this problem by explicitly setting "rust-client.rustupPath": "/Users/user/.cargo/bin/rustup"
.
Thanks to @eratio08 's comment, I also fixed this issue by going to ~/Library/Application Support/Code/User/settings.json
and explicitly adding "rust-client.rlsPath": "/Users/NathanielRuiz/.cargo/bin/rls"
.
(You can also do this in Ctrl + Shift + P
-> Preferences: Open User Settings
)
I also had to add the ~/.cargo/bin
to my path, in addition to specifying the rust-client.rlsPath
in the config, with rust v1.59
I'm using rust 1.39.0 and installed it using rust version manager.
Now in vscode, I see the below error. Do I need to specific the rust path since the rust compiler or binary localtion would be different when installed using rust version manager.
Error
Couldn't start client Rust Language Server