title: Pod Install in Xcode Bots Trigger
body: <p>I started the pre integration trigger with the following</p>
  
  <pre><code>cd "${XCS_PRIMARY_REPO_DIR}"
  pwd
  pod install --verbose
  </code></pre>
  
  <p>And it gave me </p>
  
  <pre><code>pod: command not found
  </code></pre>
  
  <p>Simple right? Can't find the pod binary so, I'll just point it over to the path. Easy.</p>
  
  <pre><code>cd "${XCS_PRIMARY_REPO_DIR}"
  pwd
  /usr/local/bin/pod install --verbose
  </code></pre>
  
  <p>Which gives me the following</p>
  
  <pre><code>env: ruby_executable_hooks: No such file or directory
  </code></pre>
  
  <p>This makes me think ruby isn't set up right to run for the triggers. Now understand a simple "pod install" in the terminal of the build server fixes all this and runs fine and dandy. The project definitely builds properly on the build server.</p>
  
  <p>So since I think the environment is messed up, I'll try to run it from the wrapper directory, that should set up good and nice. That's what it's made for right? This worked historically whenever I needed ruby to run in a run script phase of the build. So here we go on the trigger.</p>
  
  <pre><code>~/.rvm/wrappers/ruby-2.2.3@global/pod install
  </code></pre>
  
  <p>I test this one in the terminal of the build server and it's cool with it, so I put it into the trigger and I get this</p>
  
  <pre><code>/Users/XcodeServer/.rvm/wrappers/ruby-2.2.3@global/pod: line 7: exec: pod: not found
  </code></pre>
  
  <p>:/  Alright I crack up the pod source and see what it says on line 7 </p>
  
  <pre><code>exec pod "$@"
  </code></pre>
  
  <p>I'm not a ruby person but it didn't mean anything to me. Oh yeah and I tried downloading cocoapods directly into usr/local/bin, rather than letting it install into some other directory, by first uninstalling all cocoapods and then by doing the following</p>
  
  <pre><code>sudo gem install -n /usr/local/bin cocoapods --pre
  </code></pre>
  
  <p>I put --pre because I needed 1.1.0.rc.2 to fix a bug with building swift 3. Any who, it all doesn't work. It seems like everyone else can simply put </p>
  
  <pre><code>cd /path/to/proj/
  pod install
  </code></pre>
  
  <p>into their Xcode bot triggers and have them work. </p>