Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't run "pod install" in jenkins

My slave machine of Jenkins is Mac 10.8. Jenkins run job on my slave machine and run shell command of cocoapods below:

pod install 

and got error from console output of Jenkins job, please check below:

pod: command not found

I tried to run this command "pod install" in local's terminal of this slave machine and gets succeeds.

could you kindly help on me how to fix this problem?

Thanks.

like image 458
Anson Liao Avatar asked Aug 27 '14 04:08

Anson Liao


People also ask

How do you install pods?

To install the pods, do one of the following: Place the caret at the code line where you add the pod, press ⌥ ⏎ , select Install, and press ⏎ . Click Install pods in the top-left corner of the editor window. From the main menu, select Tools | CocoaPods | Install.

How do you add pods to Podfile?

Run open Podfile. Which opens the Podfile in textEdit. Add pod'CorePlot', '~> 1.4' to it and save. Run pod install -- NOTE* that is **pod update if already installed.


2 Answers

In my case, my ruby is installed by rvm. I need to load rvm in to find the pod command.

What I did is add this line #!/bin/bash -l in the beginning of the jenkins job.

like image 113
Mingming Avatar answered Sep 19 '22 14:09

Mingming


Ran into the same problem today, but neither of the solutions worked. What did work was changing the install command.

/usr/local/bin/pod install
like image 42
Rool Paap Avatar answered Sep 16 '22 14:09

Rool Paap