title: Appium - xcode-select threw an error: command not found
body: <p>I am attempting to use Appium to test my app on the ios simulator on my mac OS X 10.9.3. I can start the server fine but when I attempt to run my test I receive the following error:</p>
  
  <pre><code>info: [debug] Error: xcode-select threw an error
      at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/helpers.js:499:10
      at ChildProcess.exithandler (child_process.js:652:7)
      at ChildProcess.emit (events.js:98:17)
      at maybeClose (child_process.js:756:16)
      at Process.ChildProcess._handle.onexit (child_process.js:823:5)
  info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: xcode-select threw an error)","origValue":"xcode-select threw an error"},"sessionId":null}
  info: &lt;-- POST /wd/hub/session 500 31.780 ms - 176 
  
  error: xcode-select threw error Error: Command failed: /bin/sh: xcode-select: command not found
  </code></pre>
  
  <p>I have checked the bin/sh folder and my xcode-select file does not live there, instead it is located at /usr/bin.</p>
  
  <p>Do I need to configure appium to look in the usr/bin folder for the xcode-select file? If so how do I do this?</p>
  
  <p>Or is there something else I need to do?</p>
  
  <p>Other Information:
  I am using zsh and in my .zshrc file I have the following listed: </p>
  
  <pre><code>export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
  </code></pre>
  
  <p>(not sure if that information is useful or not)</p>
  
  <p>Also I am using rspec/capybara for my tests. I have added the appium_capybara gem and it installed all other required gems. I have added the following driver information:</p>
  
  <pre><code>desired_caps_ios = {
            platform:        "Mac",
            deviceName:      "iPhone Simulator",
            platformName:    "iOS",
            platformVersion: "7.1",
            app:             "/Applications/Appium.app/Contents/MacOS/my appname/Payload/appname.app"
        }
  
        url = "http://localhost:4723/wd/hub" # or a sauce labs url
  
        Capybara.register_driver(:appium) do |app|
          appium_lib_options = {
              server_url:           url
          }
          all_options = {
              appium_lib:  appium_lib_options,
              caps:        desired_caps_ios
          }
          Appium::Capybara::Driver.new app, all_options
        end
  
        Capybara.default_driver = :appium
  </code></pre>