Recently I started playing with Drupal 8 which currently is at 8.0-Alpha9 as of February 19, 2014. In order to use Drush to interact with a Drupal8 website an installation of Drush version 7 must exist on the server. If you try to install Drupal 8 using a prior version of Drush you may see an error such as:
drush make d8.make d8.dev Beginning to build d8.make. [ok] Aborting. [cancel] Source directory /tmp/make_tmp_138_e0b9/__build__ is not readable or does not exist. [error] Cannot move build into place
I prefer working with Drupal programmatically or via a Shell so we need a newer version of Drush installed. The rest of this article will install a local version of Drush7 and its dependencies.
Installing Drush7 manually and in a local directory:
Drush is on github now: https://github.com/drush-ops/drush
Drush depends on Composer now. I chose to install Composer globally on my system for project use by following these directions https://getcomposer.org/doc/00-intro.md#globally
note: be sure you mv composer.phar under a system-wide $PATH value and renamed it as composer. This was a huge hangup for me because Drush will scan for composer, and not a file named composer.phar for example.
Once composer is installed. I downloaded a copy of Drush7 from Github to a local folder using Git. Drush supplies documentation for manual installation in detail.
In my project directory in a drush7 folder I issued:
git clone git@github.com:drush-ops/drush.git .
On my system at least I don’t need to mess making the drush command executable, and I’m using this Drush install locally as a test for project so I didn’t symlink drush anywhere in my $PATH. But the step 5 of the Drush manual install process from the official Drush docs is critical.
If you’ve followed thusfar we’ve:
-
Installed Composer globally on our system.
-
Fetched Drush source to a local project folder.
We now have to finish installing Drush (it’s dependencies). From the Drush root directory you must issue:
composer install
This will install the Drush dependencies so Drush will fully work when you call it. Now Drush is installed.
We can check this with a simple command:
dgurba /var/www/2014/MyProject/drush7 master > ./drush --version Drush Version : 7.0-dev
We can now interact with or attempt to install Drupal8 using Drush at our whim.
Looking for quality Drupal Web Hosting? Look no further than Arvixe Web Hosting!