Question

My question is really as it is stated in the title.

I use MacOSX and the Acquia Developer Desktop for running my Drupal sites that I develop locally.

I'd love to try out the new Drush 7, but I can't get it to 'upgrade' from Drush 6 to Drush 7.

I've tried:

  1. cd into my /Applications/dev desktop
  2. removing the drush folder
  3. replacing it with a fresh .zip from GitHub

Ofcourse, when entering "drush" I get the message that I should have used Composer instead.

Installing with composer seems to work, but it doesn't install Drush 7 in my Application/Dev Desktop(/drush) folder, so it's of no use to me.

How do I force Composer to put drush in this specific directory? I get confused by all the configuration files and what to put in them. Is there something like > composer install drush --right-here ?

EDIT

After Clide's helpful answer, I get Drush version 7 running. I checked the version using "drush version". However, when I try a real drush command ( drush en -gmap, in this case), I get the notorious "Command pm-enable needs a higher bootstrap level to run" error.

I invoke the command line from within the Acquia application, so the PATH should be correct. I also tried specifying the URI, and also that looks okay. I'll copy some of the output, if that helps.

 Drupal version         :  7.26                                                         
 Site URI               :  http://(sitename).local:8083                            
 PHP executable         :  /usr/local/bin/php                                           
 PHP configuration      :  /usr/local/etc/php/5.3/php.ini                               
 PHP OS                 :  Darwin                                                       
 Drush version          :  7.0-dev                                                      
 Drush temp directory   :  /tmp                                                         
 Drush configuration    :                                                               
 Drush alias files      :                                                               
 Drupal root            :  /Users/(myname)/Documents/(dev folder)/(sitename)
 Site path              :  sites/(sitename).local
Was it helpful?

Solution

In this context Composer is used to fetch the libraries Drush needs, it doesn't download Drush itself. Running the install process in the Drush root should do the trick:

git clone https://github.com/drush-ops/drush.git drush 
cd drush
composer install

and if you don't already have it

ln -s /path/to/drush/drush /usr/local/bin/drush # or wherever
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top