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

2

6

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

Bumptious answered 11/10, 2017 at 20:12 Comment(1)
Hmm, could down-voter please comment on why this is a bad question? I did quite a bit of searching first to make sure this was the appropriate stack exchange.Bumptious
P
8

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.

Pathe answered 11/10, 2017 at 20:18 Comment(1)
This worked perfectly Heng. Thanks so much. Will accept as soon as 5min threshold is up.Bumptious
I
0

If someone has a similar issue that is not fixed by the answer above, this is what happened with mine. With the Project tab expanded showing the project files, at the very top is "Project Files" with a dropdown triangle next to it. Click on the dropdown triangle and choose "Project" instead of "Project files". This will show the External Libraries at the bottom that had gone missing.

Ironbound answered 30/8, 2023 at 21:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.