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

racer.racerBinPath is not set, but it actually is! #61

Open
NobbZ opened this issue Nov 2, 2015 · 19 comments
Open

racer.racerBinPath is not set, but it actually is! #61

NobbZ opened this issue Nov 2, 2015 · 19 comments

Comments

@NobbZ
Copy link

NobbZ commented Nov 2, 2015

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

racer-atom-binpathnotset

@ghost
Copy link

ghost commented Nov 10, 2015

I have these settings on linux with racer installed using the cargo install --git 'https://github.com/phildawes/racer.git' method.

I also git cloned 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?)

image

And even after restarting Atom I still get these when I type:

image

@shahid-pk
Copy link

👍 for solving this . I am getting the same issue on ubuntu trusty with rustc binaries installed instead of compiling from source.

@shahid-pk
Copy link

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 💯

@autarc
Copy link

autarc commented Nov 24, 2015

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.

@ghost
Copy link

ghost commented Nov 26, 2015

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)

@victrcodes
Copy link

As of Atom 1.6.1 it still doesn't work, racer alone in the terminal works just fine. Ubuntu 15.04.

@richarddewit
Copy link

Don't set it to a path with ~/, use /home/user/ instead. This fixed it for me.

@victrcodes
Copy link

@richarddewit I've set an absolute path - still doesn't work.

@edubkendo
Copy link
Owner

@VRcOd mind sharing what it's actually set to?

@victrcodes
Copy link

@edubkendo as in absolute path? /home/username/.cargo/bin/racer for racer executable and /usr/local/src/rust/src for rust source dir.

@TomGillen
Copy link

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.

@edubkendo
Copy link
Owner

@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)

@perlun
Copy link

perlun commented Jun 23, 2016

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.

@Maru1337
Copy link

Maru1337 commented Aug 4, 2016

Just copy racer binary to folder that doesn't contain dots in it's path. It works for me. Sorry for my eng.

@jkbellew
Copy link

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.

@bunnybooboo
Copy link

bunnybooboo commented Jan 15, 2017

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/

@bryaan
Copy link

bryaan commented Jan 24, 2017

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?

@alscientist
Copy link

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).

@tocto
Copy link

tocto commented Feb 26, 2017

I had the same issue.

To save others time, i just sum up the steps to configure racer correctly on Ubuntu 16.04:

  1. Install everything, which is requested in the installation section of the racer documentation.
  2. 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.)
  3. 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
  4. restart Atom

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