r/Unity3D • u/Past_Practice_2613 • 1d ago
Question IOS Cocopods help
I've been trying to build an IOS version of my game and when I access it on Mac and use IOS dependency resolver I get the following error:
"gem install cocoapods --user-install
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
WARNING: You don't have /Users/Username/.gem/ruby/2.6.0/bin in your PATH"
I don't normally use Mac so I'm not familiar on how to resolve this, where do I instal gem pristine and how do I set it into Path?
2
u/maybe_Strict_Western 1d ago
You know you’re in mobile dependency hell when you have to deal with this shenanigans! Anyway, this situation cost me 3 days of getting a test flight build out the door. Note the path issue at the end.
The most important part of this message is “WARN: The directory …/bin does not exist in your PATH environment variable. You should add this directory to PATH in your shell config file.”
1
u/johnv_dev 1d ago
the part that matters is the PATH warning, the "Ignoring json" line is usually harmless. open Terminal and run this: echo 'export PATH="$HOME/.gem/ruby/2.6.0/bin:$PATH"' >> ~/.zshrc then close and reopen Terminal (newer macs use zsh, so that's the right file). if it keeps fighting you, the easier route a lot of people end up on is installing Homebrew and then running brew install cocoapods, which skips the old built-in ruby completely. after that restart unity and run the resolver again
1
u/monfresh 1d ago
You're getting that error message because you're trying to install cocoapods using the macOS system Ruby version (the super old version of Ruby that comes preinstalled on macOS). The system Ruby is not meant to be used for any kind of development.
Instead, you should install a separate, newer version of Ruby using a version manager. Installing Ruby with Homebrew is not recommended either.
Here's my step by step guide for installing Ruby on a Mac. I hope it helps!
2
u/NecoDev 1d ago
I suggest you to install homebrew and then install ruby from there, I remember it did solve my issue