Skip to main content

Ruby

brew install rbenv ruby-build

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

rbenv global 2.6.3
ruby -v

# https://mirror.tuna.tsinghua.edu.cn/help/rubygems/
# 添加 TUNA 源并移除默认源
gem sources --add https://mirrors.tuna.tsinghua.edu.cn/rubygems/ --remove https://rubygems.org/
# 列出已有源
gem sources -l

Rails

gem install rails

# 创建站点
rails new my-site