1.1. 2.1 项目初始化
1.1.1. 2.1.1 新建项目(不安装依赖)
rails new xxx --skip-bundle
1.1.2. 2.1.2 修改 RubyGems 源
【精】RubyGems镜像源-Ruby China:https://gems.ruby-china.com/
bundle config mirror.https://rubygems.org https://gems.ruby-china.com
bundle
1.1.3. 2.1.3 Git 忽略 Mac 和 IDE 配置文件
Github官方-全局.gitignore:https://gist.github.com/octocat/9257657 1)新增 Mac 全局配置文件
vi ~/.gitignore_global
2)填写
## IDE、文本编辑器 配置文件 ##
.vscode
.idea
## 编译来源 ##
*.com
*.class
*.dll
*.exe
*.o
*.so
### 压缩文件 ##
# *.7z
# *.dmg
# *.gz
# *.iso
# *.jar
# *.rar
# *.tar
# *.zip
## 日志 | 数据库 ##
*.log
*.sql
*.sqlite
## Mac 配置文件 ##
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
3)让配置生效
git config --global core.excludesfile '~/.gitignore_global'
1.1.4. 2.1.4 提交代码(比如 Github)
git add -A
git commit -am "Initial commit"
git remote add origin git@github.com:your_project
git push -u origin master