Ruby更新何其难
用pages+jeckll做blog, 但是, 报安全错误, 需要更新ruby的环境和依赖包
# 第一个错误
# bundle update --bundle 22:47:12 ☁ master ☀
Traceback (most recent call last):
2: from /usr/local/opt/ruby/bin/bundle:23:in `<main>'
1: from /usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems.rb:296:in `activate_bin_path'
/usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/rubygems.rb:277:in `find_spec_for_exe': Could not find 'bundler' (1.17.3) required by your /Users/bergman/git/_X/gwiki的2个站点/blog.cn/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.17.3`
# 这些命令之后, 不报这个错误了
bundle update # 提示需要安装bundler
gem install bundler:1.17.3
gem install bundler
brew upgrade ruby
# 第二个错误
# bundle update 0:08:20 ☁ master ☂ ⚡ ✭
Fetching source index from https://rubygems.org/
Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
# 同时还有这个错误
# bundle update --bundler
# 解决步骤
1. 删除gemfile.lock
gem update --system # 2.
3. 修改gemfile: source 'https://rubygems.org'to http:// (without an s)
bundle install # 4.
# 死活搞不定, 用清华的源吧
gem sources --add https://mirrors.tuna.tsinghua.edu.cn/rubygems/
gem sources --remove https://rubygems.org #这个不行
gem sources --remove https://rubygems.org/ #这个ok了
gem source -l
gem update --system
bundle install
bundle update --bundler
bundle outdated # 看一下需要更新啥
bundle update # 更新
最终解决高危漏洞的办法是使用清华的源, 神啊, 我的v2ray貌似越来越不灵了.