Unable to install Jekyll on M3 macbook

I’m migrating from older MacBook (Intel i7, Big Sur) to new one (M3, Sonoma).

On i7, Big Sur, Jekyll works fine running
ruby 3.1.3p185
jekyll 3.9.2

I haven’t had problems.

On M3, Sonoma I did a clean install of
ruby 3.3.0
jekyll 3.9.3

Everything installs but the server won’t run.

bundle exec jekyll serve

gives the error message below, which I’m unable to diagnose or fix.
Can anyone advise? Thanks!

jekyll 3.9.3 | Error: undefined method []' for nil /Users/billoxbury/.asdf/installs/ruby/3.3.0/lib/ruby/3.3.0/logger.rb:384:in level’: undefined method `’ for nil (NoMethodError)

@level_override[Fiber.current] || @level
               ^^^^^^^^^^^^^^^
from /Users/billoxbury/.gem/ruby/3.1.3/gems/jekyll-3.9.3/lib/jekyll/log_adapter.rb:43:in `adjust_verbosity'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/jekyll-3.9.3/lib/jekyll/configuration.rb:157:in `config_files'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/jekyll-3.9.3/lib/jekyll.rb:113:in `configuration'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/jekyll-3.9.3/lib/jekyll/command.rb:43:in `configuration_from_options'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/jekyll-3.9.3/lib/jekyll/commands/serve.rb:89:in `start'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/jekyll-3.9.3/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/jekyll-3.9.3/exe/jekyll:15:in `<top (required)>'
from /Users/billoxbury/.gem/ruby/3.1.3/bin/jekyll:25:in `load'
from /Users/billoxbury/.gem/ruby/3.1.3/bin/jekyll:25:in `<top (required)>'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/bundler-2.4.7/lib/bundler/cli/exec.rb:58:in `load'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/bundler-2.4.7/lib/bundler/cli/exec.rb:58:in `kernel_load'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/bundler-2.4.7/lib/bundler/cli/exec.rb:23:in `run'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/bundler-2.4.7/lib/bundler/cli.rb:492:in `exec'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/bundler-2.4.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/bundler-2.4.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/bundler-2.4.7/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/bundler-2.4.7/lib/bundler/cli.rb:34:in `dispatch'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/bundler-2.4.7/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/bundler-2.4.7/lib/bundler/cli.rb:28:in `start'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/bundler-2.4.7/exe/bundle:45:in `block in <top (required)>'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/bundler-2.4.7/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
from /Users/billoxbury/.gem/ruby/3.1.3/gems/bundler-2.4.7/exe/bundle:33:in `<top (required)>'
from /Users/billoxbury/.asdf/installs/ruby/3.3.0/bin/bundle:25:in `load'
from /Users/billoxbury/.asdf/installs/ruby/3.3.0/bin/bundle:25:in `<main>'

A similar issue is solved here.

So that suggests I install Jekyll 4.3.3. Sounds like a good idea, but the gem installer doesn’t find it. Any pointers for how to do that install? Thanks!

I am unfamiliar with the error message you are highlighting. I created a video sharing how to install Jekyll on Apple Silicon. You might want to check it out. At minimum, you can see if there are any steps you might have missed.

Thanks Bill R - will take a look and let you know. The key point here is that I had no problem previously on Mac - I’ve been using Jekyll on i7 macbook for the past year. It’s only on the new device/OS there’s a problem.

I created that video because I had many problems switching from Intel to M-series. There are, of course, updated docs on the official Jekyll site. I [mostly] followed those but found my approach in the video slightly easier to work with.

Great!! All resolved :slight_smile:
Your video was really helpful, thanks! In the end it came down to ruby conflicts which had to do (somehow) with my installation using chruby and ruby-install. I solved the problem by completely uninstalling all rubies except for base, then following your brew install steps.
After then writing a clean Gemfile, all works. Thanks again!

Great news! Enjoy Jekyll’ing!

Seems it’s an issue with ruby 3.3.0 and github-pages. I ran into same issue when homebrew forcefully upgraded my ruby version. It’s fixed by downgrading ruby to 3.2.3.

There’s an alternate method I found using rbenv - I just saw Bill R’s post about using chruby above and never tried that out - but the approach with rbenv works for me.

Here’s a post I made on medium that goes over it in more detail, BTW. Hope it helps.