realm / jazzy

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

`run_sourcekitten': Unable to find an Xcode with swift version 2.1.1. (RuntimeError) #461

Closed caohrong closed 8 years ago

caohrong commented 8 years ago

I use jazzy --swift-version 2.1.1 to built my document, But It's still show the error message. /Library/Ruby/Gems/2.0.0/gems/jazzy-0.5.0/lib/jazzy/sourcekitten.rb:137:in run_sourcekitten': Unable to find an Xcode with swift version 2.1.1. (RuntimeError) from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.5.0/lib/jazzy/doc_builder.rb:57:inblock 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:inbuild' from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.5.0/bin/jazzy:15:in <top (required)>' from /usr/local/bin/jazzy:23:inload' from /usr/local/bin/jazzy:23:in `

'

I used cocoapod in my project, so the jazzy can't find the real project? Can you help me? Thanks

XcodeVersion: 7.1.1(7B1005) Project Language: Swift

caohrong commented 8 years ago

Because swift version is 2.1 add --swift-version 2.1 to built , It's Working!

hatjs880328 commented 8 years ago

Wow

hatjs880328 commented 8 years ago

--swift-version 2.0

doozMen commented 8 years ago

With the update to Xcode today to swift 2.2 you have to type jazzy --swift-version 2.2

jkyin commented 8 years ago

@doozMen Could I config swift-version in YAML file? Example: swift-version: 2.2

pcantrell commented 8 years ago

@jkyin https://github.com/bustoutsolutions/siesta/blob/master/.jazzy.yaml#L9

jkyin commented 8 years ago

@pcantrell Thanks ❤️

doozMen commented 8 years ago

@jkyin yes you could. Just try it out I would say. Good luck

yeelan0319 commented 8 years ago

Hi @jpsim I recently upgrade to Jazzy 0.6.0, which seems by default using swift 2.2. My swift version is 2.1.1, so it throw me similar bugs as above. So our solution is instead of passing --swift-version 2.1.1, we pass something like --swift-version $(swift --version | head -n1 | awk '{print $4}'), since everyone may have a slight different version of swift. Could you see if this might cause any harm? And may I know why jazzy need to specify exactly which version of swift we are using when generating reference documentations?

Much thanks!

jpsim commented 8 years ago

And may I know why jazzy need to specify exactly which version of swift we are using when generating reference documentations?

To know which version of Xcode to link against SourceKitten. We're tracking improving this in #427