Setup development environment for Mac

Homebrew

1
2
3
https://gitee.com/cunkai/HomebrewCN?_from=gitee_search

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

rbenv/ruby

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
brew install rbenv ruby-build
# run this and follow the printed instructions:
rbenv init

# list latest stable versions:
rbenv install -l

# list all local versions:
rbenv install -L

# install a Ruby version:
rbenv install 3.2.0

rbenv global 3.2.0   # set the default Ruby version for this machine
# or:
rbenv local 3.2.0    # set the Ruby version for this directory

gem

1
2
3
4
5
查看源
gem sources -l
更换源
gem sources --remove https://rubygems.org/
gem sources --add https://gems.ruby-china.com/

cocoapods

1
gem install cocoapods
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy