-
Notifications
You must be signed in to change notification settings - Fork 286
Autocompletion doesn't work when require file #147
Comments
same problem here, /Users/XXXXXX/.rvm/gems/ruby-2.4.1/gems/rcodetools-0.8.5.0/lib/rcodetools/completion.rb:166:in from /Users/XXXXXX/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in eval' from /Users/XXXXXX/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in '
|
Yup, that is what I see as well Using
With fully qualified the path to the rbenv shim One of the other things I ran into getting to this other error point was surprise that the extensions didn't seem to respect the local I'm pretty new to Ruby for work, so trying a bunch of things to get to where I was with VSCode + Python... but a lot to learn yet in regards to trying to help fix this I think. |
#248 should resolve this issue. |
Closing for issue cleanup. Apologies if this is still an issue. We are working to improve the core extension experience. |
Environment
vscode-ruby
version: 0.12.1Expected behavior
My project has two file:
In
my_class.rb
, I wrote a simple bare bone MyClass for demo.In test.rb, I wrote
require_relative 'my_class'
, which can require MyClass.And I expected that then I'll use this class.
Actual behavior
Code autocompletion behave strange, having no autocompletion but I feel something fall into error.
Steps to reproduce the problem
I open DevTool so that I can see those:
'runtime_data_with_class': -:4:in
require_relative': cannot infer basepath (LoadError) (Rcodetools::ProcessParticularLine::NewCodeError)from -:4:in
<main>' from /Users/***/.rvm/gems/ruby-2.4.0/gems/rcodetools-0.8.5.0/lib/rcodetools/completion.rb:287:in
candidates_with_class'from /Users//.rvm/gems/ruby-2.4.0/gems/rcodetools-0.8.5.0/lib/rcodetools/completion.rb:295:in
candidates' from /Users/***/.rvm/gems/ruby-2.4.0/gems/rcodetools-0.8.5.0/lib/rcodetools/completion.rb:313:in
completion_code'from /Users//.rvm/gems/ruby-2.4.0/gems/rcodetools-0.8.5.0/lib/rcodetools/completion.rb:206:in
run' from /Users/***/.rvm/gems/ruby-2.4.0/gems/rcodetools-0.8.5.0/bin/rct-complete:45:in
<top (required)>'from /Users//.rvm/gems/ruby-2.4.0/bin/rct-complete:23:in
load' from /Users/***/.rvm/gems/ruby-2.4.0/bin/rct-complete:23:in
from /Users//.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in
eval' from /Users/***/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in
'The text was updated successfully, but these errors were encountered: