Drush & Drush Make on Mac- How to setup and use 'Drush Make'?

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
spessex's picture

Hi everyone

Another question for anyone out there that understands 'Drush Make'.

I have Drush setup (Mac OSX) and am pretty competent in using it. The issue I now have is that I'm a little unsure as to how to get 'Drush Make' working which I require to save time on Drupal site setups. I've looked for videos etc (this is the way that I managed to get Drush running correctly) but have been unable to find a good example that I understand.

Does anyone know of an absolute idiot proof tutorial or perhaps can post an easy to follow guide?

Any help will be much appreciated

Thank you

Stephen

PS I actually think I understand how to use 'drush make' to a certain extent, it's just getting it working that I'm having difficulty with.

PPS I currently have Drush installed from my Home directory in a separate 'dev' folder (terminal has been setup for this) and am unsure if it's as simple as dropping the un-tarred Drush Make folder into this?

Comments

Managed to find these

spessex's picture

Managed to find these tutorials which really helped so I'm pretty much sorted now (all I could do with now is someone posting an example 'make' file for me to study as I haven't been able to find a decent example yet).

Part 1

http://www.youtube.com/watch?v=qOb0HfU3wWc

Part 2

http://www.youtube.com/watch?v=Iz5ODKwoaek&feature=related

Also, the following was quite useful so I could see hidden files:

http://www.brooksandrus.com/blog/2007/03/23/mac-os-x-show-hide-hidden-fi...

I am glad you sorted out

shrop's picture

I am glad you sorted out installing Drush and Druah Make. This is a bit late to the discussion, but I did want to mention another option. I install both using Hombrew (https://github.com/mxcl/homebrew). Once you have Homebrew installed, it is as simple as "brew install drush" at the commend line. That package has drush make built in. Since Homebrew pulls packages with git, you can even branch it and add your own Drush commands.

Thanks!
Shrop

Does Homebrew also require XCode?

Cliff's picture

Going to the HomeBrew site, I see that it might require XCode also?

Which requires OS 10.6.6 and costs $4.99 at the App Store... Just checking before I postpone this project and do a (long overdue) system upgrade instead. :-/

XCode should be on your

robcarr's picture

XCode should be on your original OSX install DVD. Alternatively, register on http://developer.apple.com/ and you can download the most recent version for free - all 4.1GB of it. And OS 10.7 Lion is probably going to be released this week too (only via the App store too). So may be worth hanging on.

I thoroughly recommend Homebrew for installing other cool stuff like Git, wget etc.

No Install DVD...

Cliff's picture

At least I don't think I have one for my MacBook Pro, or my wife's MacBook, for that matter. But I am about to upgrade to Snow Leopard (yeah, it takes me a while to get around to some things), so perhaps it will show up when I do.

FWIW, I did search my system for XCode and found zilch. :-(

Registering as a "developer" (me? yeah, right!) is free? I didn't realize that. Thanks!

Getting a few errors on my

spessex's picture

Getting a few errors on my 'make' file which I can't quite figure out.

If any one could advise it would be great. I have included the terminal read out followed by the 'make' file to see if anyone can spot anything obvious?

Terminal read out is:

stephen-essexs-macbook-pro-135:~ steessex$ cd /Applications/MAMP/htdocs/TheViewingStudio
stephen-essexs-macbook-pro-135:TheViewingStudio steessex$ drush make /Users/steessex/drushProfiles/drupal.make y
Project information for drupal retrieved. [ok]
Could not retrieve version information for googleanalytics. [error]
Non-existent project type on project wysiwyg [error]
Project information for smtp retrieved. [ok]
Invalid version 7.x-1.x-dev for smtp. [error]
Non-existent project type on project wysiwyg [error]
Project information for xmlsitemap retrieved. [ok]
Invalid version 7.x-2.0-beta2 for xmlsitemap. [error]
Non-existent project type on project wysiwyg [error]
Project information for advanced_help retrieved. [ok]
Project information for auto_nodetitle retrieved. [ok]
Project information for calendar retrieved. [ok]
Project information for ctools retrieved. [ok]
Project information for date retrieved. [ok]
Project information for hierarchical_select retrieved. [ok]
Project information for jquery_update retrieved. [ok]
Project information for link retrieved. [ok]
Project information for options_element retrieved. [ok]
Project information for page_title retrieved. [ok]
Project information for pathauto retrieved. [ok]
Project information for select_or_other retrieved. [ok]
Project information for taxonomy_manager retrieved. [ok]
Project information for taxonomy_menu retrieved. [ok]
Project information for token retrieved. [ok]
Project information for views retrieved. [ok]
Project information for webform retrieved. [ok]
Project information for webform_validation retrieved. [ok]
Project information for wysiwyg retrieved. [ok]
drupal downloaded from [ok]
http://ftp.drupal.org/files/projects/drupal-7.4.tar.gz.
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to a member function make() on a non-object in
/Users/steessex/.drush/drush_make/drush_make.drush.inc, line 235
stephen-essexs-macbook-pro-135:TheViewingStudio steessex$

Make file:

; Core version; --------------

core = 7.x

; API version; --------------

api = 2

; Modules; --------------

projects[] = advanced_help
projects[] = auto_nodetitle
projects[] = calendar
projects[] = ctools
projects[] = date
projects[drupal][version] - 7.2
projects[] = email
projects[googleanalytics][version] = 7.x-1.2
projects[] = hierarchical_select
projects[] = jquery_update
projects[] = link
projects[] = options_element
projects[] = page_title
projects[] = pathauto
projects[] = select_or_other
projects[smtp][version] = 7.x-1.x-dev
projects[] = taxonomy_manager
projects[] = taxonomy_menu
projects[] = token
projects[] = views
projects[] = webform
projects[] = webform_validation
projects[] = wysiwyg
projects[xmlsitemap][version] = 7.x-2.0-beta2

Kind of sorted this now.

spessex's picture

Kind of sorted this now. Removed the modules that were causing the errors and this then ran correctly. However, still trying to work out how to pull these modules in without the errors?

Remove the '7.x-' bit from

james.williams's picture

Remove the '7.x-' bit from the versions of modules you specify a version for. Drush knows you're using Drupal 7, so it doesn't want to see that in the module version string. (If you were using Drupal 6, it would be the same).

e.g.
projects[googleanalytics][version] = 1.2

<

p>ComputerMinds - visit us at http://www.computerminds.co.uk. We at ComputerMinds pride ourselves on offering quality <a href="http://www.computerminds.co.uk/drupal-train

Cheers James. I'll take a

spessex's picture

Cheers James. I'll take a look at this and give it a try :)

Quickstart as an alternative

budda's picture

I avoided messing up my Mac setup and just used the excellent self-contained http://drupal.org/project/quickstart project which puts Drupal and all the tools in to a VirtualBox instance.

The "drush quickstart-create all" is superb for building new quick sites from the command line.

Thanks for the tip!

Cliff's picture

I will definitely give that a try!