Warning! PATH is not properly set up, usually this is caused by shell initialization files

纵然是瞬间 提交于 2019-11-28 03:55:01

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

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. Hope this helps!

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.

I was able to get rid of this by doing

rvm get head

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.

webdevguy

rvm get stable solved this for me

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

bgillies

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

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.

Please visit http://www.rortuts.com/ruby/rvm-path-is-not-properly-set-up/ for an example.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!