Warning! PATH is not properly set up, usually this

2019-01-16 09:45发布

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?

标签: ruby rvm
8条回答
做个烂人
2楼-- · 2019-01-16 10:23

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

查看更多
Viruses.
3楼-- · 2019-01-16 10:23

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.

查看更多
姐就是有狂的资本
4楼-- · 2019-01-16 10:26

I was able to get rid of this by doing

rvm get head
查看更多
叼着烟拽天下
5楼-- · 2019-01-16 10:30

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.

查看更多
Emotional °昔
6楼-- · 2019-01-16 10:31

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.

查看更多
孤傲高冷的网名
7楼-- · 2019-01-16 10:42

rvm get stable solved this for me

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

查看更多
登录 后发表回答