Get RubyMine to find existing Gems

Hello

I am very new to Ruby and I am evaluating Ruby Mine

I have one annoying issue, when I run tests using guard in a terminal session everything is fine, once I have done bundle

So as far as I am concerned, all of my required GEMS are installed and ready to go

So howcome I get messages from Ruby Mine saying Gem not found?

The IDE never seems to install the missing gems in bulk

I can only install them one by one

I am using Ruby 2.3.1 but notice the path below

.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0

Is that ok?

My environment info is below

RUBYGEMS VERSION: 2.5.1
RUBY VERSION: 2.3.1 (2016-04-26 patchlevel 112) [x86_64-darwin16]
INSTALLATION DIRECTORY: /Users/paul.saxton/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0
USER INSTALLATION DIRECTORY: /Users/paul.saxton/.gem/ruby/2.3.0
RUBY EXECUTABLE: /Users/paul.saxton/.rbenv/versions/2.3.1/bin/ruby
EXECUTABLE DIRECTORY: /Users/paul.saxton/.rbenv/versions/2.3.1/bin
SPEC CACHE DIRECTORY: /Users/paul.saxton/.gem/specs
SYSTEM CONFIGURATION DIRECTORY: /Users/paul.saxton/.rbenv/versions/2.3.1/etc
RUBYGEMS PLATFORMS:
ruby
x86_64-darwin-16
GEM PATHS:
/Users/paul.saxton/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0
/Users/paul.saxton/.gem/ruby/2.3.0
GEM CONFIGURATION:
:update_sources => true
:verbose => true
:backtrace => false
:bulk_threshold => 1000
REMOTE SOURCES:
https://rubygems.org/
SHELL PATH:
/Users/paul.saxton/.rbenv/versions/2.3.1/bin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
----------------------
IDE: RubyMine 2016.3, build #RM-163.7743.60
OS: Mac OS X 10.12.1[x86_64]
Java: 1.8.0_112-release-408-b2
RubyMine SDK Environment:
Sdk: rbenv: 2.3.1
Sdk Version: ver.2.3.1p112 ( revision 54768) p112
Ruby Interpreter: /Users/paul.saxton/.rbenv/versions/2.3.1/bin/ruby
RVM Sdk: no
RVM Home: [n/a]

How do I tell Ruby Mine to use the same folder for my gems as terminal is using?

Paul



 

1
2 comments

I'm having the same issue. I posted about the embedded terminal not being in sync with my actual terminal, but I think the root of my problem is what you're describing - RubyMine isn't looking in the right spot for gems. 

Seems to be an issue with RubyMine 2016.3. Everything was fine until I upgraded.

I don't know what the solution might be, but I hope as more people come forward, it gets addressed.

In the mean time, for your evaluation purposes, maybe see if you can trial a previous version.

0

@Paul,

could you please specify whether all necessary gems are listed in your Gemfile and whether you did run Tools | Bundle | Install. 

0

Please sign in to leave a comment.