0

I am working with drupal 8, MAMP version 3.5, and drush version 8.1.3. I have installed drush globally and when I enter drush st it gives me complete information and shows that drush is installed but when I run drush cc, it gives me only two options

  1. cancel
  2. drush

whereas, it is suppose to give me many options. I am in a root folder of the site I am working on .i.e. /Applications/MAMP/htdocs/mysites/mysite. My OS is OSX on macbook pro, just in case if this is mac specific issue.

Done with this step as well:

sudo ln -s /Applications/MAMP/tmp/mysql /var/mysql

Not sure what else to look into, can you anyone please guide? I am new to drush, terminal and mac

5
  • 1
    Is the drupal site running? Commented Aug 16, 2016 at 7:54
  • Yupx ! drupal site is running fine :)
    – atif
    Commented Aug 16, 2016 at 8:15
  • does the directory you are in include an index.php file? (ls -l to list files) Commented Aug 16, 2016 at 8:51
  • Yupx it does have index.php file in that directory which illustrates that I am in root directory :)
    – atif
    Commented Aug 16, 2016 at 8:57
  • sorry, just wanted to be sure :) Commented Aug 16, 2016 at 8:57

2 Answers 2

1

Use drush cr (container rebuild) rather than drush cc (clear cache) for drupal 8.

2
  • Got this error: exception 'PDOException' with message 'SQLSTATE[HY000] [2002] No such[error] file or directory' in /Applications/MAMP/htdocs/mysites/mysite/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php:142
    – atif
    Commented Aug 16, 2016 at 9:11
  • I have resolved the error mentioned in above comment, now drush cr works but drush cc still gives only two options
    – atif
    Commented Aug 16, 2016 at 9:30
0

I found a solution which worked for me on this link : https://www.drupal.org/node/1016268#comment-10466949

And the proposed solution on comment # 31 was:

  1. Add this to your .bash_profile export PATH=/Applications/MAMP/Library/bin/:$PATH
  2. run this then in terminal source ~/.bash_profile

It ended my 3 days search to resolve my issue.

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.