2

I can't get Drush to do much. I can connect to my site by typing cd and then dragging my files to the terminal window in OSX using Acquia DevDesktop. My overall goal is to create a sub theme of Omega.

When I type drush omega-wizard I get:

The drush command 'omega-wizard' could not be found. Run drush cache-clear drush to clear the commandfile cache if you have installed new extensions. [error]

Drush was not able to start (bootstrap) the Drupal database. [error]

Hint: This may occur when Drush is trying to:

  • bootstrap a site that has not been installed or does not have a configured database. In this case you can select another site with a working database setup by specifying the URI to use with the --uri parameter on the command line. See drush topic docs-aliases for details.
  • connect the database through a socket. The socket file may be wrong or the php-cli may have no access to it in a jailed shell. See http://drupal.org/node/1428638 for details.

I think this means that I haven't shown Drush where the settings file is. For the life of me, I'm not able to do that. Normally, I would do something like:

cd sites/nameofsite.localhost

or

cd site/nameoffolder.localhost

I've tried every iteration of this command: with the localhost, without the localhost, different folder names, etc. I always get "No such file or directory". Can anyone tell me what I'm doing wrong? What does Drush need me to tell it?

Thanks so much in advance,

Jason

10
  • Thanks for the info! Correct me if I'm wrong, but isn't this a two step process? The first step I show Drush where my site is. I have no problem with that. After I do this I can get Drush to do some stuff. The problem begins when I need to download a module or whatever. That's the 2nd step. I end up with an error that states that the command could not be found, or no such file or directory. That's because I need to show it my settings file, I believe. I've tried so many different folder configurations and can't seem to get it right. Can anyone tell me exactly what it should look like?
    – Subcitizen
    Apr 25, 2015 at 0:32
  • In the past, I've used cd sites/nameofsite.localhost, and that worked. I can't seem to get it to work with that. Also, Drush knows what my Drupal root is (/Users/jasonmaier/Sites/devdesktop/drupa l-7.36 ). Why can't it find my setting file?
    – Subcitizen
    Apr 25, 2015 at 0:43
  • Thanks so much Free Radical! I tried cd /Users/jasonmaier/Sites/devdesktop/drupal-7.36/sites/default/settings.php , and got "not a directory". what else should I try?
    – Subcitizen
    Apr 25, 2015 at 1:07
  • I knew that. So, I tried it with no luck. I still can't get drush omega-wizard to run. I get the "The drush command 'omega-wizard' could not be found" etc.
    – Subcitizen
    Apr 25, 2015 at 1:17
  • Sorry Free Radical. The etc. part is the bootstrap part. Here is the full error: The drush command 'omega-wizard' could not be found. Run drush [error] cache-clear drush to clear the commandfile cache if you have installed new extensions. Drush was not able to start (bootstrap) the Drupal database. [error] Hint: This may occur when Drush is trying to: * bootstrap a site that has not been installed or does not have a configured database. In this case you can select another site with a working database setup by specifying the URI to use with the --uri parameter on the command
    – Subcitizen
    Apr 25, 2015 at 1:22

1 Answer 1

1

There is a known problem of using Drush with DevDesktop on MacOSX.

Quick fix

Instead of running drush like this:

$ drush status

Run it like this:

$ DEVDESKTOP_DRUPAL_SETTINGS_DIR="$HOME/.acquia/DevDesktop/DrupalSettings" drush status

Permanent fix

Everything is explained in this article: http://btmash.com/article/2015-03-24/using-dev-desktop-composer-drush

Why is it happenenig?

Acquia DevDesktop keeps all credentials in a specific folder and let PHP have access to that location via a $_SERVER variable called $_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR']. This variable is provided by Apache and PHP only sees it is run by Apache. But when you use Drush, PHP is called directly and that variable does not exists anymore and Drush cannot find the database credentials.

Your Answer

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

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