Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

605
Views
How can I avoid this ruby illegal instruction error when updating a cocoapod?

tldr: Ruby is reporting an illegal instruction when I try to update my pod, maybe because I’m using two different versions of it.

I am not sure what my problem is, and I’ll happily add more information should it be helpful.

I got a new M1 Pro Mac and have been trying to get an XCode project (an iOS app) to work on it. It happily builds for my phone but fails to build for simulators. Based on this answer, I tried to update cocoapods and then the pods I’m using for my project (some of the Google Firebase pods). When I run pod update, I get the following result:

Update all pods
Updating local specs repositories
/Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curls/classes.rb:36: [BUG] Illegal instruction at 0x0000000100224000
ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.arm64e-darwin21]

This is then followed by several hundred lines of reporting (saved here). It also saves a diagnostic report (here). I believe that both of these are red herrings, but I wanted to include them just in case.

My guess for what’s going wrong is that the library is 2.6.0, while ruby itself is version 2.6.8. Both of these are old, and they’re also different versions. I tried to update ruby, gem, and reinstalled cocoapods, but none of these changed these version numbers. Any help getting these versions updated would be appreciated.

My apologies for such an indirect question; if I were more sure what the problem was, I probably would have solved it.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

If you are on an M1 chip, uninstall the cocoapods package through gem (sudo gem uninstall cocoapods) and reinstalling it with homebrew (brew install cocoapods), this fixed my problem.

over 4 years ago · Santiago Trujillo Report

0

I believe the issue was that my newly updated ruby versions weren’t being copied to my homebrew path. This command (from this answer) ended up solving it!

PATH=/usr/local/opt/ruby/bin:$PATH
GEMSDIR=$(gem environment gemdir)/bin
PATH=$GEMSDIR:$PATH
export PATH
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!