pod setup --verbose does not do anything - cocoa

iMac:~ pierre-henri$ pod setup --verbose
iMac:~ pierre-henri$
I don't get more than that, the setup was successfull?
thank you for your help
Pierre-Henri

follow these commands to fix the problem
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.7.5

Related

Invalid `Podfile` file: Unable to locate the executable `node`

I'm trying to run my App on IMB Cloud. Server run is OK. NPM Installed and Started. When POD Install from cd /ios it shows error:
denisbondar#MBP-Denis ios % pod install
[!] Invalid Podfile file: [!] Unable to locate the executable node.
# from /Users/denisbondar/Documents/kickapp/starter-kit/mobile-app/ios/Podfile:48
# -------------------------------------------
#
use_native_modules!
# end
# -------------------------------------------
Any thoughts? Thanks!
I had the same Issue. As I was trying to run a React Native App, and I needed some node module I have to run
brew install node
Just had the same issue, after updating cocoa pods the installation passed:
sudo gem install cocoapods
brew remove cocoapods && sudo gem install cocoapods
If you're running into this issue on an M1 Mac, this is what fixed it for me:
sudo arch -x86_64 gem install ffi
In your /ios directory:
arch -x86_64 pod install
I am aware that the commands I ran in order to fix my build have already been mentioned on this page, but I'll try to provide the order I ran them + some backstory.
For me the problem was that I've initally installed cocoapods using homebrew and I couldn't get it to update past version 1.5.2. Tried different approaches but pod --version still printed 1.5.2.
Then I've tried installing cocoapods using gems with:
sudo gem install cocoapods
Even if it displayed that the installation of cocoapods 1.10.1 was successful, the command line from terminal still pointed to the homebrew version of cocoapods, and pod --version still printed out 1.5.2. So I had to remove it, by calling:
brew remove cocoapods
After that the command line pointed to the gems version of cocoapods (1.10.1). And the build was successful.
BEWARE I AM MAC OS NOOBIE SO PROCEED WITH CAUSION FOR THE NEXT PART
Also, my friend tried to follow the exact same steps and his build still failed until he tried installing:
sudo arch -x86_64 gem install ffi
then after the installation he ran:
arch -x86_64 pod install
Again, I am a MAC OS noobie, so I don't understand very well yet what's the deal with this ffi. It just helped my friend getting his build done, so I thought it might also help somebody else.
For me problem was that I have cocoa pods installed by brew install cocoapods and brew install --cask cocoapods.
So to fix I run
brew remove cocoapods
brew remove --cask cocoapods
brew install cocoapods
After that I have latest version of cocoapods and everything worked.

"pod init" giving error "-bash: pod: command not found"

I am trying to create a Podfile for my Xcode project for Firebase compatibility, but when I try to create it within the same file that my Xcode project is stored in, using my terminal and typing "pod init", it throws the error "-bash: pod: command not found".
I am up to date on OSX as far as I'm aware, using Sierra 10.12.1, but I am unfamiliar with the use of Podfiles, so any help here would be great, thanks.
Looks like you didn't install CocoaPods.
To do that you install it through ruby gems, like this:
sudo gem install cocoapods
If you don't have admin privileges, try:
gem install cocoapods --user-install
if the 1st command doesn't work, try the 2nd command
sudo gem install cocoapods
sudo gem install -n /usr/local/bin cocoapods
In my case, the 2nd command worked
For OS Catalina (as of December 2019)
gem install -n /usr/local/bin cocoapods
Brew install
$ brew install cocoapods
For me sudo gem install cocoapodsdid not work.
When I tried $sudo gem install -n /usr/local/bin cocoapods it threw me weird error messages. But brew install was pretty neat.
Got this error today. Was able to resolve it by making sure I had ruby in my PATH.
export PATH=/usr/bin/ruby:$PATH
Then (as suggested by answers above) run
sudo gem install cocoapods
Or
sudo gem install -n /usr/local/bin cocoapods
I ran into this problem yesterday, I reckon others in my situation will be too. So I am running a mac OS siera on a virtual machine on my windows so I can use xcode. Firstly you will need to update your version of ruby, it has been answered here: https://stackoverflow.com/a/38194139/7451779.
Once updated this just run: $ sudo gem install cocoapods
After all this $ pod init should work

How can I upgrade to CocoaPods 1.1 when it has been released now?

Before it has been released, I think I should use "sudo gem install cocoapods --pre" to accomplish my aim. But now it has been released. Should I still use "sudo gem install cocoapods --pre"?
I consider I should use "sudo gem install cocoapods" to install CocoaPods 1.1. But I failed. After I remove all previous CocoaPods in my Mac and call "sudo gem install cocoapods", I still get CocoaPods 1.0 installed.
What is wrong with my steps before? Any suggestion will be appreciated.
Please check there might be two versions of cocoapods installed. So i recommend to uninstall all the cocoapods old or new version and have a clean install.
To uninstall use this in terminal:
gem list --local | grep cocoapods | awk '{print $1}' | xargs sudo gem uninstall
or
rm -fr ~/Library/Caches/CocoaPods && \
gem update --system && \
gem update && \
gem cleanup && \
pod setup
Then install CocoaPods it will be installing the latest version and if in case it does not then you can use sudo gem update command to update the Pods.
For installing CocoaPods use,
sudo gem install cocoapods
and if you want to install RC version
sudo gem install cocoapods --pre
It seems that after I call following command, it succeed finally. 'rm -fr ~/.cocoapods'
I also had to call 'sudo gem install cocoapods -n /usr/local/bin cocoa pods' for cocoapods 1.1.1 installation.
Thanks for Parth Adroja's answer. It also helped me a lot.

Ruby gems. Unable to add sources

I had this problem "https://stackoverflow.com/questions/19612185/unable-to-install-cocoapods-gem-from-rubygems-org-bad-response-backend-read-e" and as one of the solutions said I tried to remove/add rubygem sources. It was removed without problem, but when I tried to add it back it's giving me an error.
Here's my action on terminal and response:
$ gem sources --add https://rubygems.org/
Error fetching https://rubygems.org/:
server did not return a valid file (https://rubygems.org/specs.4.8.gz)
Does anyone know what is the problem?
Here is Easy Steps for installing Ruby in your system to help to install Cocoapods in your machine, I solved the same issue with being below mentioned steps.
Install command line tools using the command
xcode-select --install
Install Homebrew by
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Ruby using homebrew
brew install ruby
Check Ruby version
ruby -v
Install Ruby
gem source -a http://rubygems.org/
gem install cocoa pods
sudo gem install cocoapods
or
sudo gem install -n /usr/local/bin cocoapods
Go to below folder
cd ~/.cocoapods/repos
Run the below command
git clone https://github.com/CocoaPods/Specs.git master
Go to the directory where Podfile is present and run
pod install
Happy Coding😊
Steps:
1. sudo gem install cocoapods
2. pod install
3. pod update
ensure that you are connected to internet. Your system is unable to find the latest version of gems, required by pods

CocoaPods Uninstall

I'm trying to remove an older version of cocoapods. I've used the terminal command:
$ sudo gem uninstall cocoapods
However, afterwards when I type:
$ pod --version
I get 0.22.3 in return.
When I try:
gem list --local | grep cocoapods
nothing is returned.
Thanks for your help.
This command will tell you where the pod binary is installed :
which pod
You can manually remove it afterwards :
sudo rm -rf <path>
After $ sudo gem uninstall cocoapods write number from choice ex:
Select gem to uninstall:
1. cocoapods-0.34.1
2. cocoapods-0.34.4
3. cocoapods-0.35.0
4. cocoapods-0.35.0.rc2
5. All versions
> 5
It works for me...
find out where is the pod installed
which pod
remove the file
remove cocoapod
s gem specs from /Library/Ruby/Gems/[VersionNumber]/cocoa*
sudo rm /Library/Ruby/Gems/[VersionNumber]/cocoapods*
reinstall cocoapods
sudo gem install cocoapods

Resources