1

I've installed Drupal 7, Drush 7.0 and the Omega 4 theme. I'm using MAMP. I'm attempting to create an Omega subtheme with the command line:

drush omega-wizard

I then receive the following error.

screenshot

When I run drush --debug, this is the result. Can anyone decipher this?

screenshot

2
  • Are you in or below your Drupal root when you run drush? May 22, 2014 at 23:05
  • I'm in the drupal root folder. so its: /Applications/MAMP/htdocs/testsite1 (which is the folder) May 22, 2014 at 23:31

3 Answers 3

1

Is your settings.php file in a folder called 'default'? If not, you might need to tell Drush where to find it by using --uri=mysite.com or -l mysite.com.

See: Drush Bootstrap Error on Multi-Site Install

4
  • Nope, my settings.php is in the default file, along with default.settings.php May 23, 2014 at 0:05
  • does the fact that I'm using MAMP matter? May 23, 2014 at 0:22
  • try to execute drush from the folders that have your settings file May 23, 2014 at 2:47
  • I tried that too... same errors as the screenshot. May 23, 2014 at 15:55
0

You need to make sure drush uses the exact same php as MAMP is configured for. Start with

which php

and make sure it is the one configured within MAMP. Edit the PATH variable in .bashrc or whichever other shell config file you have active on your Mac account. Your screenshot seems to imply you've got this covered, but double check nonetheless.

Next run

drush status

and check whether drush fully bootstraps Drupal, indicated by successful connection to the database. (BTW: You should not connect to the database as root, not even on your laptop.) Run this inside sites/default to really be sure you are picking up every bit of configuration detail while you figure out issues.

As a last resort follow up on the links your error message spewed out.

2
  • OK - I followed all that, executed in the sites/default folder with the same result. I'm going to check out the error message links - frustration setting in! Note: drush seems to be executing fine within the root directory, but just doesn't seem to be "talking" to drupal... ie doesn't recognize that it's a drupal site. May 23, 2014 at 15:57
  • UPDATE: I also tried forcing 127.0.0.1 instead of localhost... no dice on that either. May 23, 2014 at 16:08
0

I had this same issue. The debug output showed that drush couldn't find a path to MySQL, so I created a symbolic link to mysql in /usr/bin to resolve the issue as such:

sudo ln -s /Applications/MAMP/Library/bin/mysql /usr/bin/mysql

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.