💻 Running Jekyll locally on MacBook M1
I recently got a new M1 MacBook and wanted to set up Jekyll locally so I could write blog posts. However, I ran into some issues because of architecture issues.
I got the following error: missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle
on trying to do a jekyll serve
.
After reading a bunch of GitHub Issues (1, 2) I now use the following command to install gems: arch -arch x86_64 bundle install
and to serve: arch -arch x86_64 bundle exec jekyll serve
.
That fixed a bunch of things, but I still ran into some missing symbol errors for ffi
, that I fixed by installing ffi
gem in x86: arch -x86_64 sudo gem install ffi