☒ I'm using the alternative installation of Homebrew, as detailed here, which worked great for wget, postgres, etc. Nokogiri installs with no errors with the `--use-system-libraries` flag. However, it will fail when a program attempts to load it with the following error:
☒ Yes, I've experienced that as well. However, using the arm64 binary of ruby right now isn't recommended. I've also found that doing the alternative install isn't recommended right now since there are a lot of things still broken. You can get by with the alternative install if you are not needing to do any Rails work, but as soon as you do, you'll run into issues. I would go with the intel arch install of homebrew like seen in the video. At least until there is a more stable version of homebrew and the gems are stable for the arm64 arch.
☒ not really. A lot of things do compile and work under the arm64 binary of homebrew. As you noted, things like postgresql seem to work. I haven't done any tests with using the system ruby version. However, I have tested things out with asdf ruby and rvm ruby (both arm64 and intel)
Until things stabalize, I'd recommend doing homebrew under Rosetta.
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>' ------------------------------------------------------------------------------------------------------------
How did you install homebrew & postgresql? It also looks like you're using the system Ruby which is ARM based. I'd recommend now a days to use the native arm-based homebrew.
I used or tried to use the method you wrote. I guess I wasn't very successful. Uninstall existing installations. I think doing the installations after this step will solve my problem. While doing these installations. Should my terminal be x86_64 based? Or should it be ARM based?
I have been using ARM based everything. Unless if a program requires Rosetta2 (like Microsoft Teams, OneDrive, etc), I will always now default to ARM based.
Are you running into issues with the arm64 binary not related to gems? So far the pattern seems to be gems calling out to external libraries.
Until things stabalize, I'd recommend doing homebrew under Rosetta.
Managed to install nokogiri with
```bash
/Users/me/.rvm/rubies/ruby-2.6.5/bin/ruby: Mach-O 64-bit executable x86_64
a gem install nokogiri -v '1.10.4' --source 'https://rubygems.org/' -- --use-system-libraries
# works
```
Stuck at rake atm
`load': cannot load such file -- /Users/me/.rvm/gems/ruby-2.6.5/specifications/exe/rake (LoadError)`
------------------------------------------------------------------------------------------------------------
/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)
------------------------------------------------------------------------------------------------------------
I used or tried to use the method you wrote. I guess I wasn't very successful. Uninstall existing installations. I think doing the installations after this step will solve my problem. While doing these installations. Should my terminal be x86_64 based? Or should it be ARM based?
It should look like:
Also, as per this comment -> https://github.com/asdf-vm/asdf-ruby/issues/81#issuecomment-558234779
I had to add this too ->