Jekyll Logo

I’m not a huge fan of installing the latest and greatest version of anything until it’s had a chance to bite other people when it breaks. So I was a little annoyed when I finally updated to Mojave (10.14) and received the following error:

/usr/local/bin/jekyll: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory

This post exists to hopefully provide help to other people when they run into this issue.

My first assumption was to try to just reinstall Jekyll but that didn’t work:

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

    current directory: /Library/Ruby/Gems/2.3.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20181120-2738-1uao5qi.rb extconf.rb
creating Makefile

current directory: /Library/Ruby/Gems/2.3.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR=" clean

current directory: /Library/Ruby/Gems/2.3.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
make: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18/ruby/config.h', needed by `ruby_http_parser.o'.  Stop.

make failed, exit code 2

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/http_parser.rb-0.6.0 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/http_parser.rb-0.6.0/gem_make.out

I tried a number of things but what finally did it was making sure I had the latest version of Xcode installed. After I did that I was able to successfully run sudo gem install jekyll. I also had to reinstall all my other gems but those all went smoothly.