There have been multiple accounts similar to this, but something different is going on here. I wrote about this question here.
Here is background information:
$ which ruby
/Users/johnlarkin/.rvm/rubies/ruby-3.1.3/bin/ruby
$ ruby -v
ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]
$ which openssl
/opt/homebrew/opt/openssl@3/bin/openssl
$ openssl version
OpenSSL 3.1.0 14 Mar 2023 (Library: OpenSSL 3.1.0 14 Mar 2023)
I can install eventmachine like this:
$ gem install eventmachine -v '1.2.7' -- --with-ssl-dir=/opt/homebrew/opt/openssl@3
Building native extensions with: '--with-ssl-dir=/opt/homebrew/opt/openssl@3'
This could take a while...
Successfully installed eventmachine-1.2.7
Parsing documentation for eventmachine-1.2.7
Done installing documentation for eventmachine after 0 seconds
1 gem installed
However, when I go to bundle install, it still doesn't work:
^
4 warnings generated.
linking shared-object rubyeventmachine.bundle
Undefined symbols for architecture arm64:
"_SSL_get1_peer_certificate", referenced from:
SslBox_t::GetPeerCert() in ssl.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [rubyeventmachine.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in
/Users/johnlarkin/Desktop/Coding_Learning/github_files/johnlarkin1.github.io/vendor/bundle/ruby/3.1.0/gems/eventmachine-1.2.7
for inspection.
Results logged to
/Users/johnlarkin/Desktop/Coding_Learning/github_files/johnlarkin1.github.io/vendor/bundle/ruby/3.1.0/extensions/arm64-darwin-22/3.1.0/eventmachine-1.2.7/gem_make.out
An error occurred while installing eventmachine (1.2.7), and Bundler cannot continue.
Make sure that `gem install eventmachine -v '1.2.7' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
jekyll-sleek was resolved to 0.1.9, which depends on
jekyll-seo-tag was resolved to 2.8.0, which depends on
jekyll was resolved to 3.9.2, which depends on
em-websocket was resolved to 0.5.3, which depends on
eventmachine
Does anyone have any ideas?
Huge thank you to @tadman for the helpful suggestion. The issue was with the
bundle config settings(link)It seems like due to an earlier incorrect command specification, something about the build process had become cached.
I ran:
After doing this,
bundle installproceeded to work totally normally. Thank you again @tadman!