In order for Appium to work it needs to know where Andriod is. Open .bash_profile and update.
export ANDROID_HOME ~/Library/Android/sdk
export PATH $PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools
Mac example above
https://developer.android.com/tools/variables
Before you can run your tests you need to ensure Appium is running
appium
Default port for Appium is 4723
bundle exec ruby main.rb
https://docs.aws.amazon.com/devicefarm/latest/developerguide/test-types-appium.html https://appium.io/docs/en/2.0/quickstart/test-rb/