realm / jazzy

Soulful docs for Swift & Objective-C
https://realm.io
MIT License
7.34k stars 412 forks source link

Cannot Execute Jazzy that's installed using Bundler on XCode 15.2 #1384

Closed hilmyveradin closed 4 months ago

hilmyveradin commented 5 months ago

I worked on OSS repo which using jazzy as it's documentation. However, the jazzy script is not recognizable as command and when I run bundle exec jazzy, it fails. Few things:

  1. I'm using XCode 15.2
  2. I'm using Ruby version 3.2.2
  3. Jazzy already included in Gemfile.lock. It even already included in the vendor/bin/ruby file (see first image)
  4. It appears there's error like the second image
  5. When traced, it has something to do with "file exists but not in directory"

Any idea why?

image image image

johnfairh commented 5 months ago

That's an error from xcodebuild -- it happens if you have a file called build from your project where xcodebuild itself wants to create a build directory.

hilmyveradin commented 5 months ago

I see. But it's expected for the project to be built in order to jazzy to generate documentation right? Or it's not?

I'm kind of confused on how to address this root cause, to be honest

johnfairh commented 5 months ago

Yes, jazzy runs xcodebuild as part of generating documentation.

You haven't said if you have found a possible build file in your project that is breaking things?

You can either rename that file or maybe look at changing xcodebuild's build directory by passing it -derivedDataDir (see man xcodebuild).

johnfairh commented 4 months ago

Closing, answered.