# Cannot isntall jekyll: ERROR: Failed to build gem native extension

**URL:** <https://talk.jekyllrb.com/t/cannot-isntall-jekyll-error-failed-to-build-gem-native-extension/9867>\
**Category:** Help\
**Created:** [March 28, 2025, 5:25pm UTC](https://talk.jekyllrb.com/t/cannot-isntall-jekyll-error-failed-to-build-gem-native-extension/9867 "2025-03-28T17:25:52Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![ibkevg](https://avatars.discourse-cdn.com/v4/letter/i/a88e57/32.png) [@ibkevg](https://talk.jekyllrb.com/u/ibkevg)\
**Post date:** [April 9, 2025, 3:41pm UTC](https://talk.jekyllrb.com/t/cannot-isntall-jekyll-error-failed-to-build-gem-native-extension/9867/10 "2025-04-09T15:41:39Z")

</div>

My theory is if Ruby is installed before the command line compiler tools are configured, and then you configure the command line tools, the only way to get Ruby to know about the compiler tools is to uninstall Ruby and reinstall.

> [@Error with eventmachine](https://talk.jekyllrb.com/t/error-with-eventmachine/9547/12):
>
> Solution is here: [eventmachine(1.2.7) installation issue on Intel mac with ruby 3.3.0 · Issue #990 · eventmachine/eventmachine · GitHub](https://github.com/eventmachine/eventmachine/issues/990) My guess is that the C++ compiler on your system is autodetected while installing Ruby and it doesn’t check again, if something about it is not setup right at that point, then subsequent gem installs that require it, like eventmachine, won’t work. This is why the fix is two steps: uninstall Ruby, get the Apple command-line tools setup properly and working prop…

---

_[View the full topic](https://talk.jekyllrb.com/t/cannot-isntall-jekyll-error-failed-to-build-gem-native-extension/9867)._
