Chapter 5 - Finishing up the Elaboration Phase

The Elaboration Phase is a series of iterations with certain characteristics, having to do with going beyond the prototype (Inception) phase.

Here we are concerned with enhancing the development environment (how to easily update Drupal releases, especially security releases, and how to update modules easily and cleanly. And we move right along with the implementation of the functionality required by the on-line Literary Workshop.

11 July 2009 - Important note on drush -- please read:

Drush is now a standalone script, you install it once and use it on all the Drupal installations you have on the system

See the following:

Use it!

Actual drush command

Hello Victor,

I've just tried to do the og install with the actual drush version (drush-HEAD-all-versions dated 29.04.2009). The pm subcommand is gone and only a download (dl) is left. You need to enable the required modules afterward. The svn arguments however still work. Just for info


Right, drush is in strong development

Thanks so much for your comment and contribution to the Leveraging Drupal workshop!

Drush is in strong development and has changed its character as a module within a given Drupal instance to that of a standalone "shell" capable of being used by all installations on a server.

As a result the installation procedure and the syntax has evolved, as you point out; I will be posting here a complete Drush tutorial based on these changes and advances.

There is a separate command to enable modules, however, right from the Drush command line:

$drush enable

Very cool!

Thanks again,


Drush install Organic Groups (type p.120)

You had drush pm install og--svnsync --svncommit ... there should be a space after og I believe.

I ran this in my sites/module folder and it worked:

drush/drush.php -v pm install og --svnsync --svncommit --svnmessage="Installed og module"


That's right, thanks so much for pointing that out!

It's so great you are working your way through the book!

What page is that on?

This is an errata on Page 120

That's right!

The statement involving views is OK, the error is with og.

Thanks again.

drush alias

I'm not using a dedicated server, (using a friend's server, so he can help me with anything that needs to be run as root). I've followed the book and Drush's documentation page. Tried both the alias and the link method but couldn't get drush to work:

There was no .bash_aliases file so I created one in ~/ (/home/myusername) foler:

$ alias drush='php sites/all/modules/drush/drush.php'

ln sites/all/modules/drush/drush.php /usr/bin/drush
ln: creating hard link `/usr/bin/drush' to `sites/all/modules/drush/drush.php': Invalid cross-device link

I can still use drush by typing the whole ./sites/all/modules/drush/drush.php but I really hope to get it to work. Hope you can help. Thanks.

You need to have the .bash_alias invoked

You need to have the .bash_alias invoked by some login/session terminal script.

In my case (Ubuntu 8.04), the .bash_aliases file is invoked by my .bashrc script.

I found that out by doing:

$ grep .bash_aliases .*

I got:

$ grep .bash_aliases .*
.bashrc:# ~/.bash_aliases, instead of adding them here directly.
.bashrc:#if [ -f ~/.bash_aliases ]; then
.bashrc:# . ~/.bash_aliases

Notice that the invocation of .bash_aliases is commented out by default.

If you remove the "#" comment markers, you should be all set to go.

If you are using a different Linux distribution, and there is no mention of .bash_aliases, then invoke them in the same way in the .profile file or wherever aliases are specified.

You can also put the aliases directly in the .bashrc file.

Hope that helps.

Still no luck

(I think I have a pretty standard shared hosting set up, so hopefully these comments will help some others.) Here's my .bashrc file:

# .bashrc

# User specific aliases and functions

# Source global definitions
#if [ -f /etc/bashrc ]; then
# . /etc/bashrc

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases

The first 8 lines was there by default, I commented them out and add the last 3 lines.

Then, in the ~/.bash_aliases I created, I tried 2 different ways:

alias drush='php public_html/drupal/sites/all/modules/drush/drush.php'

alias drush='php sites/all/modules/drush/drush.php'

Still, when I go inside the ~/public_html/drupal/ folder and type drush help, I get an error:

-jailshell: drush: command not found

OK, it was your last line that gave the clue

Ask your hosting company to allow you to execute command line php.
What's happening is that the jailhouse program is preventing you from doing so.

So your aliases are working fine, now, if that is any consolation.