Ruby version not in ruby-build list for rbenv

后端 未结 5 1649
南方客
南方客 2021-01-15 15:56

I\'m using Rails 4.2 and wanted to update my Ruby version as well with rbenv.

I used Homebrew to install ruby-build and no matter how many times I try to update via

5条回答
  •  独厮守ぢ
    2021-01-15 16:34

    Usually, follow these steps to install a new Ruby version with rbenv:

    $ brew update               
    $ brew upgrade ruby-build
    $ brew upgrade rbenv
    

    Check which versions are available after updating:

    $ ruby-build --definitions
    

    Install a specific version (for example 2.1.3) with:

    $ rbenv install 2.1.3
    

    Or if you are interested into improved support for UTF8 characters in the irb console:

    $ RUBY_CONFIGURE_OPTS=--with-readline-dir=`brew --prefix readline` rbenv install 2.1.3
    

    After these steps I usually set the newest version as my global default:

    $ rbenv global 2.1.3
    

提交回复
热议问题