jazzy: Library not loaded: @rpath/libswiftCore.dylib sourcekitten

I did uninstall of jazzy, updated gem, but nothing working

dyld: Library not loaded: @rpath/libswiftCore.dylib
  Referenced from: /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/jazzy-0.1.0/lib/jazzy/sourcekitten/sourcekitten
  Reason: image not found
/usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/jazzy-0.1.0/lib/jazzy/sourcekitten.rb:51:in `run_sourcekitten': Running `/usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/jazzy-0.1.0/lib/jazzy/sourcekitten/sourcekitten doc` failed:  (RuntimeError)
    from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/jazzy-0.1.0/lib/jazzy/doc_builder.rb:55:in `build'
    from /usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/jazzy-0.1.0/bin/jazzy:15:in `<top (required)>'
    from /usr/local/var/rbenv/versions/2.1.5/bin/jazzy:23:in `load'
    from /usr/local/var/rbenv/versions/2.1.5/bin/jazzy:23:in `<main>'

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 24 (7 by maintainers)

Most upvoted comments

Seems that for some reason, RubyGems is not downloading the symlink Current -> A inside of lib/jazzy/sourcekitten/SourceKittenFramework.framework, which is why the rpath is failing (as it expects ../Versions/Current/Frameworks). This may not have been noticed before if you have installed SourceKitten standalone, as it installs the needed dylibs at /Library/Frameworks/SourceKittenFramework.framework/Versions/Current/Frameworks which is another valid rpath (can check via otool -l on the SourceKitten binary). 0.0.20 works fine, this is new since SourceKittens Makefile and install structure has changed a bunch.

For those who need a quick work around in the meantime.

# This will tell you the path to your RubyGem install. For example: /Library/Ruby/Gems/2.0.0/
gem env

cd <RUBY_GEM_PATH>/gems/jazzy-0.1.0/lib/jazzy/sourcekitten/
sudo install_name_tool -add_rpath "@executable_path/SourceKittenFramework.framework/Versions/A/Frameworks" sourcekitten