Clear contact list via ADB - ruby code > Appium > Phone

Hello,
I want to run adb command via ruby code in setup:
ruby code > Appium > real phone
I used example with deleting contact list like:

system “adb shell pm clear com.android.providers.contacts”

what I see in logs is:
warning: Insecure world writable dir /usr/local/sbin in PATH, mode 040777
ADB server didn’t ACK

  • failed to start daemon *
    error:
    cannot bind ‘tcp:5037’: Address already in use
    adb server is out of date. killing…

Does please anybody can help me how to call from ruby code some adb command? Should I use some gem?

Thanks!

Please refer this