Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M1 issue #522

Open
NrmeenTomoum opened this issue Sep 16, 2022 · 4 comments
Open

M1 issue #522

NrmeenTomoum opened this issue Sep 16, 2022 · 4 comments

Comments

@NrmeenTomoum
Copy link

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
Copy link
Contributor

knox commented Sep 19, 2022

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
Copy link

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
Copy link

hongbo-miao commented Nov 27, 2022

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants