jazzy: Problems with Jazzy when multiple versions of Xcode are installed

ERROR: Error installing jazzy: ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb

creating Makefile

make “DESTDIR=” make: *** No rule to make target "/Applications/Xcode', needed byautolink.o’. Stop.

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/redcarpet-3.3.4 for inspection. Results logged to /Library/Ruby/Gems/2.0.0/gems/redcarpet-3.3.4/ext/redcarpet/gem_make.out

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 52 (1 by maintainers)

Most upvoted comments

@GuoZhiQiang Do you have a space in your Xcode directory? Is it something like “/Applications/Xcode 7.0”? If so, try removing the space. My guess is that No rule to make target "/Applications/Xcode' is indicating that the path has been chopped at the space.

Having the same issue:

UliBoxBook:~ uli$ sudo gem install activesupport -v '< 5'
Successfully installed activesupport-4.2.10
Parsing documentation for activesupport-4.2.10
Done installing documentation for activesupport after 2 seconds
1 gem installed

UliBoxBook:~ uli$ sudo gem install jazzy
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 ./siteconf20181108-42438-jjkw33.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 `/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

UliBoxBook:~ uli$ sudo xcode-select --print-path
/Applications/Xcode.app/Contents/Developer

UliBoxBook:~ uli$ xcodebuild -version
Xcode 10.1
Build version 10B61

Any ideas on how to fix it? This is on 10.14.1 “Mojave”. No extra Xcodes installed.

@agentk you can just gem install activesupport -v '< 5'

You look to have already opened vmg/redcarpet#675 for this. Probably want to - at least temporarily - uninstall whatever has installed that dodgy libwep.

I was finally able to install Jazzy on macOS Mojave. it might be able to help you guys.

Steps:

  1. Install latest ruby via homebrew
  2. Make it default via Omitting PATH
  3. Reboot to recovery mode and DISABLE SIP via csrutil disable
  4. Open Terminal and install jazzy via sudo gem install jazzy
  5. Reboot and Enable SIP again via csrutil enable
  6. Now type Jazzy if command is not found then install it via this command again sudo gem install -n /usr/local/bin jazzy
  7. Voila Jazzy is installed on macOS Mojave.

P.S. Used system had macOS Mojave 10.14.4 and Ruby 2.6.3

Thanks & Cheers

Sorry for the delay, but here is the issue I created: https://github.com/vmg/redcarpet/issues/668. We’ll see what happens.

So seems like my issue was due to Ruby version: macOS comes with 2.3.7p456, while Homebrew offers 2.5.3p105. If I now remember to always run /usr/local/Cellar/ruby/2.5.3_1/bin/gem instead of just gem to install it, it builds for me.

It’s an odd error that I’m not able to replicate. So this is a bit of stabbing in the dark. The tip from @segiddins is spot on for installing jazzy with the stock ruby. I wonder if it’s to do with the selected Xcode?

To check which of the versions is selected use:

xcode-select --print-path
# Example output:
# /Applications/Xcode.app/Contents/Developer

And double check with

xcodebuild -version
# Example output:
# Xcode 7.3.1
# Build version 7D1014

I’m wondering if the latest Xcode needs to be selected for you to install jazzy. You can switch the selected Xcode with: (replacing Xcode2 with your other Xcode)

sudo xcode-select --switch /Applications/Xcode2.app/Contents/Developer

Then try installing jazzy again:

gem install activesupport -v '< 5'
gem install jazzy