Could not find 'ffi' (>= 1.3.0) among 85 total gem(s) (Gem::MissingSpecError) React native IOS on pod install
Asked Answered
E

8

13

Hi I'm trying to run my react native app on mac mini. I can run another app also this app to but when i write pod install in terminal it gives this error.

1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1449:in `block in activate_dependencies'

    /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'ffi' (>= 1.3.0) among 85 total gem(s) (Gem::MissingSpecError)
    Checked in 

'GEM_PATH=/Users/xx/.gem/ruby/2.6.0:/Library/Ruby/Gems/2.6.0:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0', execute `gem env` for more information

I tryed a lot like this code

sudo gem pristine --all,  gem pristine --all

sudo gem install -n /usr/local/bin cocoapods -v 1.8.4

delete and ini pod init/ which gave error
brew reinstall cocoapods
\curl -sSL https://get.rvm.io | bash -s stable --ruby
Estey answered 8/9, 2021 at 6:50 Comment(0)
N
45

You can try this command

sudo gem uninstall -aIx
rm -rf ~/.gem
sudo gem install cocoapods

sudo chown -R $USER ~/Library/Caches/CocoaPods
Nippy answered 8/9, 2021 at 6:55 Comment(5)
Well thank you very much. It took a time to done this codes for macmini. Now it works.Estey
Those commands not work for me. But reinstall ruby works for this issueAffine
@Affine can you help in installing Ruby in macOS 12 (intel)Scever
Tried 3-4 solutions, only this one works!Sower
Although chown command failed for me, solved the issueIllaudable
A
16

For me, install a new version of ruby resolved this issue.

curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm list known
rvm install 2.7.2
sudo gem install cocoapods
Affine answered 5/11, 2021 at 5:58 Comment(1)
This one worked for me. Thank you. I had to add: brew install --build-from-source [email protected] xcode-select --installLudwick
S
6

Same issue. Just updating gem package manager is works for me

gem update

Terminal will display installing 'ffi'

Successfully installed ffi-1.15.5
Sterrett answered 3/5, 2022 at 11:39 Comment(0)
G
1

Gem didn't work for me, run below cmd and now pod install should work like a charm

brew link --overwrite cocoapods
Gaudette answered 30/3, 2023 at 8:40 Comment(0)
C
0

i solved the issue by installing the command line tool for XCode.

Just download the specific CLT from apple website

Cramp answered 7/8, 2022 at 18:41 Comment(0)
P
0

I just did a

bundle install

and that allowed me to do a pod install after upgrading (without asking me to Xcode 14).

Postcard answered 17/9, 2022 at 23:53 Comment(0)
L
0
sudo gem update 

This is only soltion

Lincolnlincolnshire answered 19/9, 2023 at 9:54 Comment(0)
P
0

curl -L https://get.rvm.io | bash -s stable source ~/.rvm/scripts/rvm rvm list known export PATH=/opt/homebrew/bin/:$PATH rvm install 2.7.2 sudo gem install cocoapods

Printmaking answered 12/12, 2023 at 10:52 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Fillagree

© 2022 - 2024 — McMap. All rights reserved.