Episodes
rgaufman PRO said over 1 year ago on A Rubyist's Apple M1 Review :
Which Mac Pro did you use in your benchmarks?

David Kimura PRO said over 1 year ago on A Rubyist's Apple M1 Review :
  rgaufman It is the Mac Pro 2019 with 8 Cores


dbreunig PRO said over 1 year ago on A Rubyist's Apple M1 Review :
I'm running into errors getting nokogiri working, even using system libraries. Has anyone run into similar challenges?

David Kimura PRO said over 1 year ago on A Rubyist's Apple M1 Review :
  dbreunig  what are the errors? Also, how did you install homebrew? which architecture is your ruby running as?

dbreunig PRO said over 1 year ago on A Rubyist's Apple M1 Review :
  David Kimura 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:

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/nokogiri-1.10.10/lib/nokogiri/nokogiri.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.10.10/lib/nokogiri/nokogiri.bundle - /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.10.10/lib/nokogiri/nokogiri.bundle (LoadError)

David Kimura PRO said over 1 year ago on A Rubyist's Apple M1 Review :
  dbreunig 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.


dbreunig PRO said over 1 year ago on A Rubyist's Apple M1 Review :
  David Kimura Makes sense. I'll likely develop remotely in the interim. 

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.


David Kimura PRO said over 1 year ago on A Rubyist's Apple M1 Review :
  dbreunig 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.

molszanski said over 1 year ago on A Rubyist's Apple M1 Review :
Doing a full x86 via Rosette.

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)`


mehmetmucahitnet said 11 months 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>'
------------------------------------------------------------------------------------------------------------


David Kimura PRO said 11 months ago on A Rubyist's Apple M1 Review :
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.

mehmetmucahitnet said 11 months ago on A Rubyist's Apple M1 Review :

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?

David Kimura PRO said 11 months ago on A Rubyist's Apple M1 Review :
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.

jmarsh24 said 11 months ago on A Rubyist's Apple M1 Review :
Does this mean that we can basically follow the guide without the need for using any ibrew alias?

David Kimura PRO said 11 months ago on A Rubyist's Apple M1 Review :
  jmarsh24  That's correct. I've been using the M1 for some time now and have not had to specify the architecture when installing programs.

zalom said 10 months ago on A Rubyist's Apple M1 Review :
There is a missing `\n` in this line ->
echo ". $(brew --prefix asdf)/asdf.sh" >> ~/.zshrc

It should look like:

echo -e "\n. $(brew --prefix asdf)/asdf.sh" >> ~/.zshrc

Also, as per this comment -> https://github.com/asdf-vm/asdf-ruby/issues/81#issuecomment-558234779
I had to add this too ->

echo -e "\n. $(brew --prefix asdf)/etc/bash_completion.d/asdf.bash" >> ~/.zshrc

Login to Comment