- I only care about running
jekyll
for Github Pages. - ruby 3.x doesn't seem to work correctly with Jekyll
- since I don't care about any other users on my machine, I will NOT install gems to user folder to simplify the process
Double check the pre-installed version of RUBY we DONT want (version 2.6)
$ ruby -v
Installer with homebrew ruby 2.7
$ brew install [email protected]
DONT install under ~/ , install to homebrew's folders to avoid shenanigans with Gemfile not found etc.
$ gem install bundler jekyll
Add the paths into your bash/zsh profile
$ export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
$ export PATH="/opt/homebrew/lib/ruby/gems/2.7.0/bin:$PATH"
Now jekyll serve --watch
works!
There goes another 2 hours of my life :/ 😭😭😭
Check paths
$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 3.2.22
- RUBY VERSION: 2.7.4 (2021-07-07 patchlevel 191) [arm64-darwin20]
- INSTALLATION DIRECTORY: /opt/homebrew/lib/ruby/gems/2.7.0
- USER INSTALLATION DIRECTORY: /Users/fabd/.local/share/gem/ruby/2.7.0
- RUBY EXECUTABLE: /opt/homebrew/opt/[email protected]/bin/ruby
- GIT EXECUTABLE: /opt/homebrew/bin/git
- EXECUTABLE DIRECTORY: /opt/homebrew/lib/ruby/gems/2.7.0/bin
- SPEC CACHE DIRECTORY: /Users/fabd/.local/share/gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /opt/homebrew/Cellar/[email protected]/2.7.4/etc
Thank you. This was helpful