2

I have a multisite installation on Windows 7. I am now trying to execute the drush omega-guard command on an Omega sub-theme.

When I am in the theme folder (sites\all\themes\theme_name) I get the response "The drush command 'omega-guard' could not be found."

When I am in the site folder (sites\site_name.com) omega-guard prompts me with "Which theme do you want to run Guard for?" Once I choose the number for my sub-theme, it responds with "Could not locate Gemfile." I think the Gemfile should be in my theme directory.

What am I doing wrong?

3
  • 1
    I don't know about your Gemfile issue, but as for Drush not finding the omega-guard command unless you are in your sites folder, that is because Drush needs you to specify --uri=site_name.com, unless it can determine the site to use via your cwd. --uri is not necessary if you have a 'default' site, but it is necessary if you use any other name for your site folder, even if you only have one site in the Drupal installation. Commented Dec 11, 2013 at 22:44
  • That did it! I went back to my sites\all\themes\theme_name directory and typed drush --uri=http://site_name.com omega-guard and it worked.
    – Aaron
    Commented Dec 11, 2013 at 23:13
  • @greg_1_anderson seems your comment is the answer, so maybe you could put it as an answer? So we can have this question out of "unanswered" lists?
    – Mołot
    Commented Nov 17, 2014 at 13:51

2 Answers 2

1

Answer from the comments above, documented here per Molot's request:

In the case where your settings.php file is not in the 'default' folder, Drush needs you to specify --uri=site_name.com, unless it can determine the site to use via your cwd (e.g. if you have set your working directory to sites/site_name.com, as described in the question). --uri is not necessary if you have a 'default' site, but it is necessary if you use any other name for your site folder, even if you only have one site in the Drupal installation.

Seems that the problem with finding the Gemfile was resolved by always setting the working directory to the theme directory, where the Gemfile was located. Doing this while using --uri with Drush solved the problem.

0

I had this problem just now, and running drush cc all fixed it for me. I'm running drush omega-guard from within the custom theme's directory.

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.