RubyMine2018.2 Warning: PATH set to RVM ruby but GEM_HOME and/or GEM_PATH not set

Answered

Each time I run a server, a spec, a custom run configuration, or when IDE runs bundle installs, indexes rake tasks, etc. I get this error. All things seem to work fine though it's very annoying as it clogs the output of commands and RubyMine events log.

Here's an example:

bash -c "/Users/[user]/.rvm/bin/rvm ruby-2.3.1 do /Users/[user]/.rvm/rubies/ruby-2.3.1/bin/ruby /Users/[user]/Projects/idebugs/1.rb"

Warning: PATH set to RVM ruby but GEM_HOME and/or GEM_PATH not set, see:
https://github.com/rvm/rvm/issues/3212

Warning! PATH is not properly set up, $GEM_HOME is not set.
Usually this is caused by shell initialization files. Search for PATH=... entries.
You can also re-add RVM to your profile by running: rvm get stable --auto-dotfiles
To fix it temporarily in this shell session run: rvm use ruby-2.3.1
To ignore this error add rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file.

Although both variables are present in the environment (the script from above outputs the ENV):

{ ...,
"GEM_HOME"=>"/Users/[user]/.rvm/gems/ruby-2.3.1",
..., 
"GEM_PATH"=>"/Users/[user]/.rvm/gems/ruby-2.3.1:/Users/[user]/.rvm/gems/ruby-2.3.1@global",
...
}

The error did not occur prior to 2018.2 version.

RVM is properly configured and no error happens when ruby is used manually from the terminal.

I use zsh. I tried to configure bash for RVM as well. I switched to bash, confirmed that RVM works. When I manually run the line:

bash -c "/Users/[user]/.rvm/bin/rvm ruby-2.3.1 do /Users/[user]/.rvm/rubies/ruby-2.3.1/bin/ruby /Users/[user]/Projects/idebugs/1.rb"

from the terminal (from within both bash and zsh) I don't see the error. However RubyMine still has it (tried Restart, Clean Caches, Reboot).

Additional info:

RubyMine 2018.2.1
Build #RM-182.3911.41, built on August 7, 2018
JRE: 1.8.0_152-release-1248-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6

 

13 comments
Comment actions Permalink

I am running into the exact same issue.

2
Comment actions Permalink

Same here, no hint worked for that issue. What's wrong with the installation?

0
Comment actions Permalink

Rolled back to 2018.1.4 and no error of this kind.

But it is starting with another command as with 2018.2.1 - without "bash -c" at the beginning.

0
Comment actions Permalink

I'm getting this same warning too and didn't get it with previous versions

0
Comment actions Permalink

All the devs in my office have exact same error issue after install last updates from RubMine ( OSX 10.13.6, Rubymine, 2018.2.1 )

1
Comment actions Permalink

Same here, just upgraded to 2018.2 and got the GEM_HOME not found error. I have decided not to modify ANY of my shell scripts, I am a paying customer and this is a major inconvenience, you folks at JetBrains should fix this ASAP. Thanks.

4
Comment actions Permalink

According to https://youtrack.jetbrains.com/issue/RUBY-22254, this bug is resolved from 2018.2.3.

2
Comment actions Permalink

I am also running into the exact same issue.

0
Comment actions Permalink

I'm running into the exact same issue and it was not fixed by 2018.2.3 EAP

0
Comment actions Permalink

I am now on 2018.2.3 (not EAP) and I re-confirm that it has been fixed. For me at least, @Almog1232.

0
Comment actions Permalink

I had the same issue and had to downgrade to version 2017.3.4 in order for this to go away.

0
Comment actions Permalink

Yup, it is still broken in the latest EAP version. Rubymine not so usable for any of the nice integrations like rubocop and bundler....
I just use command line..

0

Please sign in to leave a comment.