Viewing Gems in External Libraries

I'd like to view the source of my installed gems in the External Libraries tree.  Is this possible?  Here is my setup and what I'm seeing:

I'm running build RM-112.49 on Windows.
I pointed RubyMines to my Ruby 192 MRI installation that RubyInstaller installed.  In the Ruby SDK and Gems project setting page, the correct Ruby interpreter is selected (C:\Ruby192\bin\ruby.exe) and the correct list of installed gems is displayed.  Snap:


However, I don't understand what the Project pane under External Libraries is displaying.  Snap:

BTR - [CBTR] - ...test2.rb - JetBrains RubyMine (EAP) RM-112.49_2011-12-02_11-15-51.png
I can't find the gems in any subfolder.  Is Ruby192 unsupported?

Comment actions Permalink

Hello Luis,

currently gemset of an application is picked up from Gemfile or gem calls across your project. To make gems show up in external libraries you can simply create Gemfile with needed gems (you can find information about this in our help section)

Comment actions Permalink

Thank you, Dennis, creating a Gemfile did get RubyMine to display the gem sources in the External Libraries tree:

BTR - [CBTR] - ...Gemfile - JetBrains RubyMine (EAP) RM-112.49_2011-12-04_09-13-48.png
External Libraries after adding Gemfile:
BTR - [CBTR] - ...Gemfile - JetBrains RubyMine (EAP) RM-112.49_2011-12-04_09-13-07.png
However, this does not fully answer my question about RubyMine and gems.  From the gems support documentation you provided above:

If there is no bundler, RubyMine scans all the project files for the calls to Ruby gems, and produces a set of the required gems.

If for some reason you are not happy with the set of gems defined by RubyMine, you can create a Gemfile yourself and specify the gems of your choice.

(emphasis added).

This excerpt leaves me with two remaining questions:

  1. Does that article mean that RubyMine scans the project files for require calls, or gem calls?
  2. If the answer is require calls, do you have any insight as to why RubyMine has enough trouble with tracking require calls for JetBrains to resort to telling its users to create a Gemfile, even if no Gemfile is required by the project since the project does not use bundler?  Is this platform-dependent behavior?
Comment actions Permalink

RubyMine scans for gem calls. We have plans on understanding require calls though

Comment actions Permalink

Understood.  That fully answers all my questions, thank you Dennis.


Please sign in to leave a comment.