mehmetmucahitnet said almost 3 years ago on A Rubyist's Apple M1 Review :
Hello there. I'm getting an error like this, do you have a solution for this? I am using asdf and ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.arm64e-darwin20]
------------------------------------------------------------------------------------------------------------
/Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/pg-1.2.3/lib/pg_ext.bundle, 0x0009): could not use '/Library/Ruby/Gems/2.6.0/gems/pg-1.2.3/lib/pg_ext.bundle' because it is not a compatible arch - /Library/Ruby/Gems/2.6.0/gems/pg-1.2.3/lib/pg_ext.bundle (LoadError)
 from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
 from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
 from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
 from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
 from /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `block in require'
 from /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:291:in `load_dependency'
 from /Library/Ruby/Gems/2.6.0/gems/activesupport-6.0.3.4/lib/active_support/dependencies.rb:324:in `require'
 from /Library/Ruby/Gems/2.6.0/gems/pg-1.2.3/lib/pg.rb:5:in `<main>'
 from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
 from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
 from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
 from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
 from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.4.9/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
 from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/bundler/runtime.rb:81:in `block (2 levels) in require'
 from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/bundler/runtime.rb:76:in `each'
 from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/bundler/runtime.rb:76:in `block in require'
 from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/bundler/runtime.rb:65:in `each'
 from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/bundler/runtime.rb:65:in `require'
 from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/bundler.rb:114:in `require'
 from /Users/mehmetmucahitnet/Desktop/GlobalMedia/rails/e-ticaret/config/application.rb:10:in `<top (required)>'
 from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/application.rb:92:in `require'
 from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/application.rb:92:in `preload'
 from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/application.rb:157:in `serve'
 from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/application.rb:145:in `block in run'
 from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `loop'
 from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `run'
 from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/application/boot.rb:19:in `<top (required)>'
 from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
 from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
 from -e:1:in `<main>'
------------------------------------------------------------------------------------------------------------