Can't install Jekyll on a MAC

I am losing my mind. I tried absolutely everything, every Google “fix” and ChatGPT response and I keep getting this error:

gem install jekyll

Building native extensions. This could take a while...
ERROR:  Error installing jekyll:
        ERROR: Failed to build gem native extension.

    current directory: /Users/my-username/.gem/ruby/3.4.1/gems/eventmachine-1.2.7/ext
/Users/my-username/.rubies/ruby-3.4.1/bin/ruby extconf.rb
checking for pkg-config for openssl... not found
checking for -lcrypto... yes
checking for -lssl... yes
checking for openssl/ssl.h... yes
checking for openssl/err.h... yes
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_fd_select()... yes
checking for rb_fdset_t in ruby/intern.h... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for pipe2() in unistd.h... no
checking for accept4() in sys/socket.h... no
checking for SOCK_CLOEXEC in sys/socket.h... no
checking for sys/event.h... yes
checking for sys/queue.h... yes
checking for clock_gettime()... yes
checking for CLOCK_MONOTONIC_RAW in time.h... yes
checking for CLOCK_MONOTONIC in time.h... yes
CXXFLAGS=-fdeclspec
creating Makefile

current directory: /Users/my-username/.gem/ruby/3.4.1/gems/eventmachine-1.2.7/ext
make DESTDIR\= sitearchdir\=./.gem.20250723-1390-55zxyu sitelibdir\=./.gem.20250723-1390-55zxyu clean

current directory: /Users/my-username/.gem/ruby/3.4.1/gems/eventmachine-1.2.7/ext
make DESTDIR\= sitearchdir\=./.gem.20250723-1390-55zxyu sitelibdir\=./.gem.20250723-1390-55zxyu
compiling binder.cpp
make: *** [binder.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/my-username/.gem/ruby/3.4.1/gems/eventmachine-1.2.7 for inspection.
Results logged to /Users/my-username/.gem/ruby/3.4.1/extensions/arm64-darwin-24/3.4.0-static/eventmachine-1.2.7/gem_make.out

Things I tried:

  1. Un-installing and installing x-code dev tools
  2. Installing chruby and ELIMINATING other managers like rbenv
  3. Triple checked ruby is installed (NOT THE DEFAULT MAC VERSION) - when I run ruby -v I get this: ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [arm64-darwin24]
  4. Making sure rbenv is removed from the PATH.

Please, please help! I am trying to set up my static site up on Github Pages, hence why I need to get Jekyll running. Thank you!

I would focus on this - I am not a mac user, on windows there are 2 ways to install ruby, one has the dev tools required to build native extensions, the other does not. If you install without the dev tools then you get an error like this I think. On a mac I think it is called something other than dev tools but I can’t remember what.

If you search in here for that phrase you should find some solutions.

I got it work. without homebrew or any other crap like that on Big Sur [11.7.10]

these versions didn’t bring me problems in the end. I do have Xcode [12.5.1] & command line shite installed

basic steps

• set your .zshrc as - export PATH="$PATH:/usr/local/bin" [or where ever you wanna spooge it into] - restart terminal if its open when editing
• download openSSL 1.1.1 - Old 1.1.1 releases | OpenSSL Library
• download ruby 2.7.8 - Ruby Releases
• gem install Jekyll 3.8.5 - I chose this because every other didn’t go correctly]

once you downed OpenSSL, do the config, make, make install for openSSL, then do the same for ruby. once those are cunted in place, which will be in usr/local, then do the gem install jekyl -v 3.8.5 - I chose 3.8.5 because I just wanna get things done & not tit about too much & it works

bash bash fucking bosh it works when you then run bundle exec jekyll serve –watch in vscode or whatever you decide.
I solved this without help from here or stupid & utterly bulky package managers like homebrew that shit the bed at the thought of an older system or OS & is even easier than package managers in my mind

have fun. get to making