Edit: re-wrote intro paragraph to highlight the installation of composer - I suspect composer may have broken drush.
I want to test out elastic search with D7. I used drush to install a fresh D7 install, then views, elasticsearch_connector, libraries. At that point Watchdog indicated that I was missing the elasticsearch-php library.
I tried to follow Elasticsearch's instructions on getting this library and installed composer:
/sites/mysite $ curl -sS https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...
Composer successfully installed to: /sites/aarp/composer.phar
Use it: php composer.phar
/sites/mysite $ sudo mv composer.phar /usr/local/
I added an alias for composer to my ~/.profile
. I have not been able to use any drush commands since (see below). I have since discovered that composer can be used to install drush so now I suspect this is the root of my trouble.
/sites/mysite $ drush en composer_manager -y
composer_manager was not found. [warning]
The following projects provide some or all of the extensions not found: [ok]
composer_manager
Would you like to download them? (y/n): y
cProject composer_manager (7.x-1.7) downloaded to sites/all/modules/composer_manager. [success]
dThe following extensions will be enabled: composer_manager
Do you really want to continue? (y/n): y
composer_manager was enabled successfully. [ok]
One or more extensions have dependencies managed by Composer.
Update packages managed by Composer? (y/n): y
Download and install the Drush Composer extension? (y/n): y
Directory /Users/mmutrux/.drush exists, but is not writable. Please check directory permissions. [error]
Project composer (8.x-1.x-dev) could not be downloaded to /Users/mmutrux/.drush/composer. [error]
The drush command 'composer' could not be found. [error]
/sites/mysite $ chgrp _www /Users/m
macadmin/ mmutrux/
/sites/mysite $ chgrp _www /Users/mmutrux/.drush/
chgrp: you are not a member of group _www
/sites/mysite $ chgrp _www /Users/mmutrux/.drush/
/sites/mysite $ chmod 777 /Users/mmutrux/.drush/
chmod: Unable to change file mode on /Users/mmutrux/.drush/: Operation not permitted
/sites/mysite $ sudo chmod 777 /Users/mmutrux/.drush/
Password:
/sites/mysite $ drush en composer_manager -y
The drush command 'en composer_manager' could not be found. Run `drush cache-clear drush` to clear the commandfile cache if you have installed new extensions. [error]
/sites/mysite $ drush cache-clear drush
The drush command 'cache-clear drush' could not be found. Run `drush cache-clear drush` to clear the commandfile cache if you have installed new extensions. [error]
Where'd my drush go??
Edit: added in response to comments
/sites/mysite $ which drush
/opt/local/bin/drush
/sites/mysite $ drush --version
The drush command 'version' could not be found. Run `drush cache-clear drush` to clear the commandfile cache if you have installed new extensions. [error]
/sites/mysite $ sudo drush --version
The drush command 'version' could not be found. Run `drush cache-clear drush` to clear the commandfile cache if you have installed new extensions. [error]
/sites/mysite $ drush --version -v
Initialized Drupal 7.35-dev root directory at /sites/aarp [notice]
Initialized Drupal site default at sites/default [notice]
The drush command 'version' could not be found. Run `drush cache-clear drush` to clear the commandfile cache if you have installed new extensions. [error]