Open 50Wliu opened 8 years ago
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)
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.
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.
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?
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> {
2) Yes 3) 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:]
Atom Version: 1.5.3 System: LMDE 2 Thrown From: Atom Core
racer.rustSrcPath is not set in your config.
At undefined
undefined
-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)
{
"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
}
}
# 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:
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.
racer is working properly with the following setup:
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
I can confirm that the issue is now resolved.
For me works too. Atom: 1.7.4 Rust: 1.8.0
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.
I managed to fix this issue today via https://github.com/edubkendo/atom-racer/issues/61#issuecomment-272695463
This is still happening on Windows 10. The autocomplete works but throws an error with every character typed. Quite unusable
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):
cd /usr/local
sudo chown -R <your-username>:<your-group-name> *
don't know your group name?: id -g
curl https://sh.rustup.rs -sSf | sh
// 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
.
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.
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).
From @vrcod on December 8, 2015 12:48
[Enter steps to reproduce below:]
Atom Version: 1.2.4 System: Ubuntu 15.04 Thrown From: Atom Core
Stack Trace
Atom racer is not properly configured.
Commands
Config
Installed Packages
Copied from original issue: atom/atom#9980