I am using macbook pro 2019 running sonoma 14.3.1 (23D60) when I install gems via bundle install, all the gems get installed correctly but on rails s or rails c, I get
(called from <main> at /Users/macbookpro/upwork/solaris/solaris-cloud/vendor/bundle/ruby/3.1.0/bundler/gems/activeadmin-467517368502/lib/active_admin.rb:2)
/Users/macbookpro/upwork/solaris/solaris-cloud/vendor/bundle/ruby/3.1.0/gems/ffi-1.16.3/lib/ffi/dynamic_library.rb:65:in `load_library': Could not open library '/Users/macbookpro/upwork/solaris/solaris-cloud/vendor/bundle/ruby/3.1.0/gems/llhttp-ffi-0.5.0/ext/aarch64-darwin/libllhttp-ext.bundle': dlopen(/Users/macbookpro/upwork/solaris/solaris-cloud/vendor/bundle/ruby/3.1.0/gems/llhttp-ffi-0.5.0/ext/aarch64-darwin/libllhttp-ext.bundle, 0x0005): tried: '/Users/macbookpro/upwork/solaris/solaris-cloud/vendor/bundle/ruby/3.1.0/gems/llhttp-ffi-0.5.0/ext/aarch64-darwin/libllhttp-ext.bundle' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/macbookpro/upwork/solaris/solaris-cloud/vendor/bundle/ruby/3.1.0/gems/llhttp-ffi-0.5.0/ext/aarch64-darwin/libllhttp-ext.bundle' (no such file), '/Users/macbookpro/upwork/solaris/solaris-cloud/vendor/bundle/ruby/3.1.0/gems/llhttp-ffi-0.5.0/ext/aarch64-darwin/libllhttp-ext.bundle' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64')). (LoadError)
Searched in <system library path>, /usr/lib, /usr/local/lib, /opt/local/lib
I have tried reinstalling xcode developer tools, I have also updated cocoapods
Looks like the project you're working on came with bundled gems, ie. they were prebuilt, and looks like they were prebuilt for "Apple silicon" and you have Intel. Delete the
vendor/bundledirectory and try re-running yourbundle install.