rbenv can't change global ruby version

后端 未结 7 1964
时光说笑
时光说笑 2021-02-02 13:11

My Mac OS X has a default ruby.

$ ruby -v
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]

I installed rbenv and ruby ver

7条回答
  •  醉梦人生
    2021-02-02 13:59

    Uninstall ruby and then install agains:

    brew uninstall -f ruby
    brew install ruby
    

    Add this two line to you ~/.bash_profile

    export PATH="$HOME/.rbenv/bin:$PATH"
    eval "$(rbenv init -)"
    

    Reopen the console and that's it and run

    ruby -v 
    

提交回复
热议问题