个人博客用的 Bundle,每次要 bundle install
可能会遇到没法访问的问题:shell
解决方法 Ruby China 官网有,替换一下镜像源就能够了:ruby
这里记录下个人过程,方便之后直接配置:spa
没加 sudo 提示我须要 root 权限,因此我加了权限:code
sudo gem update --system
查看下更新的版本 2.7.7 没问题:blog
gem -v 2.7.7
官网说的使用 Gemfile 和 Bundler 的项目直接执行如下命令便可替换镜像,不用修改 Gemfile 文件:rem
bundle config mirror.https://rubygems.org https://gems.ruby-china.com
而后我执行 bundle install
,搞定了:get