Project .ruby-version Settings: Cannot switch SDK.
Mac OS X: 10.9.2
RubyMine 6.3
I just upgraded a project from Ruby 2.0 to Ruby 2.1.1. When I start RubyMine and load this project I get the error:
Project .ruby-version Settings: Cannot switch SDK. RVM SDK '2.1.1@trada-adwords-grader' wasn't found.
However, the Ruby SDK and Gems window shows under RVM: ruby-2.1.1 a gemset listed as "trada-adwords-grader (ruby-2.1.1)" and 'rvm gemset list' on the command line shows:
gemsets for ruby-2.1.1 (found in /Users/apickler/.rvm/gems/ruby-2.1.1)
(default)
dealer
global
rails_composer
ray-gun
=> trada-adwords-grader
I've tried restarting RubyMine, invalidating the caches and restarting, deleting the .idea/ folder and re-creating the project, and even restarting the machine. Nothing seems to eliminate this error. If I 'bundle install' in the Terminal, everything appears to install the appropriate gems in the right gemset. But if I go into Tools->Bundler->Install in Rubymine, I can see that it's installing the gems in the 2.1.1 'global' gemset:
/Users/apickler/.rvm/gems/ruby-2.1.1@global/bin/bundle install
What am I missing?
Please sign in to leave a comment.
Holy mackerel...it all came down to this:
The project's .ruby-version file previously had this:
2.1.1
RubyMine required it to be like this:
ruby-2.1.1
Once I made that change and restart RubyMine, everything was fine. I don't know if this is a quick of RubyMine, RVM, Ruby, or just my environment, but I was pretty sure before that only putting in the Ruby version number was the standard.