SlatherOrg / slather

Generate test coverage reports for Xcode projects & hook it into CI.
MIT License
1.55k stars 236 forks source link

M1 issue #522

Open NrmeenTomoum opened 2 years ago

NrmeenTomoum commented 2 years ago

dlopen(/Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.8-x86_64-darwin/lib/nokogiri/2.6/nokogiri.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.8-x86_64-darwin/lib/nokogiri/2.6/nokogiri.bundle' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e))) - /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.8-x86_64-darwin/lib/nokogiri/2.6/nokogiri.bundle (LoadError) i got this error, any support ?

knox commented 2 years ago

works for me ✅

❯ sysctl -n machdep.cpu.brand_string
Apple M1 Pro
❯ bundle list | egrep "slather|nokogiri"
  * nokogiri (1.13.8)
  * slather (2.7.2 0ff566a)
CorbinMontague commented 1 year ago

Check your ruby version. I was seeing this same issue on my Macbook Pro with the default ruby version installed (ruby 2.6.8p205). I no longer see this error after setting up rbenv and moving to ruby version 3.1.2.

hongbo-miao commented 1 year ago

This helps me on M1 MacBook Pro:

Install new Ruby by

brew install rbenv
rbenv init
rbenv install 3.1.3

I am using zsh, so in my case, add this in ~/.zshrc.

eval "$(rbenv init - zsh)"

(Note, check change 3.1.0 to the version you are using)

Now you can install slather by

gem install slather

Hope it helps! 😃

im-jersh commented 1 year ago

following this article worked for me and bundler installs the correct version of nokogiri for Apple Silicon

bundle config force_ruby_platform true
bundle install