macos 安装 rbenv

brew install rbenv

# 用来编译安装 ruby
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build

# 用来管理 gemset, 可选, 因为有 bundler 也没什么必要
git clone https://github.com/jf/rbenv-gemset.git $HOME/.rbenv/plugins/rbenv-gemset

# 通过 rbenv update 命令来更新 rbenv 以及所有插件, 推荐
git clone https://github.com/rkh/rbenv-update.git $HOME/.rbenv/plugins/rbenv-update

# 使用 Ruby China 的镜像安装 Ruby, 国内用户推荐
git clone git@github.com:AndorChen/rbenv-china-mirror.git $HOME/.rbenv/plugins/rbenv-china-mirror
posted @ 2023-02-12 16:43  guangzan  阅读(207)  评论(0编辑  收藏  举报