Can't install jazzy on Mojave

1.9k Views Asked by At

I was trying to install jazzy on Mojave beta, but failed to do so, because I get this error

MacBook-Pro-Damian:~ damiandudycz$ sudo gem install jazzy
Password:
Building native extensions.  This could take a while...
ERROR:  Error installing jazzy:
    ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.3.0/gems/redcarpet-3.4.0/ext/redcarpet
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20180821-24471-1py1trb.rb extconf.rb
creating Makefile

current directory: /Library/Ruby/Gems/2.3.0/gems/redcarpet-3.4.0/ext/redcarpet
make "DESTDIR=" clean

current directory: /Library/Ruby/Gems/2.3.0/gems/redcarpet-3.4.0/ext/redcarpet
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 `autolink.o'.  Stop.

make failed, exit code 2

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

Can someone help me resolve this? Or maybe there is other way to install jazzy without gem?

Or maybe you know other good documentation generator for swift projects?

3

There are 3 best solutions below

0
On

xcode-select --install did the thing for me.
Afterwards I was able to install jazzy via [sudo] gem install jazzy

0
On

This worked for me have no idea why but it did. I think it installed the Command line tools manually from the .pkg

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
1
On

Try this one

sudo gem install -n /usr/local/bin jazzy