macOS版本Monterey。
先看官方教程https://jekyllrb.com/docs/installation/macos/,结果执行到以下这一步ruby-install ruby时报错。
错误日志如下:
>>> Updating ruby versions ...
!!! Failed to download https://raw.githubusercontent.com/postmodern/ruby-versions/master/ruby/versions.txt to /Users/xxx/.cache/ruby-install/ruby/versions.txt!
!!! Failed to download ruby versions!
直接访问https://raw.githubusercontent.com/postmodern/ruby-versions/master/ruby/versions.txt可以访问,Google、百度搜了半天没有找到相关解决方案。
安装Ruby
无奈去了Ruby官网
https://www.ruby-lang.org/en/documentation/installation/#homebrew
找到官方教程。
brew install ruby
貌似一下装成功了。
用ruby -v看了一下还是ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]。
切换Ruby版本
按照提

本文介绍在macOS Monterey环境下安装Ruby和Jekyll的过程,包括解决安装过程中的常见问题,以及如何通过Homebrew安装并切换Ruby版本。
最低0.47元/天 解锁文章
1644

被折叠的 条评论
为什么被折叠?



