atom-racer icon indicating copy to clipboard operation
atom-racer copied to clipboard

Atom racer is not properly configured.

Open 50Wliu opened this issue 8 years ago • 14 comments

From @vrcod on December 8, 2015 12:48

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.2.4 System: Ubuntu 15.04 Thrown From: Atom Core

Stack Trace

Atom racer is not properly configured.

At undefined

undefined

Commands

     -7:21.9.0 application:add-project-folder (atom-text-editor.editor.is-focused)
  3x -6:50.9.0 core:move-down (atom-text-editor.editor.is-focused)
     -6:49.9.0 core:move-up (atom-text-editor.editor.is-focused)
  3x -6:49.1.0 core:move-down (atom-text-editor.editor.is-focused)
     -6:46.1.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
  2x -6:45.5.0 editor:newline (atom-text-editor.editor.is-focused)
     -6:45.1.0 core:move-up (atom-text-editor.editor.is-focused)
     -6:44.8.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -6:44.8.0 snippets:expand (atom-text-editor.editor.is-focused)
     -6:44.8.0 editor:indent (atom-text-editor.editor.is-focused)
     -4:43.3.0 core:paste (atom-text-editor#racer.racerBinPath.editor.mini.is-focused)
 12x -1:31.3.0 core:backspace (atom-text-editor#racer.racerBinPath.editor.mini.is-focused)

Config

{}

Installed Packages

# User
language-rust, v0.4.5
linter-rust, v0.2.11
racer, v0.17.2

# Dev
No dev packages

Copied from original issue: atom/atom#9980

50Wliu avatar Dec 08 '15 15:12 50Wliu

I'm getting the same errors whenever the racer package tries to call racer. (racer.racerBinPath not set, racer.rustSrcPath not set, racer is not properly configured)

jplatte avatar Feb 21 '16 19:02 jplatte

Seems the problem were the default paths for the rust source and racer. (/usr/bin/racer instead of /usr/local/bin/racer and /usr/src/rust/src instead of /usr/local/src/rust/src)

So it's pretty much just an error message that could be more descriptive, and somewhat weird default paths.

jplatte avatar Feb 21 '16 19:02 jplatte

I am receiving this error and I do have options properly configured. I have a custom path for racer which is set, yet this still shows.

justinnoah avatar Feb 27 '16 18:02 justinnoah

Is racer actually configured properly (e.g. does path/to/racer complete std::io::B show completions or error) on your system? Also, does the racer path in the options point to the executable, not the directory it's in, and does the rust source path actually point to a directory with the rust sources in it?

jplatte avatar Feb 27 '16 19:02 jplatte

  1. Yes
$ racer complete std::io::B
MATCH BufReader,47,11,/home/chaos/repos/rustc-1.6.0/src/libstd/io/buffered.rs,Struct,pub struct BufReader<R> {
MATCH BufWriter,299,11,/home/chaos/repos/rustc-1.6.0/src/libstd/io/buffered.rs,Struct,pub struct BufWriter<W: Write> {
MATCH BufRead,1267,10,/home/chaos/repos/rustc-1.6.0/src/libstd/io/mod.rs,Trait,pub trait BufRead: Read {
MATCH Broadcast,1497,11,/home/chaos/repos/rustc-1.6.0/src/libstd/io/mod.rs,Struct,pub struct Broadcast<T, U> {
MATCH Bytes,1640,11,/home/chaos/repos/rustc-1.6.0/src/libstd/io/mod.rs,Struct,pub struct Bytes<R> {
  1. Yes
  2. Yes

The following is the Bug Report atom wants me to file:

Issue: racer.rustSrcPath is not set in your config.

Body: [Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.5.3 System: LMDE 2 Thrown From: Atom Core

Stack Trace

racer.rustSrcPath is not set in your config.

At undefined

undefined

Commands

     -6:01.9.0 vim-mode:reset-normal-mode (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -6:01.3.0 vim-mode:delete (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -6:01.2.0 vim-mode:move-to-end-of-word (atom-text-editor.editor.vim-mode.is-focused.operator-pending-mode)
     -6:00.6.0 vim-mode:activate-insert-mode (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -5:59.6.0 vim-mode:activate-normal-mode (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
     -5:59.1.0 ex-mode:open (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -5:59.1.0 blur (atom-text-editor.editor.vim-mode.is-focused.normal-mode)
     -5:58.8.0 core:confirm (atom-text-editor.editor.mini.is-focused)
 10x -5:58.7.0 blur (atom-text-editor.editor.mini.is-focused)
     -0:39.9.0 vim-mode:move-down (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -0:39.2.0 vim-mode:move-up (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -0:38.9.0 vim-mode:insert-after-end-of-line (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -0:37.8.0 core:backspace (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
 11x -0:36.5.0 blur (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
  3x -0:05.7.0 core:backspace (atom-text-editor.editor.vim-mode.insert-mode.is-focused)
     -0:00.5.0 blur (atom-text-editor.editor.vim-mode.insert-mode.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "language-gfm",
      "language-gfm",
      "language-gfm",
      "language-gfm",
      "language-gfm",
      "language-gfm",
      "language-gfm"
    ],
    "themes": [
      "atom-material-ui",
      "atom-material-syntax"
    ]
  },
  "editor": {
    "fontSize": 16,
    "invisibles": {},
    "showIndentGuide": true
  }
}

Installed Packages

# User
atom-material-syntax, v0.4.3
atom-material-ui, v1.1.3
autocomplete-python, v1.6.1
build-cargo, v0.12.0
ex-mode, v0.8.0
language-idris, v0.4.1
language-latex, v0.6.1
language-markdown, v0.11.0
language-monte, v0.1.1
language-rust, v0.4.6
linter, v1.11.3
linter-csslint, v1.3.1
linter-flake8, v1.11.0
linter-jshint, v2.0.2
linter-markdown, v1.5.0
linter-python-pep257, v0.0.1
linter-rust, v0.4.0
markdown-preview-plus, v2.2.2
minimap, v4.19.0
minimap-git-diff, v4.1.8
racer, v0.18.0
rust-api-docs-helper, v0.5.1
vim-mode, v0.64.0
vim-mode-visual-block, v0.2.15

# Dev
No dev packages

And Atom racer settings: 2016-02-27-111135_794x634_scrot

justinnoah avatar Feb 27 '16 19:02 justinnoah

Oh okay, you only get that one error? Well, I just did the basic troubleshooting of things I went through by myself, seems like this might actually be a bug which the creator (@edubkendo) should have a look at.

jplatte avatar Feb 27 '16 19:02 jplatte

racer is working properly with the following setup: screenshot from 2016-05-19 18-31-41 Note that you need to specify the absolute path to the user's directory, rather than using the tilde if you're on linux, and that directories need to end in a forward slash

BrianErikson avatar May 19 '16 16:05 BrianErikson

I can confirm that the issue is now resolved.

victrcodes avatar May 19 '16 17:05 victrcodes

For me works too. Atom: 1.7.4 Rust: 1.8.0

r4start avatar May 27 '16 17:05 r4start

I had this problem and solved it by removing trailing whitespace in my path. I would suggest either trimming the contents of the path or at least providing a properly descriptive error message.

cramertj avatar Jun 06 '16 08:06 cramertj

I managed to fix this issue today via https://github.com/edubkendo/atom-racer/issues/61#issuecomment-272695463

bunnybooboo avatar Jan 15 '17 13:01 bunnybooboo

This is still happening on Windows 10. The autocomplete works but throws an error with every character typed. Quite unusable

Nokel81 avatar May 19 '17 14:05 Nokel81

If you are having problems with permission issues with rust in general (some things will still work, but you get other errors outside of racer):

Step 1) Fix permissions:

cd /usr/local
sudo chown -R <your-username>:<your-group-name> *

don't know your group name?: id -g

Step2) Reinstall rust (it didn't properly get added to /usr/local:

curl https://sh.rustup.rs -sSf | sh

Step3) Reinstall cargo package racer:

// if already installed:
cargo uninstall racer
// then install:
cargo install racer

. NOW configure it in atom: Path to racer config: /Users/{username}/.cargo/bin/racer .

Step4) Get rust source code:

rustup component add rust-src and the path will be: /Users/{username}/.multirust/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src

The stable-x86_64-apple-darwin probably will look a bit different than yours. So check your path first.

CraigglesO avatar May 20 '17 20:05 CraigglesO

I had this issue too, in my case I installed the racer package with atom package manager. Thing is, the package is installed as racer-v2, so when I set the path to the racer executable and rust sources, it kept throwing me this error because in file config.cson, those parameters where under "racer-v2" package section. I changed it to "racer" and it worked (config made within Atom's UI was erased).

rcastill avatar May 22 '17 00:05 rcastill