Test tools (RSpec, cucumber) can't find gems

Completed

After recently upgrading my project to Ruby 2.3.3 (using RVM), RSpec and Cucumber can't find their respective gems, even though the SDK appears to be set up correctly and the gems are listed in Preferences.  RSpec and Cucumber both work fine from terminal.

From Preferences:

 

But in Run/Debug Configurations, it can't see the gems:

One help topic suggested deleting the SDK entry and letting RubyMine re-add it, but as can be seen in the first screenshot the `-` button is greyed out.

From Tools > Show Gem Environment:

RUBYGEMS VERSION: 2.6.8
RUBY VERSION: 2.3.3 (2016-11-21 patchlevel 222) [x86_64-darwin16]
INSTALLATION DIRECTORY: /Users/erichopkins/.rvm/gems/ruby-2.3.3
USER INSTALLATION DIRECTORY: /Users/erichopkins/.gem/ruby/2.3.0
RUBY EXECUTABLE: /Users/erichopkins/.rvm/rubies/ruby-2.3.3/bin/ruby
EXECUTABLE DIRECTORY: /Users/erichopkins/.rvm/gems/ruby-2.3.3/bin
SPEC CACHE DIRECTORY: /Users/erichopkins/.gem/specs
SYSTEM CONFIGURATION DIRECTORY: /Users/erichopkins/.rvm/rubies/ruby-2.3.3/etc
RUBYGEMS PLATFORMS:
ruby
x86_64-darwin-16
GEM PATHS:
/Users/erichopkins/.rvm/gems/ruby-2.3.3
/Users/erichopkins/.rvm/gems/ruby-2.3.3@global
GEM CONFIGURATION:
:update_sources => true
:verbose => true
:backtrace => false
:bulk_threshold => 1000
REMOTE SOURCES:
https://rubygems.org/
SHELL PATH:
/Users/erichopkins/.rvm/rubies/ruby-2.3.3/bin
/Users/erichopkins/.rvm/gems/ruby-2.3.3/bin
/Users/erichopkins/.rvm/gems/ruby-2.3.3@global/bin
/Users/erichopkins/.rvm/bin
/Users/erichopkins/.rvm/gems/ruby-2.3.3/bin
/Users/erichopkins/.rvm/gems/ruby-2.3.3@global/bin
/Users/erichopkins/.rvm/rubies/ruby-2.3.3/bin
/usr/local/sbin
/usr/local/bin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/Users/erichopkins/.rvm/bin
/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: ruby-2.3.3-p222
Sdk Version: ver.2.3.3p222 ( revision 56859) p222
Ruby Interpreter: /Users/erichopkins/.rvm/rubies/ruby-2.3.3/bin/ruby
RVM Sdk: yes, gemset:[default]
RVM Home: /Users/erichopkins/.rvm
Sdk Language Level: 2.3
Sdk Load Path:
~/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0
~/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/x86_64-darwin16
~/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby
~/.rvm/rubies/ruby-2.3.3/lib/ruby/vendor_ruby/2.3.0
~/.rvm/rubies/ruby-2.3.3/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin16
~/.rvm/rubies/ruby-2.3.3/lib/ruby/vendor_ruby
~/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0
~/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/x86_64-darwin16
/Applications/RubyMine.app/Contents/rubystubs23
Sdk Gem paths:
~/.rvm/gems/ruby-2.3.3/bundler/gems
~/.rvm/gems/ruby-2.3.3/gems
~/.rvm/gems/ruby-2.3.3@global/gems
Gems used for 'talentnest':
kaminari (1.0.0.alpha)
~/.rvm/gems/ruby-2.3.3/bundler/gems/kaminari-d5248965b00e
cucumber-nc (0.0.2)
~/.rvm/gems/ruby-2.3.3/bundler/gems/cucumber-nc-d5d3e113446e
hamlbars (2.1.1)
~/.rvm/gems/ruby-2.3.3/bundler/gems/hamlbars-f071d5845732
userstamp (2.0.2)
~/.rvm/gems/ruby-2.3.3/bundler/gems/userstamp-f5605e16f09f
fabrika (0.0.1.pre)
~/.rvm/gems/ruby-2.3.3/bundler/gems/fabrika-3ecfae9756c9
fakefs (0.8.0)
~/.rvm/gems/ruby-2.3.3/bundler/gems/fakefs-10dd9346874a
prototype-rails (3.2.5)
~/.rvm/gems/ruby-2.3.3/bundler/gems/prototype-rails-4db4a6b06664
chosen-rails (1.1.0)
~/.rvm/gems/ruby-2.3.3/bundler/gems/chosen-rails-53bb9a93e045
calendar_date_select (1.17)
~/.rvm/gems/ruby-2.3.3/bundler/gems/calendar_date_select-5d55b7853b42
wisper-activerecord (0.3.0)
~/.rvm/gems/ruby-2.3.3/bundler/gems/wisper-activerecord-de11885b2482
csv_shaper (1.1.1)
~/.rvm/gems/ruby-2.3.3/bundler/gems/csv_shaper-2c652246a875
shared-mime-info (0.2.1)
~/.rvm/gems/ruby-2.3.3/bundler/gems/shared-mime-info-baf7913f9b5f
broadbean (2.0.0)
~/.rvm/gems/ruby-2.3.3/bundler/gems/broadbean-14bf50901b9e
tinymce-rails-langs (4.20160310)
~/.rvm/gems/ruby-2.3.3/bundler/gems/tinymce-rails-langs-292651496eeb
geokit (1.6.6)
~/.rvm/gems/ruby-2.3.3/bundler/gems/geokit-6c86c6b644e3
custom_err_msg (1.1.1)
~/.rvm/gems/ruby-2.3.3/bundler/gems/custom_err_msg-cef6a4b30737
haml (4.1.0.beta.1)
~/.rvm/gems/ruby-2.3.3/bundler/gems/haml-9967454b6eb9
validates_existence (0.8.0)
~/.rvm/gems/ruby-2.3.3/bundler/gems/validates_existence-73bc156d06bc
mail (2.5.5.pre)
~/.rvm/gems/ruby-2.3.3/bundler/gems/mail-cf447f01f82e
machinist (2.0)
~/.rvm/gems/ruby-2.3.3/bundler/gems/machinist-9d6e0cedabf8
grape (0.17.1)
~/.rvm/gems/ruby-2.3.3/bundler/gems/grape-5683154c28f6
wisper (2.0.0.rc1)
~/.rvm/gems/ruby-2.3.3/bundler/gems/wisper-2500385f896c

And `gem environment` run from terminal:

RubyGems Environment:
- RUBYGEMS VERSION: 2.6.8
- RUBY VERSION: 2.3.3 (2016-11-21 patchlevel 222) [x86_64-darwin16]
- INSTALLATION DIRECTORY: /Users/erichopkins/.rvm/gems/ruby-2.3.3
- USER INSTALLATION DIRECTORY: /Users/erichopkins/.gem/ruby/2.3.0
- RUBY EXECUTABLE: /Users/erichopkins/.rvm/rubies/ruby-2.3.3/bin/ruby
- EXECUTABLE DIRECTORY: /Users/erichopkins/.rvm/gems/ruby-2.3.3/bin
- SPEC CACHE DIRECTORY: /Users/erichopkins/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Users/erichopkins/.rvm/rubies/ruby-2.3.3/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-16
- GEM PATHS:
- /Users/erichopkins/.rvm/gems/ruby-2.3.3
- /Users/erichopkins/.rvm/gems/ruby-2.3.3@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/erichopkins/.rvm/gems/ruby-2.3.3/bin
- /Users/erichopkins/.rvm/gems/ruby-2.3.3@global/bin
- /Users/erichopkins/.rvm/rubies/ruby-2.3.3/bin
- /Users/erichopkins/.rvm/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin

 Any tips would be appreciated!

3 comments

Hello,

sorry for the delay. According to the screenshots different Ruby SDKs are used (on the 1st one there is ruby-2.3.3-p222, on the 2nd - rvm with 2.3.3), what setup do you have at the moment? What RubyMine version do you use?

0

Hello Olga. Actually in the interim I did a full uninstall and re-install of RubyMine and that made it start to work again.  I'm now set up with RubyMine version 2016.3

0

Thank you for the update, good to hear it's fine now.

0

Please sign in to leave a comment.