I've done this so many times, and I keep forgetting what exactly needs to be done. So I decided to write it down. Enjoy!
You have a few files to update:
.ruby-version
-- tells various systems (e.g. rvm) which ruby version to use automaticallyGemfile
-- update theruby
line toward the top of the file
Once that's done, you'll need to reinstall stuff. Start by installing the new ruby version in rvm:
$ rvm install "ruby-2.6.6"
Then you'll need to install the bundler for the new ruby version. Grab the bundler version from the Gemfile.lock
, search for BUNDLED WITH
. At the time of writing, that was 2.1.4. Then you install it:
$ gem install bundler:2.1.4
Once that's done, run bundler to install all your gems for the newly installed ruby version:
$ ruby -v
# should be the one you just installed, e.g. 2.6.6
# if not, reload your shell
$ bundle
Lastly, you'll want to quit and re-open RubyMine to let it work its magic with indexing the new ruby SDK and its gems. Your settings should now point to the new SDK:
And with that, you're done!