I'm trying to get Jekyll running on my Mac M1. This requires a Ruby install. I had everything working a couple days ago, but must have changed something and now I cannot make sense of why it's no longer working nor find a fix. Here are the pieces of the puzzle - I hope someone smarter and more experienced than me can help.
It appears that I have Ruby 3.2.1 installed:
MacBook-Air.local~: rbenv version
3.2.1 (set by /Users/johnzumsteg/.rbenv/version)
Run rbenv global for 3.2.1
MacBook-Air.local~: rbenv global 3.2.1
See what Ruby version is current
MacBook-Air.local~: ruby --version
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin22]
Not what I expected. That's the default MacOS Ruby install. Try chruby:
MacBook-Air.local~: chruby 3.2.1
chruby: unknown Ruby: 3.2.1
Also not what I expected.
If it's of help, here's PATH (with line-feeds between individual paths for clarity):
/Users/johnzumsteg/.rbenv/bin:
/Users/johnzumsteg/.gem/ruby/3.2.1/bin:
/Users/johnzumsteg/.rbenv/shims:
/usr/local/opt/ruby/bin:
/usr/local/lib/ruby/gems/3.2.1/bin:
/opt/homebrew/bin:
/opt/homebrew/sbin:
/Library/Frameworks/Python.framework/Versions/3.10/bin:
/Library/Frameworks/Python.framework/Versions/3.9/bin:
/usr/local/bin:/System/Cryptexes/App/usr/bin:
/usr/bin:
/bin:/usr/sbin:
/sbin:/Library/Apple/usr/bin:
/Users/johnzumsteg/.cargo/bin
And the appropriate section of .zshrc:
export PATH="/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.2.1/bin:$PATH"
eval "$(rbenv init - zsh)"
export PATH="$HOME/.gem/ruby/3.2.1/bin: $PATH"
export PATH="$HOME/.rbenv/bin:$PATH"
# enable chruby
source /usr/local/opt/chruby/share/chruby/auto.sh
source /opt/homebrew/opt/chruby/share/chruby/chruby.sh
Clearly I'm not expert at this. I've tried to research for a solution, so I can learn something, but though it seems that I've tried everything I can find, I'm still stuck.
I will greatly appreciate any and all help.
I've trie multiple installs of Ruby 3.2.1 and many trouble-shooting ideas found in my search for a solution