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

后端 未结 9 952
遥遥无期
遥遥无期 2020-12-04 14:17

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         


        
相关标签:
9条回答
  • 2020-12-04 14:44

    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.

    0 讨论(0)
  • 2020-12-04 14:47

    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

    0 讨论(0)
  • 2020-12-04 14:47

    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.

    0 讨论(0)
  • 2020-12-04 14:47

    I was able to get rid of this by doing

    rvm get head
    
    0 讨论(0)
  • 2020-12-04 14:55

    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.

    0 讨论(0)
  • 2020-12-04 15:04

    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!

    0 讨论(0)
提交回复
热议问题