2

I just installed drush 7.0-dev and with it all the composer and bash-completion goodness. The installation went well and in a new shell it (drush 7) is now my default drush.

However it doesn't seem to want to take commands without aliases. Is this really the new behavior or did I setup something wrong?

Here is a screenshot of a simple "drush dd files" command executed in my sites drupal root path. I compare it to the drush 6 version which works fine without an alias.

Don't get me wrong I like aliases and all but this seems a bit draconian to force you to have to use them.

I am in within a drupal site

4
  • Was drush working before w/o aliases? Are your sites in sites/default or somewhere else?
    – mpdonadio
    Commented Apr 19, 2014 at 12:25
  • Yes drush 6.2.0 was and is working without aliases, as is obvious from the screenshot above. Commented Apr 21, 2014 at 16:56
  • Sorry, couldn't read screenshot on my tablet. After you did the update, did you do a drush cc drush? I have a server with a few versions of drush on it, and can't reproduce this.
    – mpdonadio
    Commented Apr 21, 2014 at 19:42
  • No worries @MPD. I had not done the 'drush cc drush' command before. However I just tried it and it didn't help. The strange thing is that a "drush st" works for the site without an alias. I tried pasting the output of it but stackexchange said it's 1900 characters too long :P. Commented Apr 22, 2014 at 23:17

1 Answer 1

0

You need to specify path or create sym link based on your server os.. Check Drush Installation instructions for more details..

It's documented in Github page to under Install Manual..

Configure your system to recognize where Drush resides. There are 3 options:

Create a symbolic link to the Drush executable in a directory that is already in your PATH, e.g.:

$ ln -s /path/to/drush/drush /usr/bin/drush

Explicitly add the Drush executable to the PATH variable which is defined in the the shell configuration file called .profile, .bash_profile, .bash_aliases, or .bashrc that is located in your home folder, i.e.:

export PATH="$PATH:/path/to/drush:/usr/local/bin"

Your system will search path options from left to right until it finds a result.

Add an alias for drush (this method can also be handy if you want to use 2 versions of Drush, for example Drush 5 or 6 (stable) for Drupal 7 development, and Drush 7 (master) for Drupal 8 development). To add an alias to your Drush 7 executable, add this to you shell configuration file (see list in previous option): $ alias drush-master=/path/to/drush/drush

For options 2 and 3 above, in order to apply your changes to your current session, either log out and then log back in again, or re-load your bash configuration file, i.e.:

$ source .bashrc

NOTE: If you do not follow this step, you will need to inconveniently run Drush commands using the full path to the executable "/path/to/drush/drush" or by navigating to /path/to/drush and running "./drush". The -r or -l options will be required (see USAGE, below).

Test that Drush is found by your system:

$ which drush

2
  • It doesn't seem to be the problem, since drush --version returns 7.0-dev as version.
    – avpaderno
    Commented Apr 19, 2014 at 6:31
  • Right @kiamlaluno, the executable being found is not the problem as is obvious from the drush --version output. Commented Apr 21, 2014 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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