d-jiao
March 28, 2025, 5:25pm
1
Here’s the error message
I’m running it on MacOS 15.3.2 (24D81), following the exact steps in Jekyll on macOS | Jekyll • Simple, blog-aware, static sites .
Have searched for all the fixes on this forum/stackoverflow/github/reddit and none of them solve the issue
d-jiao
March 28, 2025, 5:26pm
2
here’s the environment of my gem. fingers-crossed that someone could help me out
rdyar
March 29, 2025, 5:29pm
3
that error I think happens when you don’t have the dev tools needed to build native extensions. I’m not a mac user so not sure how it works there, but on a pc there are 2 ways to install ruby, with and without the dev tools. If you install it without the devtools you get that error.
Lots of people have issues on macs as they have a built in ruby and then they install ruby again and it gets hard to tell which is which?
Your second screen shot sort of looks like you have 2 versions installed - 3.4.0 and 3.4.1 but I am not positive about that.
see if you can find anything about ruby dev tools on a mac. I’m sure there are other threads in here with a solution, seems to come up fairly often.
rdyar
March 29, 2025, 5:32pm
4
this thread has a note about needing xcode command tools which I think is your issue.
Correct, the version of ruby pre-installed with Sonoma even is a mere ruby 2.6.10. Hardly capable to run the latest Jekyll.
As far as maintaining a user-installed version of ruby separate from the system, I recommend a package manager, which requires pretty extensive use of the command line. Getting somewhat familiar with homebrew is a must, however as great as it is, lacks some of the advanced capabilities required to slot multiple installations of ruby into a user’s home directory and manage…
d-jiao
March 29, 2025, 8:08pm
5
thanks for the reply! the xcode command line doesn’t seem to be the key cause of the issue
I do have them readily available
d-jiao
March 29, 2025, 8:10pm
6
if i do xcode-select --install as suggested by other threads, i’m told that it’s already installed
rdyar
March 29, 2025, 9:09pm
7
then i would look into whether you have more than one ruby installed - it sort of looked like you did but I’m not positive. more than one ruby installation can cause issues if they are not managed by a ruby version manager. Maybe one has access to the tools and the other doesn’t?
Try the solutions discussed in this GitHub issue ticket:
opened 11:40AM - 29 Aug 24 UTC
**I am trying to upgrade one of my ruby project to 3.3.0 and facing issue like b… elow :**
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
current directory: /Users/sk096170/.rvm/gems/ruby-3.3.0/gems/eventmachine-1.2.7/ext
/Users/sk096170/.rvm/rubies/ruby-3.3.0/bin/ruby extconf.rb --with-ldflags\=-Wl,-undefined,dynamic_lookup
checking for pkg-config for openssl... ["-I/usr/local/Cellar/openssl@1.1/1.1.1w/include ", "-L/usr/local/Cellar/openssl@1.1/1.1.1w/lib", "-lssl -lcrypto"]
Using OpenSSL from pkg-config -I/usr/local/Cellar/openssl@1.1/1.1.1w/include && -L/usr/local/Cellar/openssl@1.1/1.1.1w/lib && -lssl -lcrypto
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()... yes
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()... yes
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... yes
checking for accept4() in sys/socket.h... yes
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=-I/usr/local/include -I/usr/local/opt/gcc/include/c++/v1 -fdeclspec
creating Makefile
current directory: /Users/sk096170/.rvm/gems/ruby-3.3.0/gems/eventmachine-1.2.7/ext
make DESTDIR\= sitearchdir\=./.gem.20240829-4094-90sad9 sitelibdir\=./.gem.20240829-4094-90sad9 clean
current directory: /Users/sk096170/.rvm/gems/ruby-3.3.0/gems/eventmachine-1.2.7/ext
make DESTDIR\= sitearchdir\=./.gem.20240829-4094-90sad9 sitelibdir\=./.gem.20240829-4094-90sad9
compiling binder.cpp
make: *** [binder.o] Error 1
make failed, exit code 2
**Tried all below commands but nothing has worked :**
gem install eventmachine -v '1.2.7' -- --with-cppflags=-I/usr/local/include
gem install eventmachine -- --with-openssl-dir=/usr/local/opt/openssl@1.1
gem install eventmachine -v '1.2.7' -- --with-cflags="-Wno-error=implicit-function-declaration"
bundle config set --global build.eventmachine --with-ssl-dir=$(brew --prefix openssl@3)
bundle config build.eventmachine --with-openssl-dir=/opt/homebrew/opt/openssl@1.1
gem install eventmachine -v '1.2.7' -- --with-ldflags="-Wl,-undefined,dynamic_lookup"
Can someone help me to solve this error.
**My Mac details :**
2.6 GHz 6-Core Intel Core i7
Sonoma 14.6.1
**Ruby**
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin23]
d-jiao
April 1, 2025, 9:07am
9
rdyar:
more than one ruby
Thanks both. I tried to reinstall everything related to ruby and reinstalled xcode as per the discussion, and the error went away. Not sure which trick makes the material help.