51

Whenever I go to a folder with a .rvmrc file, there is a warning:

Warning! PATH is not properly set up, '/home/me/.rvm/gems/ruby-2.0.0-p247/bin' is not available,
         usually this is caused by shell initialization files - check them for 'PATH=...' entries,
         to fix run: 'rvm use ruby-2.0.0-p247'.

I did rvm use ruby-2.0.0-p247, but the warning is still present.

Note: There are no errors, Im able to run my application just fine, but the warning is very annoying. Any ideas?

Santhosh
  • 28,097
  • 9
  • 82
  • 87
  • What is the output of `echo $PATH`? – Andrew Marshall Jul 31 '13 at 12:54
  • `/home/me/.rvm/gems/ruby-2.0.0-p247/bin:/home/me/.rvm/gems/ruby-2.0.0-p247@global/bin:/home/me/.rvm/rubies/ruby-2.0.0-p247/bin:/home/me/.rvm/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games` – Santhosh Jul 31 '13 at 13:00
  • 1
    I met the same problem and by printing of `$PATH`, it all becomes clear that heroku's `toolbelt` somehow goes before `ruby`. Change it back solved my problem. Thanks @AndrewMarshall – james sa Aug 26 '13 at 03:38

10 Answers10

139

I was getting the same warning even after upgrading RVM to version 1.25.16. I was able to fix the warning by running:

rvm reset

Then when I ran:

rvm version

I did not receive the error anymore.

starball
  • 20,030
  • 7
  • 43
  • 238
Sam
  • 1,548
  • 1
  • 10
  • 7
29

If you know what you're doing, and your PATH is set to what you want, you can suppress this message by putting the following in your ~/.rvmrc:

rvm_silence_path_mismatch_check_flag=1

This is handy if you use other path-manipulating programs like virtualenv, or if you just want to prefix your path with ~/bin or something.

Jim Stewart
  • 16,964
  • 5
  • 69
  • 89
14

I was able to get rid of this by doing

rvm get head
Santhosh
  • 28,097
  • 9
  • 82
  • 87
8

This was a bug and was handled with https://github.com/wayneeseguin/rvm/issues/2050 and was released as rvm stable 1.21.15 at 2013-07-29 19:15:30 -0700

mpapis
  • 52,729
  • 14
  • 121
  • 158
  • I am getting this with 1.21.15. this is my path `/usr/local/bin:/usr/local/heroku/bin:/Users/pills/.rbenv/shims:/usr/bin:/bin:/usr/sbin:/sbin:/Users/pills/.rvm/bin` I had two ruby version managers. – sites Jul 31 '13 at 20:52
  • you need to actually read the message, in your case rbenv is first in PATH before RVM - which basically transfers control to rbenv, sometimes it is enough to just run: `rvm get head --auto-dotfiles` – mpapis Aug 01 '13 at 01:32
6

I had the same problem too, and rvm get head didn't work for me, finally it was solved by running rvm get head --auto-dotfiles, then restarted the terminal and the annoying warning message disappeared! And the solution is found here: https://github.com/wayneeseguin/rvm/issues/2074 Hope this will help.

zuozuo
  • 376
  • 2
  • 7
2

rvm get stable solved this for me

(as pointed out in comments on another answer by AndrewMarshall)

Krease
  • 15,805
  • 8
  • 54
  • 86
webdevguy
  • 975
  • 10
  • 17
2

Okay, so I ran an export PATH command without realizing the implications and ran into the identical error, but I also lost all control of my typical commands like cd and pwd. I didn't want to reset the rvm tools I'd already installed per some of the answers above.

First attempt was to some sort of mac default path (found on google):

$ export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"

Which actually solved my first problem of not having access to my typical command line tools, but was still getting the same error as @Santosh's initial problem. The next thing I did was navigate to my directory where I've set up rvm to start, and then to run a new export command as follows:

$ export PATH="$PATH"

This was how I initially set up rvm, and no more errors. Hope this helps someone

MWiesner
  • 8,868
  • 11
  • 36
  • 70
bgillies
  • 41
  • 5
0

Solved!

Warning! PATH is not properly set up, '/home/vaibhav/.rvm/gems/ruby-2.3.1/bin' is not at first place, usually this is caused by shell initialization files - check them for 'PATH=...' entries, it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles', to fix temporarily in this shell session run: 'rvm use ruby-2.3.1'.

rvm get stable --auto-dotfiles

Next you might get below Error:

RVM is not a function, selecting rubies with ‘rvm use …’ will not work. You need to change your terminal emulator preferences to allow login shell. Sometimes it is required to use /bin/bash --login as the command.

Talon
  • 73
  • 10
Vaibhav
  • 858
  • 10
  • 13
0

Make sure that you add the following at the end of your ~/.bash_profile OR ~/.zshrc file.

In this example our ruby version is ruby-2.6.1. Replace this with your ruby version.

export PATH=~/.rvm/gems/ruby-2.6.1/bin:$PATH

# RVM manual script for loading rvm to shell
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

This works for me.

Abhi
  • 3,361
  • 2
  • 33
  • 38
0

Temporarily solution

I solved it temporarily by running source ~/.rvm/scripts/rvm it is the only solution it worked for me. but you have to run it every time you close the terminal. at least solves your emergency

Carlos
  • 3,480
  • 1
  • 16
  • 14