My Ruby Mine 6.0.3 gives the message:
Project .ruby-version Settings: Cannot switch SDK. RVM SDK '2.1.1@rails3' wasn't found.
I manage ruby environments with rvm.
The wanted environment seems to be ok:
rvm gemset list gemsets for ruby-2.1.1 (found in /home/agostino/.rvm/gems/ruby-2.1.1) (default) global rails3 => testproject
Not only this, but also Mine seems to access the rvm environments quite well since opening File, Settings i can see:
So why can't it switch to the correct environment?
If, in the form above, I select it manually, it seems to work fine. But the "cannot switch..." message still appears each time I open the project.
I found for a similar problem (Rubymine 6.3.1 and Ruby 2.1.1) that I had to format .ruby-version in the following way:
ruby-2.1.1
Note the prefix 'ruby-" to the version number. I'm not sure whether this is an RVM, Ruby, Rubymine, or some other issue that caused this problem, but the fix I mentioned worked on my Mac.
I am not sure if this is the case, but you might be telling rubymine to use a different ruby version, and it uses that version on all the commands, that's why it shows the errors on each interaction with ruby.
You need to change the running configuration, from the menu choose: Run > Edit configuration
Then you'll find few settings on the left, choose the one that you use to run your project, and on the right check for Ruby SDK
, choose the correct ruby version from the list, and click ok. Every thing should be fine, you might need to bundle because gems aren't shared between different ruby versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With