Thanks to @indirect’s help, I’m back up and running.
Turns out there’s that directory /Library/Ruby/Gems/2.6.0/specifications/default
. It contains a couple of gemspecs you really can’t (and shouldn’t ever) delete.
With the default gemspecs back in place, I was able to apply the fiddle hack mentioned below, and got Homebrew working again.
My DTK gives me the dreaded symbol '_ffi_prep_closure' not found
error after I deleted /Library/Ruby
.
The following workaround no longer has any effect for me:
cd "$(mktemp -d)" \
&& git clone https://github.com/ruby/fiddle \
&& cd fiddle \
&& bundle install --path vendor/bundle \
&& bundle exec rake build \
&& sudo gem install pkg/fiddle-1.0.1.gem
Would appreciate any pointers so I can avoid setting up the whole machine from scratch.
Am on Big Sur Beta 3, Xcode 12 Beta 3.
Output of /usr/bin/ruby -rfiddle -e ''
:
Traceback (most recent call last):
4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
2: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/fiddle.rb:2:in `<top (required)>'
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin20/fiddle.bundle, 0x0009): symbol '_ffi_prep_closure' not found, expected in flat namespace by '/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin20/fiddle.bundle' - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin20/fiddle.bundle (LoadError)
Warning: CocoaPods is installed but broken. Skipping pod install.
You appear to have CocoaPods installed but it is not working.
This can happen if the version of Ruby that CocoaPods was installed with is different from
the one being used to invoke it.
This can usually be fixed by re-installing CocoaPods.
To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for
instructions.
CocoaPods not installed or not in valid state.
Error launching application on iPhone 13.