Will RubyMine find gems installed in a project subdirectory?

I'm working on a ruby on rails project where gems are installed to a subdirectory within the project that isn't 'vendor'.

However, while the rails app runs, and uses the gems without problem, the RubyMine Gem Manager only sees the gems in the vendor/ directory, not in the other directories with gems, even while the environment variables are set up to point to the new directories. IE.


'gem list' lists all the gems fine, and the output of 'gem env' is below:

RubyGems Environment:
  - RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/slinky/slinky/gem_repositories/local
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /home/slinky/slinky/gem_repositories/local/bin
    - ruby
    - x86_64-linux
     - /home/slinky/slinky/gem_repositories/local
     - /home/slinky/slinky/gem_repositories/ruby
But the RubyMine just doesn't seem to recognize the gems as being installed and available. Eg, cucumber 0.3.9 is installed and running through rake tasks, but ctrl-shift-f10 gives a message saying it still needs to be installed. The Gem Manager only lists the gems in 'vendor' as being installed.

Is this a bug/limitation in RubyMine?


1 comment
Comment actions Permalink

Hello Jonathon,

And do you use "Attach Gems.." button in RubyMine's gem manager? RubyMine parses files/actives support for some technologies(rspec/cucumber/..) only if corresponding gems are attached to project. Attach Gem dialog will show list of installed gems (same as 'gem list') where you can choose all necessary gems which you are using in project. For fast navigation just type first letters of gem name and RubyMine will scroll through list of gems also it's possible to select several gems.

Picture 10.png
RubyMine also tries to automatically attach frozen gems or edge rails (if the are in project), also gems specified in environment.rb. "Attach Gems.." dialog will not install gems from internet, just will say RubyMine to use selected gems. If you want install some gem you should use "Install Gems.." dialog


Please sign in to leave a comment.