I'm trying to follow this guide on setting up a GitHub page website. I installed Homebrew, chruby, and Jekyll following this jekyllrb.com tutorial.
When I run ruby -v
I get ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin18]
. When I run chruby -V
I get chruby: 0.3.9
. After installing Jekyll with gem install jekyll
I get Successfully installed jekyll-4.3.1 Parsing documentation for jekyll-4.3.1 Done installing documentation for Jekyll after 0 seconds 1 gem installed
.
But when I run jekyll -v
(or any Jekyll
command) I get a very long message with the following error:
<internal:/Users/my_username/.rubies/ruby-3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': dlopen(/Users/my_username/.gem/ruby/3.1.2/gems/google-protobuf-3.21.12-x86_64-darwin/lib/google/3.1/protobuf_c.bundle, 9): no suitable image found. Did find: (LoadError)
/Users/my_username/.gem/ruby/3.1.2/gems/google-protobuf-3.21.12-x86_64-darwin/lib/google/3.1/protobuf_c.bundle: cannot load 'protobuf_c.bundle' (load command 0x80000034 is unknown)
/Users/my_username/.gem/ruby/3.1.2/gems/google-protobuf-3.21.12-x86_64-darwin/lib/google/3.1/protobuf_c.bundle: cannot load 'protobuf_c.bundle' (load command 0x80000034 is unknown) - /Users/my_username/.gem/ruby/3.1.2/gems/google-protobuf-3.21.12-x86_64-darwin/lib/google/3.1/protobuf_c.bundle
I spent hours looking at what this error means and found very specific (to some version of Ruby or other libraries) questions like Ruby 2.7.2 google/protobuf_c problem (M1), Ruby: Gem version 3.11.2 doesn't load on Ruby 2.7, and many others.
It's the first time I even hear about Ruby or Jekyll or anything else here and I can't figure out how to properly install these to just make a website on GitHub. I also tried to install Ruby using rvm instead of chruby
but that gave the same error. I also tried to install different versions of Ruby, like 3.1.3
and 3.2.0
.
sudo gem uninstall google-protobuf
was necessary, beforesudo gem install google-protobuf -v 3.21 --platform=ruby
which-v 3.21
is the version required by jekyll 4.3.1 . – Threedimensional