Undefined error: 0 OR Unable to load autoload.php. Drush now requires Composer I've installed drush in /usr/local/lib/drush/drush and composer in /usr/local/bin/composer.

When I try to run drush /usr/local/lib/drush/drush I get the following:


  /usr/local/lib/drush/drush: line 129: /Applications/MAMP/bin/php/php5.2.17/bin: is a directory /usr/local/lib/drush/drush: line 129: exec: /Applications/MAMP/bin/php/php5.2.17/bin: cannot execute: Undefined error: 0 – 


OR the following:


  Unable to load autoload.php. Drush now requires Composer in order to install its depedencies and autoload classes. Please see README.md


What am I doing wrong? I'd like to install drush to use with MAMP if anyone has any suggestions. I've done through the readme and nothing seems to be working.
Drush switched to requiring composer. The documentation provides details on how to install both composer and drush, but it boils down to:


Install composer globally:

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Install drush globally (for your user), you can specify the version:

composer global require drush/drush:6.*

Add the composer path to your path (in your .bashrc or .zshrc or other):

export PATH="$HOME/.composer/vendor/bin:$PATH"