ffi seems to be broken, there are multiple bug reports for various projects all over the place, but so far I haven’t seen a lot of progress to fix them. I spent some time this morning trying to figure out a solution, but at this point, all I can do is provide the same rosetta2 workaround I’ve seen elsewhere.
I use bundler, rather than a user install, so that my gems are packaged; in this case I recommend you do the same. You might already have a working Gemfile. Then use the arch command to force ruby to use rosetta2 as x86 and build/run the gems that way.
To be clear: this is a workaround, not a fix.
cd jekyll_install
arch -arch x86_64 bundle install --path vendor/bundle
then to run, eg jekyll serve
arch -arch x86_64 bundle exec jekyll serve
if you get errors about missing symbols, try
arch -arch x86_64 bundle pristine
and then try to run jekyll again.