Jazzy OSX 10.11.3 Xcode 7.2.1问题查找XCRUN

时间:2016-02-26 18:13:55

标签: macos xcode7.2 jazzy

使用以下命令行,与Jazzy有以下问题。检查了命令行工具等,一切看起来都不错。

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>'

shell命令/脚本

Private _sLastValidValue As String = String.Empty
Private _bIgnoreChange As Boolean = False

Private Sub txtUnitGrade_TextChanged(sender As Object, e As EventArgs) Handles txtUnitGrade.TextChanged

If Not _bIgnoreChange Then
    If txtUnitGrade.Text = String.Empty Then
        _sLastValidValue = String.Empty
    Else
        If Not IsNumeric(txtUnitGrade.Text) Then
            SetValueToLast()
        Else
            Dim iParsedValue As Integer = Integer.MinValue
            If Not (Integer.TryParse(txtUnitGrade.Text, iParsedValue)) OrElse iParsedValue < 0 OrElse iParsedValue > 5 Then
                SetValueToLast()
            Else
                _sLastValidValue = txtUnitGrade.Text
            End If
        End If
    End If
End If
End Sub

Private Sub SetValueToLast()
    Beep() 'you could add some other audible or visual cue that an block occured
    _bIgnoreChange = True
    txtUnitGrade.Text = _sLastValidValue
    txtUnitGrade.SelectionStart = txtUnitGrade.Text.Length
    _bIgnoreChange = False
End Sub

1 个答案:

答案 0 :(得分:0)

看起来这就是问题所在。 &GT;安装了1个版本的xcode。 XCODE / PREFERENES / LOCATIONS / COMMAND LINE TOOLS。选择正确的一个,即使在安装了新版本的工具后仍然无法工作。

相关问题