How to set a custom Gem path in RubyMine 2018.2

Answered

I have windows 10. I have been running RubyMine 2017.2 with a batch script that sets the GEM_HOME environment variable (along with others) and then runs the program. This had been working, RubyMine sees the path and I can see it listed as the installation and executable directories when I do Tools - Show Gem Environment.

I just upgraded to version 2018.2 and changed my batch script to point to the new version. I did not change anything else except the path to rubymine. But in the new version it does not see my GEM_HOME path, and the gem environment screen shows it pointing to the gem directory in my ruby installation.

I've tried adding a GEM_PATH variable and removing and re-adding the ruby SDK in settings. From the terminal I can output the GEM_HOME variable so the program does see the variables. If I switch my script back to the old version of rubymine it works correctly. Does this new version no longer use GEM_HOME to set the gem path? Thanks

3 comments
Comment actions Permalink

Did you try adding a remote sdk, you can select a local path.

Settings -> Languages & Frameworks -> Ruby SDK and Gems -> click on the little + sign

0
Comment actions Permalink

I've tried to create a remote server but it refuses to actually show the server configuration I create in the list on the remote interpreter box. But the problem isn't getting rubymine to see the SDK - my jruby is showing up correctly. The problem seems to be that it is looking in the jruby folder for the gem path and not in the directory I specified in the GEM_HOME environment variable. I've attached a screenshot that shows what the gem environment looks like between rubymine and the terminal.



0
Comment actions Permalink

Hello Tim,

the problem you've described appears to be similar to a known one, please take a look: https://youtrack.jetbrains.com/issue/RUBY-22237

0

Please sign in to leave a comment.