0

I am currently running on a MacBook Pro with OS X 10.10 (Yosemite). That is the host machine and OS. I am using a synced folder between the host and my VM, which is running Laravel's Homestead VM (Ubuntu instance).

The project is a Drupal 7 project and I am running the latest version of Drush installed both on Mac OS X (via homebrew) and within the VM (I can't remember how I ended up installing it there). Very new setup, had the machine for a week and a half. Setup this way for maybe a week.

I am able to access and load the site just fine from the VM in my browser. It works great there. But, when I go to use drush against it (both in the VM and in Mac OS) it doesn't seem to give me most of the options.

Within the VM (ssh'ed in) I run "drush pml". Below is the message I get.

Command pm-list needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.                     [error]
The drush command 'pml' could not be executed.

I get the same message in Mac OS X. I am running the command from the docroot folder where drupal is installed. Not sure why this is. I could see it happening in the host OS. But it SHOULD be working within the VM that is running it and has the DB installed.

I haven't used Drush or Drupal for 2 years. So I probably forgot an obvious config or something. Please help me out here.

Thanks!

  • If you are in docroot then the most likely cause is multiple site definitions which mean drush can't tell which is active. You may need to supply the -l or --url parameter to dismbiguate if that is the case. Alternatively have you tried running from the folder where the settings.php is stored? – Alfred Armstrong Mar 20 '15 at 14:53
  • I had not tried running from that folder. I actually forgot that this was essentially setup as a multi-site. Had to configure the drushrc file for it with the URL/site-alias to fix it. If you put that in as an answer I will accept it as the answer. – Patrick Mar 20 '15 at 15:05
2

If you are in docroot then the most likely cause is multiple site definitions which mean drush can't tell which is active. You may need to supply the -l or --url parameter to disambiguate if that is the case.

In your drushrc file you can set up parameters so as to avoid having to keep supplying the parameter explicitly.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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