Cocoapods error when Initializing react-native app on Mac mini (Apple M1, 2020) running Monterey
Using that processor does bring some issues with installing pods. Please try arch -x86_64 pod install
and see what it brings.
Link to some older post:
React Native ios builds failing suddenly
How can I avoid this ruby illegal instruction error when updating a cocoapod?
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
make ruby default to 3.1.2 on macOS
It might be easier if you use a ruby version manager like rbenv or rvm
brew install rbenv
rbenv install 3.1.2
rbenv use 3.1.2
Otherwise, you can check this answer: https://stackoverflow.com/a/8731098/14473816
Xcode: pod install error when creating new projects
This Question is pretty general...
Are you using an Macbook M1? Or an Intel Macbook?
If you are using an Intel macbook ...
$sudo gem install cocoapods
move to your folder run pod init
open your Podfile and add your targets e.g.
#platform :ios, '9.0'
target 'MyPod' do
# Pods for MyPod
pod 'Firebase/Auth'
endClose Podfile
type pod install
type pod update
Open MyPod.xcworkspace and start working
if you are using M1 Mb do the same but start with
- Right click on Terminal
- Get Info -> Open with Rosetta
- Open terminal and type sudo gem install ffi
Then do the steps above.
If this error is still occur let me know.
Related Topics
Ruby/Rails Image Processing Libraries
Checking Whether the C Compiler Works... No
Pg Error Could Not Connect to Server: Connection Refused Is the Server Running on Port 5432
"Errno::Eaccess...Permission Denied" Running Compass Watch
Rails 3, Check CSV File Encoding Before Import
Refactoring a Large Routes.Rb File in Rails 4
Why Does Openuri Treat Files Under 10Kb in Size as Stringio
How to Access Class Variables in Ruby 1.9
Convert String with Comma to Integer
How to Organize Minitest/Unit Tests
How to View a Sample of the Call Stack in Ruby
Rails 4 User Roles and Permissions
Rails 3 Joins -- Select Only Certain Columns
Is Time.Zone.Now.To_Date Equivalent to Date.Today
Ruby Get Time in Given Timezone
Change Error Field Name in Rails