RVM Support in RubyMine 2.0.2

Many of you asked for RubyMine to support the latest RVM (Ruby Version Manager) gem and especially RVM gemset workflow. Doing this would have delayed RubyMine 2.0.2 but we still decided to add an initial support for RVM’s nice features. Now RubyMine 2.0.2 RC3 is available and you are welcome to try our hot RVM support!

I don’t like long tutorials and walkthroughs, so I’ve prepared a brief cookbook for you:

  1. QWhich RVM version is supported?
    A: rvm >= 0.1.25
  2. Q: How to configure RVM in RubyMine?
    A: No configuration is needed. Install rvm gem, rvm ruby interpreters, create rvm gemsets using system console and restart RubyMine if it was running. On each startup RubyMine scans your ~/.rvm folder and automatically configures skds for each ruby interpreter and gemset pair.

    P.S.: If you’ve already configured several RVM sdks manually in RubyMine please remove them and let RubyMine reconfigure sdks on next start-up.
  3. QI’ve just created a new gemset or installed new Ruby interpreter using RVM. How to enable it in RubyMine settings?
    A: RubyMine detects new RVM SDKs and gemsets on the fly. Just open ‘Ruby SDK and Gems‘ panel in Settings and your new Ruby SDK will be there. If Settings dialog has been already opened – just reopen it.
  4. Q: I have an RVM gemset. By default it uses “local” and “global” gem paths. Does RubyMine allow to ignore “global” gem path?
    A: Yes, sure. Just select “Ignore global gempath” checkbox on Ruby SDK and Gems panel in RubyMine Settings
  5. Q: How do I switch my project to a different gemset or RVM SDK?
    A: As usual – select corresponding SDK in Ruby SDK and Gems settings, then press “Apply” button.
  6. Q: How can I install gems for a particular gemset?
    A: Also using RubyMine Gems Manager (Ruby SDK and Gems panel). To install gems in shared (“global”) gemset choose corresponding SDK.
  7. Q: My project uses project .rvmrc file will RubyMine understand it?
    A: On a project opening RubyMine reads .rvmrc file and sets project SDK to the one specified in .rvmrc. If “rvm use” command is commented RubyMine won’t change settings.
  8. Q: How do I run a script on a specific RVM gemset / Ruby interpreter?
    A: Instead of switching project SDK you can just select another SDK in run configurations settings. You can always save such customized run configurations and reuse them later.

This is the initial implementation of RVM support in RubyMine. We are planning to enhance in future versions. So, we’re looking forward to your feedback.

Develop with pleasure,
-JetBrains RubyMine Team

This entry was posted in Feature, WhatsMining and tagged . Bookmark the permalink.

5 Responses to RVM Support in RubyMine 2.0.2

  1. This feature is very welcome. I’m glad you included it in 2.0.2.

    What should I do with my currently configured RVM SDKs?

  2. Roman Chernyatchik says:

    Hello J. Pablo,
    RubyMine understands rvm >= 0.1.25. If you have older rvm gem please update it and check that RVM converted “%” gemset separators to “@”. On startup RubyMine will sync sdks settings with content of ~/.rvm folder. If you have several manually configured RVM sdks (in RubyMine) you needn’t do anything with them.

  3. Alex says:

    Any chances to support Pik on Windows?

  4. Roman Chernyatchik says:

    Alex, please submit an issue at http://youtrack.jetbrains.net/issues/RUBY

  5. Roman Chernyatchik says:

    Hi guys,
    If you’ve manually configured rvm SDKs in RubyMine please remove them (Ruby SDK and Gems panel) and let RubyMine to configure sdks on next start-up.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">