I had the same issue with the Moto X and MacBook Pro. I tried many suggestions (installed Android File Transfer, tried different USB ports on my computer, Settings => Storage => USB computer connection => switched between MTP and PTP, etc.). None of these recommendations helped.
It finally worked when I tried using a different micro-usb cable .
Bizarre You first want to enable Developer Options first by going to Settings => About Phone => by pressing Build number 7 times to display Developer Options . From there you want to enable USB debugging .
source share