Closed Fesh-com closed 1 year ago
Hi @Fesh-com - this doesn't appear to be related to the content of the Using Combine book. If you're having trouble with Ruby, I'm guessing you're trying to do something with asciidoctor - in which case, this repo isn't the best place to try and troubleshoot or track that. I'm going to close this since I'm missing the relevance, but let me know how it's related and I can try and aim you in the right direction to get assistance.
I just followed you installation instructions...
cmake, rbenv, bundler, asciidoctor, pygments.rb all installed without problems. Only rugged failed...
Ahh... got it. Sorry for the delay, I'm traveling ATM. That's all for Asciidoctor, which I use to render the content from asciidoc into ePub, PDF, and HTML. Since I originally set that up, I stopped trying to keep up with Asciidoctor on my own machine and the vagaries (that you're experiencing) of getting various Ruby things working locally and switched to using a Docker container to run whatever processing I need.
If you want to use the same, take a look at re.bash - the script I use to regenerate the content from the sources. It's all set up for using docker images of Asciidoctor, which has resolved a lot of the crazy of managing the ruby pieces for me.
You'll need Docker installed for it ($0, but still licensed software) - but that should let you generate any of the outputs you like. If that doesn't make sense, holler with what you're specifically trying to generate and I'll try and help you through it. That said, I haven't a clue about what it'll take to get rugged
installed for Ruby locally - so I won't be much help there.
"sudo gem install rugged" fails: -- Build files have been written to: /Library/Ruby/Gems/2.6.0/gems/rugged-1.5.0.1/vendor/libgit2/build -- /usr/bin/make checking for -lgit2... extconf.rb failed Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first.
To see why this extension failed to compile, please check the mkmf.log which can be found here: /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-21/2.6.0/rugged-1.5.0.1/mkmf.log extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/rugged-1.5.0.1 for inspection. Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-21/2.6.0/rugged-1.5.0.1/gem_make.out
[100%] Linking C static library ../../libgit2.a /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../libgit2.a(openssl_dynamic.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../libgit2.a(openssl_legacy.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../libgit2.a(auth_negotiate.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../libgit2.a(winhttp.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../libgit2.a(pcre_string_utils.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../libgit2.a(openssl_dynamic.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../libgit2.a(openssl_legacy.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../libgit2.a(auth_negotiate.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../libgit2.a(winhttp.c.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../libgit2.a(pcre_string_utils.c.o) has no symbols [100%] Built target libgit2package "xcrun clang -o conftest -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin21 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/backward -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0 -I. -I/Library/Ruby/Gems/2.6.0/gems/rugged-1.5.0.1/ext/rugged/../../vendor/libgit2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS -DUSE_FFI_CLOSURE_ALLOC -g -O3 -Wall -Wno-comment conftest.c -L/Library/Ruby/Gems/2.6.0/gems/rugged-1.5.0.1/ext/rugged/../../vendor/libgit2/build -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib -L. -L/AppleInternal/Library/BuildRoots/c188b140-2ff3-11ed-a7e5-ca9c01dc79de/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.6.Internal.sdk/usr/local/lib -L/usr/local/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/usr/lib -lgit2 -framework CoreFoundation -framework Security -lz -liconv -lruby.2.6 " In file included from conftest.c:1: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
include "ruby/config.h"
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: note: did not find header 'config.h' in framework 'ruby' (loaded from '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks')
% which ruby /usr/bin/ruby % ruby -v ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin21]