Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm currently working on a few sites in development using Acquia Dev Desktop.
Even the latest version uses Drush v.5.7, and I know that Omega 4 requires v.5.9. I have installed v.5.9 in my root user folder (since upgrading Drush in the Dev Desktop wasn't working). Is there a way to toggle between different versions of Drush? I want to be getting some new projects underway using Omega 4, and my current Drush setup isn't allowing me to create subthemes or do any other Omega-specific tasks via Drush...
Comments
Comment #1
fubhy CreditAttribution: fubhy commentedYour best bet would be to trick Drush like so:
Add a omega.drush.inc to
sites/all/drush
and include../themes/omega/includes/omega.drush.inc
from there. ;)Yes, this should work (it's a site-specific drush.inc file that, due to carrying the same name as "omega" should be able to include the omega.drush.inc and thereby make it available even though your drush version does not support theme-command discovery).
Comment #2
karolus CreditAttribution: karolus commentedThanks for the response--
I did reinstall Acquia Dev Desktop, and did an install of a new Drupal (7.23) site. Went and installed Omega via the GUI (Omega 4, beta 6). Created the omega.drush.inc file, and added the line of code.
Went into Terminal, cleared the Drush cache.
No finding of Omega commands--back to where I was before. (Entering drush version in Terminal indicated v. 5.7)
Is there some step I'm still missing?
Comment #3
fubhy CreditAttribution: fubhy commentedNo. Please check if the omega.drush.inc in sites/all/drush/omega.drush.inc is actually loaded by drush (just place a "echo 'hello I am being loaded.'" in it.
What you need in the file, normally is just this:
Note: I am just guessing based on what I know about drush command discovery. It finds all files ending in ".drush.inc" and takes the prefix (omega in this case) as the name for the hooks, etc. that it then invokes to gather the commands. Now, since you name the file omega.drush.inc it will try to invoke the drush hooks in there which should be there since you included omega.drush.inc from the theme folder. So it _SHOULD_ work.
Please report back if this works for you.
Also, I am not really sure if 5.7 even needs this. No idea when this feature (drush theme command discovery) was added. I think 6.0 but I might be wrong.
Comment #4
karolus CreditAttribution: karolus commentedThanks--
Added your code, and am getting the echo response when checking drush status in Terminal. I also went in, and manually upgraded Drush in DAMP to 5.9, and it appears to be functioning normally. I can use the command
drush dl omega
-- which works properly. When I use the commanddrush omega-subtheme
, I'm getting this response in Terminal:I went ahead and followed the directions, which listed the following:
https://drupal.org/node/1428638
Changing the settings.php file as suggested only listed fatal errors, so I commented all changes back out.
Comment #5
fubhy CreditAttribution: fubhy commentedFirst of all, please use drush omega-wizard instead. And secondly: is the Drupal site already installed? You have to fully install drupal before these commands can work.
Comment #6
karolus CreditAttribution: karolus commentedThanks--
Running drush omega-wizard produced the same errors as in my post above.
As far as fully installing Drupal--I have a working site running in my local dev environment. Aside from the issues I'm having with Omega, I can't see any other problems... Is there an alternate type of installation you would recommend?
Comment #7
fubhy CreditAttribution: fubhy commentedDo other drush commands work? Like... "drush uli" or "drush cc all"?
Comment #8
karolus CreditAttribution: karolus commenteddrush cc all works fine, but drush uli gives the same error. Is there another setting in .bashrc I should change, or something else?
Also, drush status and which drush indicate all is fine.
I had reinstalled Acquia DAMP yesterday, and upgraded the drush version in that build to 5.9. Had even set up another environment in MAMP. Is there another avenue you would suggest?
Comment #9
fubhy CreditAttribution: fubhy commentedYep. So that means this is absolutely not related to the Drush version or Omega in any way and rather means that there is something wrong with your setup. I'd suggest you file this as a support request in the Drush issue queue instead. I can't really provide more help on this as it's not related to Omega and I don't have the time to look that deeply into Drush to debug it right now. Sorry.
Comment #10
karolus CreditAttribution: karolus commentedThank you--will do...
Comment #11
karolus CreditAttribution: karolus commentedOK--
Did a lot of research (mainly trial-and-error) and was plenty frustrating, but:
I uninstalled and reinstalled all necessary apps (Acquia DAMP, MAMP, PEAR, Drush {even upgraded to the 6.x dev}). Going through all instruction steps still indicated the same issues, where
drush status
would often indicate a bootstrap issue. Knowing that a DB issue would affect more than just Omega work, I tested for other DB issues. I tried a number of different settings for the drush configs in my system root folder and in /sites/settings.php, as well. Nothing worked here. Also discussed it with other devs at a drupal event last night, and more late searching.Back to square one, though, this morning--with a fresh install of a new Drupal 7.23 core into Acquia DAMP. Checked over the site files after setup (keeping in mind the issue was related to DB). In the Acquia install, there is a [your sitename].locahost folder created with its own settings.php file with auto-generated values. All I did was copy this settings.php file to the sites/default folder. Ran
drush cc drush
, then navigated to the site in Terminal. Runningdrush omega-wizard
worked without a hitch, then. To be sure, I created another site, and repeated the same process--all fine.From what I could tell, the issue stemmed from Drush/Omega looking for the site and DB settings in the sites/default folder, while the Acquia DAMP Drupal install could work fine by referencing these settings from [your sitename].locahost folder it created...