2

I'm trying to learn to to use drush.

I installed composer to my $HOME/bin/directory:

$ ls ~/bin
composer  composer.phar  subl  sublime  sublime_config.sh  sublime_text

Then I tried to install drush globally:

$ composer global require drush/drush:dev-master
Changed current directory to /home/nnieto/.composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing pear/console_table (1.1.5)
    Downloading: 100%         

  - Installing symfony/yaml (v2.2.1)
    Downloading: 100%         

  - Installing d11wtq/boris (v1.0.8)
    Downloading: 100%         

  - Installing drush/drush (dev-master 31fa220)
    Cloning 31fa220c9ee33a250d135ad0d65b5b6c92c6c188

pear/console_table suggests installing pear/Console_Color (>=0.0.4)
drush/drush suggests installing youngj/httpserver (dev-master#41dd2b7 as 1.0.1)
Writing lock file
Generating autoload files

I expected to find a drush file on ~/bin, but instead I got a nope from Linux:

[nnieto@localhost ~]$ ls ~/bin
composer  composer.phar

What am I doing wrong?

6

Composer downloads things and puts them where you (read: your composer/project settings) tells them to go; or in the default location if you haven't specified. It won't assume you want to link anything from the downloaded library into /usr/bin, though this could theoretically be done through a post-install-cmd in your composer.json file.

If you install something globally you'll find it in ~/.composer/vendor/ (the Drush executable will probably be in ~/.composer/vendor/bin/drush).

You've probably missed this important step from the instructions to install Drush via Composer:

Make sure Composer's global bin directory is on the system PATH

Once Composer's global bin path is in your system path, the drush command will start working immediately.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.