ruby-on-railsrubyrubygemsrubymine

How do I make external libraries (gems) show up inside Rubymine's project view?


I am looking to be able to Cmd+click into a method name and have it jump to the gem's source code like I can within my Rails app.

In the past I've used Rubymine and I remember it automatically loading the folders for all the gems, in the "project view" on the left side, at the bottom, titled "External Libraries." For some reason I am only getting what's in the picture below. I feel as if it may be some sort of RVM issue because it's only showing 2.0.0 when this project has a .ruby-version of 2.3.1.

enter image description here


Solution

  • Go to File -> Settings -> Languages & Frameworks -> Ruby SDK and Gems. Then select the correct version of Ruby your code is using (in this case, 2.3.1). This should make the "External Libraries" section on project window to load from the correct version of gem home. Restart Rubymine if necessary.