Ruby gem,bundler 미러/소스 변경
· One min read
gem
# 새로운 소스 추가 및 기본 소스 제거
gem sources --add https://mirrors.tuna.tsinghua.edu.cn/rubygems/ --remove https://rubygems.org/
# 현재 등록된 소스 목록 확인
gem sources -l
bundle
# 전역 설정
bundle config set --global mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems
# 현재 프로젝트에서만 적용
bundle config set --local mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems
# 동일하게 현재 프로젝트에서만 적용 (이전 방식)
bundle config mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems
관련문서:https://bundler.io/v2.2/man/bundle-config.1.html#MIRRORS-OF-GEM-SOURCES