atom-racer
atom-racer copied to clipboard
racer.racerBinPath is not set, but it actually is!
Stack Trace
racer.racerBinPath is not set in your config.
At undefined
undefined
Commands
-3:56.4.0 snippets:expand (atom-text-editor.editor.is-focused.autocomplete-active)
-0:31.5.0 core:save (atom-text-editor.editor.is-focused)
-0:29.7.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
-0:29.7.0 snippets:expand (atom-text-editor.editor.is-focused)
-0:29.7.0 editor:indent (atom-text-editor.editor.is-focused)
-0:27.1.0 core:save (atom-text-editor.editor.is-focused)
-0:22.2.0 core:backspace (atom-text-editor.editor.is-focused.autocomplete-active)
Config
{
"core": {},
"editor": {
"invisibles": {}
}
}
Installed Packages
# User
language-cmake, v0.1.4
language-rust, v0.4.5
racer, v0.17.2
# Dev
No dev packages
I have these settings on linux with racer installed using the cargo install --git 'https://github.com/phildawes/racer.git'
method.
I also git clone
d the rust source as /usr/local/src/rust
although since I installed rust from the binary, I don't understand why I'd have to have the rust compiler source just to use the tool. Maybe I'm not interpreting that right, or maybe it's necessary for the type definitions? (Obviously I'm new to rust) I wish that were explained more fully. (Couldn't there be a just the definitions subset of it?)
And even after restarting Atom I still get these when I type:
:+1: for solving this . I am getting the same issue on ubuntu trusty with rustc binaries installed instead of compiling from source.
Update : i solved my problem by compiling racer from source and by correcting racer binary and rust source paths in the package settings. Thanks a lot this works now :100:
Had similar issues with an invalid path until I recognized a whitespace at the end of the line. Trimming the reference could perhaps prevent such mistake in the future. Moreover if the executable is not already in your PATH you have to add it yourself so atom can spawn an instance.
Yes, I resolved this by upgrading atom v 1.2.4, adding export RUST_SRC_PATH=".../src/rust/src"
to my .profile and logging out/in, and making sure that the racer bin path in atom was set to the full path of the racer binary and NO TILDE for home - that doesn't get expanded correctly for some reason.
Pain in the butt though. I had a very hard time figuring this out (because I'm stupid and/or because I'm new to linux and atom and rust and this dev ecosystem generally)
As of Atom 1.6.1 it still doesn't work, racer alone in the terminal works just fine. Ubuntu 15.04.
Don't set it to a path with ~/
, use /home/user/
instead. This fixed it for me.
@richarddewit I've set an absolute path - still doesn't work.
@vrcod mind sharing what it's actually set to?
@edubkendo as in absolute path? /home/username/.cargo/bin/racer
for racer executable and /usr/local/src/rust/src
for rust source dir.
I found that it only works on Windows if you give it the full path to the binary, not just to the bin folder containing racer.exe
. e.g. C:\Users\username\.cargo\bin\racer.exe
works, but C:\Users\username\.cargo\bin
does not.
The documentation (and the default path) seem to indicate that you only need to point it at the folder, which is either misleading or a bug on Windows.
@TomGillen I am happy to make that more clear if you have any suggestions. Current wording:
Full path (including executable) of Racer's binary (e.g. /Users/me/racer/bin/racer or c:\racer\bin\racer.exe)
I also noted something somewhat related to this now: If I don't set this setting at all, it refuses to try to use whatever I have in my path (and racer
is actually in the path in my case). I think it should default to that.
@edubkendo - do you want me to file a separate issue about that? I could even go ahead and try to fix it, but I don't know how to set up a proper "dev environment" for Atom or anything.
Just copy racer binary to folder that doesn't contain dots in it's path. It works for me. Sorry for my eng.
Hey @h3110w that doesn't work at all. I'm still getting errors I have the racer binary and rustfmt binary in a path that doesn't contain any dots.
This is perhaps related to the use of rustup not installing source code? Which in Arch Linux is fixed by installing source by entering the following in terminal rustup component add rust-src
and in Atom's racer settings Path to the Rust source code directory
as /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src
Not being able to locate the racer bin? In terminal cargo install racer
and in race settings Path to the Racer executable
as /home/username/.cargo/bin/racer
You'll also need to add the path to your src to fix non-zero exit code: 1 null
. Again in terminal export RUST_SRC_PATH=$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/
I am having this very same issue. I have set my rust source directory to /home/bryan/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src
which does contain the rust srcs. Please get this fixed!
I keep seeing references to the .exe which is windows only. Is this really not compatible with *nix?
I solved this issue by setting racerPath properly.
The path to Racer has to point to the Racer binary executable (this is NOT a directory we request here).
I had the same issue.
To save others time, i just sum up the steps to configure racer correctly on Ubuntu 16.04:
- Install everything, which is requested in the installation section of the racer documentation.
- Build the source of Rust according to the guide at github. (By default this will be installed at Linux Ubuntu in the directory
/home/user/rust
.) - Adjust settings of the Racer package in Atom
/home/user/.cargo/bin/racer
for racer executable/home/user/rust/src
for rust source code directory - restart Atom