Ruby Bundle v2 安装

少于 1 分钟读完

Ruby中国区源配置,Bundle2安装

Ruby 安装

安装RVM

gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
sudo apt-get install software-properties-common
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get update
sudo apt-get install rvm

if you are using zsh, you should replace .bashrc to .zshrc

echo 'source "/etc/profile.d/rvm.sh"' >> ~/.bashrc
echo "ruby_url=https://cache.ruby-china.com/pub/ruby" > ~/.rvm/user/db

重启Terminal

安装Ruby

rvm install ruby

Ruby中国区源配置

https://mirrors.tuna.tsinghua.edu.cn/help/rubygems/

添加 TUNA 源并移除默认源

gem sources --add https://mirrors.tuna.tsinghua.edu.cn/rubygems/ --remove https://rubygems.org/
gem sources -l

配置Bundle TUNA源

bundle config mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems

本地依赖更新

bundle update

本地安装依赖

bundle install