Rls: Could not start rls

Created on 18 Jul 2019  路  3Comments  路  Source: rust-lang/rls

After installation I'm getting this error in a Sublime alert:

Could not start rls
[Errno 2] No such file or directory: 'rustup'
Server will be disabled for this window

Rust/Rustup/Cargo is installed via stable and working in cli. Any ideas?

Sublime 3.2.1
rustup 1.18.3 (435397f48 2019-05-22)
rustc 1.36.0 (a53f9df32 2019-07-03)

Most helpful comment

Same here. Are you on macosx by chance as well?

If I check from sublime console command, it agrees rustup isnt in the path

>>> from subprocess import check_output
>>> check_output(['rustup', '--version'])
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "./python3.3/subprocess.py", line 576, in check_output
  File "./python3.3/subprocess.py", line 819, in __init__
  File "./python3.3/subprocess.py", line 1448, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: 'rustup'

I found an old issue with path late loading on macosx that might be related https://github.com/tomv564/LSP/issues/147

I recall rust fmt had an 'executable' argument you could hardcode a path for.. Seems to be something similar here called "command"

Jacobs-MacBook-Air:backend jacobrosenthal$ which rls
/Users/jacobrosenthal/.cargo/bin/rls

Preferences->Package Settings-LSP
And edit or replace like:

{
    "clients":
    {
        "rls":
        {
            "command":
            [
                "/Users/jacobrosenthal/.cargo/bin/rls"
            ],
            "enabled": true
        }
    },
}

and it seems to work for now...

All 3 comments

Same here. Are you on macosx by chance as well?

If I check from sublime console command, it agrees rustup isnt in the path

>>> from subprocess import check_output
>>> check_output(['rustup', '--version'])
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "./python3.3/subprocess.py", line 576, in check_output
  File "./python3.3/subprocess.py", line 819, in __init__
  File "./python3.3/subprocess.py", line 1448, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: 'rustup'

I found an old issue with path late loading on macosx that might be related https://github.com/tomv564/LSP/issues/147

I recall rust fmt had an 'executable' argument you could hardcode a path for.. Seems to be something similar here called "command"

Jacobs-MacBook-Air:backend jacobrosenthal$ which rls
/Users/jacobrosenthal/.cargo/bin/rls

Preferences->Package Settings-LSP
And edit or replace like:

{
    "clients":
    {
        "rls":
        {
            "command":
            [
                "/Users/jacobrosenthal/.cargo/bin/rls"
            ],
            "enabled": true
        }
    },
}

and it seems to work for now...

Thanks! That makes it work for me too :)

Its not ideal, i think it is an issue that should be open, but I cant speak for library authors.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

parkovski picture parkovski  路  3Comments

jaccarmac picture jaccarmac  路  3Comments

jamesmahler picture jamesmahler  路  5Comments

k-bx picture k-bx  路  5Comments

PumpkinSeed picture PumpkinSeed  路  3Comments