Code inspection and completion can't find common classes

Answered

I'm having trouble getting Rubymine to "see" common classes like optparse and anything else in stdlib-2.5.1.  It doesn't work for code inspection or code completion.  How do I configure the standard lib content in my Ruby (not Rails) project so it is seen by Rubymine?

 

6 comments
Comment actions Permalink

My SDK tab is pointing to the executable at <path>/ruby/2.5.0/bin/ruby but can't find content in <path>/ruby/2.5.0/lib/ruby/2.5.0/*

0
Comment actions Permalink

Hello Greg,

could you please specify your RubyMine version? Does it happen in 2018.3.3 as well (I didn't manage to reproduce it there)?

0
Comment actions Permalink

Hi Olga, I was on 2018.3.2 but just upgraded to 2018.3.3 and have the same issue.  Is there a way to specify certain directory trees to find this content?

0
Comment actions Permalink

Code Inspection and completion is still broken for me.  I did some digging and found that my Settings -> Project Structure -> Load Path was empty.  I added every permutation of path to the *.rb for the gem and it still can't find basic gems like minitest or optparse.  Minitest *does* show up when I use cntl-space for autocompletion... OptionParser or other optparse item does NOT show up for auto complete.

There is clearly something wrong with my load paths for code completion as well as inspection.  It's not clear how I should fix this when Load Path is not doing anything.  The program finds everything and runs correctly within Rubymine.

 

0
Comment actions Permalink

I am also having this issue on the newest version of rubymine. In my case I am using a wsl Ubuntu 16.0.4 installation, with ruby 2.5.0 installed via rbenv. I have seen others with this issue and never any clear answers. does anyone have any ideas?

0
Comment actions Permalink

Greg R, sorry for such a delay in response. Just to be sure, do you have the same issue in the last 2020.2 EAP or 2020.1.2 as well? We've improved code completion so it's worth checking. If it's still doesn't work then could you please check whether the same happens in new projects as well?

Callaway 25, could you please specify which RubyMine version you're using? How have you added the Ruby SDK (which path you were using for that)?

0

Please sign in to leave a comment.