Can't get Jekyll running anymore

Make sure ruby is setup. This works for me on Catalina

brew install ruby

Add the following to your ~/.bashrc or ~/.zshrc file. This will ensure so that your user (Homebrew) install of Ruby will be found before the system Ruby.

export RUBY_HOME=/usr/local/opt/ruby/bin
export PATH="$RUBY_HOME:$PATH"

Install bundler for your user. Use the flag to avoid sudo.

gem install bundler --user-local

Add jekyll to your Gemfile. Here, matching GH Pages version. Or ~> 4.1.

gem 'jekyll', '~> 3.9'

To avoid sudo use and permissions error, adjustment on above post comment, use local here too.

bundle config set --local path vendor/bundle
bundle install

And finally make sure your path in .zshrc or .bashrc includes path to your gems so bundler can be found.

Replace X.X.0 with your own Ruby version e.g. 2.6.0 (always end with 0 ).

export GEM_PATH="$HOME/.gem/ruby/X.X.0/bin"
export PATH="$GEM_PATH:$PATH"

Then

bundle exec jekyll build