Reputation: 3349
with the following command line, have the following issue with Jazzy. have checked the command line tools, etc, all looks good.
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
$ whereis xcrun
/usr/bin/xcrun
shell command / script
jazzy \
--clean \
--author Realm \
--author_url https://realm.io \
--github_url https://github.com/realm/realm-cocoa \
--github-file-prefix https://github.com/realm/realm-cocoa/tree/v0.96.2 \
--module-version 0.96.2 \
--xcodebuild-arguments -scheme,RealmSwift \
--module RealmSwift \
--root-url https://realm.io/docs/swift/0.96.2/api/ \
--output docs/swift_output \
--theme docs/themesJeffs-MBP-2:smallSDKSwift jefforthober$ jazzy \
> --clean \
> --author Realm \
> --author_url https://realm.io \
> --github_url https://github.com/realm/realm-cocoa \
> --github-file-prefix https://github.com/realm/realm-cocoa/tree/v0.96.2 \
> --module-version 0.96.2 \
> --xcodebuild-arguments -scheme,RealmSwift \
> --module RealmSwift \
> --root-url https://realm.io/docs/swift/0.96.2/api/ \
> --output docs/swift_output \
> --theme docs/themes
xcrun: error: unable to find utility "xcrun", not a developer tool or in PATH
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:211:in `spawn': No such file or directory - (Errno::ENOENT)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:211:in `popen_run'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:99:in `popen3'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:279:in `capture3'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:86:in `xcrun'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:119:in `swift_info'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:57:in `swift_version'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:53:in `block in find_swift_version'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:44:in `each'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:44:in `each'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:53:in `select'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:53:in `find_swift_version'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.5.0/lib/jazzy/sourcekitten.rb:136:in `run_sourcekitten'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.5.0/lib/jazzy/doc_builder.rb:57:in `block in build'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.5.0/lib/jazzy/doc_builder.rb:55:in `chdir'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.5.0/lib/jazzy/doc_builder.rb:55:in `build'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.5.0/bin/jazzy:15:in `<top (required)>'
from /usr/local/bin/jazzy:23:in `load'
from /usr/local/bin/jazzy:23:in `<main>'
Upvotes: 1
Views: 411
Reputation: 10556
In my case it happened, not because I hadn't specified a location to Xcode, but because I was using Xcode 8.
It's a weird behaviour, because in my case /usr/bin/xcrun
existed all right, but it was not included in /Applications/Xcode.app/Contents/Developer/usr/bin
. In previous versions of Xcode, that directory contained xcrun
, but not in Xcode 8, at least not on my version of Mac OS X.
I tried creating a symbolic link there, pointing to /usr/bin/xcrun
, but it didn't solve the problem.
The only solution I found was to change the code that was triggering the error, by replacing /usr/bin/xcrun -find xcrun
with /usr/bin/xcrun -find xcodebuild
.
I think it is a pretty safe thing to do, since this command aims at checking that Xcode is correctly installed is set up, thus the new command does the job. Reassuringly, that' what Qtbase did: https://code.qt.io/cgit/qt/qtbase.git/commit/?h=wip/nacl
Upvotes: 0
Reputation: 3349
Looks like this was the problem. > 1 version of xcode installed. XCODE / PREFERENES / LOCATIONS / COMMAND LINE TOOLS. Selected the proper one, it was blank when not working even after installed a new version of the tools.
Upvotes: 0