Your environment
vscode-ruby version:
Ruby version: ruby 2.3.1
VS Code version: 1.9
Operating System: Ubuntu 16.04
Expected behavior
Hitting Ctrl+Space after `[1,2,3].e should bring up Intellisense
Actual behavior
Nothing happens, just the basic word suggestion appears.
Steps to reproduce the problem
`[1,2,3].e should bring up Intellisense, but only brings up standard auto complete
I'm having this issue as well.
Same on OSX.
Linters work fine, just missing autocomplete.
I have rcodetools installed.
VScode 1.9.1 (f9d0c687ff2ea7aabd85fb9a43129117c0ecf519)
Ruby Ext: 0.10.4
Ruby 2.4.0
rcodetools is somewhat iffy. Install methods can be an issue too. Have you installed it with bundler? Are you using a ruby version manager?
You can add the (fully qualified) command path if you're having problems: "ruby.rctComplete.commandPath": "/path/to/rct-complete" in your VS Code settings Cmd + ,
How do I find where my rctComplete in installed?
@sepehr500 which rctComplete
@HookyQR I use RVM, ruby 2.4.0 is my --default ruby and definitely has rcodetools installed
I installed it using the Integrated Terminal
"ruby.rctComplete.commandPath": "/Users/robaldred/.rvm/gems/ruby-2.4.0/bin/rct-complete"
Not seeing any errors or logging, is there any other manual way I can check or help debug?
@raldred I found that rct-complete asked me for a ruby interpreter I didn't have (/usr/local/bin/ruby18). I just created a symbolic link between my interpreter and the one that rct-complete asked me for:
sudo ln -s /usr/bin/ruby /usr/local/bin/ruby18
I think it would be better to have the interpreter for ruby18, im just linking my ruby2.3, but my intellisense is working now. By the way, I can't tell if it is fully working or not.
edit: It seems that you can tell rct-complete to use another interpreter just by telling it with -S your_interpreter flag.
i have the same issue. sometimes it works kinda outside of functions but as soon as the file contains code that is project related (so non standard lib constants) i have a uninitialized constant error. do i need to configure the workspace or something?
Still doesn't work.
I have moved to using solargraph
https://github.com/castwide/vscode-solargraph
+1

This is what happens for me.
+1, intellisense didn't show up for string methods.
Steps to reproduce: create variable with any string value. Try to type somevar., whereas after typing dot the intellisense should be invoked.
https://github.com/rubyide/vscode-ruby/pull/248 should resolve this issue. It adds the Solargraph extension that @raldred mentioned as a dependency.
Can someone guide please how to make this work if I am working on vscode installed on windows and my ruby is installed on WSL (Bash on Windows) ?
I think the problem is that extention is trying to run all commands in the context of the Windows OS and not the Linux, but ruby is not installed on windows.
I tried to workaround this with adding a folder to windows PATH and add .bat file per gem I have (including ruby, rct-complete and solargraph) and the content of the bat file was this:
@echo off
bash -c '~/.rbenv/shims/solargraph %*'
but unfortunately it didn't work.
+1
I commented on the WSL issue here: https://github.com/rubyide/vscode-ruby/issues/100
The only solution I can suggest you for now is to install Xming which enables you to run UI applications on WSL. Then you can install vscode on your Ubuntu on Windows and run it (use this thread for instructions)
For this to succeed, you will have to update Windows 10 to 17063 build which is not official yet so you will have to enable Windows insider program and update
I chose not to perform this update through Windows insider program and wait for the next official Windows 10 update which should include this build (Per microsoft it should come in April)
Closing for issue cleanup. Apologies if this is still an issue. We are working to improve the core extension experience.
Most helpful comment
I have moved to using solargraph
https://github.com/castwide/vscode-solargraph