📜  在 mac 上安装 ruby 和 rails - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:31.487000             🧑  作者: Mango

代码示例1
brew install rbenv ruby-build

# Add rbenv to bash so that it loads every time you open a terminal
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.zshrc
source ~/.zshrc

# Install Ruby
rbenv install 2.6.6
rbenv global 2.6.6
ruby -v