# Capistrano composer step failure

**URL:** https://discourse.roots.io/t/capistrano-composer-step-failure/1046
**Category:** bedrock
**Created:** 2014-01-10T14:43:34Z
**Posts:** 5

## Post 1 by @Idealien_ — 2014-01-10T14:43:34Z

That end of tunnel light is getting a little closer. I’m using Bitbucket for my repo and working through an [example.ca](http://example.ca) scenario I have my local dev working properly to stand up WordPress. The capistrano piece is works if I comment out the composer line from gemfile and capfile, but that obviously doesn’t make for a successful full deploy. I’m left with a page loading that indicates /releases/20140110141008/wp/wp-blog-header.php) [function.require]: failed to open stream that is understandable b/c it hasn’t attempted to push the dependancies.

I’ve put the cap log from the last step which fails at [https://gist.github.com/Idealien/eec9e85c0fead2a45156](https://gist.github.com/Idealien/eec9e85c0fead2a45156)

I’m running this on MT:GS for hosting and had to do a [small tweak to enable composer](http://jonlabelle.com/snippets/view/shell/using-composer-on-a-mediatemple-grid-service-account). But I have confirmed that when I manually login with same account via ssh that composer command responds appropriately.

Let me know if any other file samples would help - The capistrano related file modifications are pretty much stock from the bedrock github save for my credential details.

Thanks,  
J

---

## Post 2 by @swalkinshaw — 2014-01-10T16:53:25Z

Looks like your Composer problem is the same as this: [Deploying WordPress with Capistrano screencast](http://discourse.roots.io/t/deploying-wordpress-with-capistrano-screencast/863/26?u=swalkinshaw)

You’ll need something like:

```
SSHKit.config.command_map[:composer] = "php -d memory_limit=512M -d allow_url_fopen=1 -d suhosin.executor.include.whitelist=phar composer.phar"
```

---

## Post 3 by @Idealien_ — 2014-01-10T17:22:14Z

Beautiful! In my case (or anyone else using MT:GS following that same snippet) is:

```
SSHKit.config.command_map[:composer] = "php -d memory_limit=512M -d allow_url_fopen=1 -d suhosin.executor.include.whitelist=phar ~/composer.phar"
```

---

## Post 4 by @bigsweater — 2014-02-28T09:53:21Z

Thanks for this! Works for me…almost. (I’m on GS, as well.)

After the composer command runs, I get an error:

`cap aborted! No such file or directory - whoami`

However, the `current` symlink is on the server and the `releases` directory has the most current release (though the symlink doesn’t appear to be working).

Is this just because I’m running Windows 7, or am I missing something else?

EDIT:  
This is a problem with sshkit. I managed to find the fix in [this commit](https://github.com/capistrano/sshkit/commit/f08da509a24eaf8cf2e70dee2fb80c528e184cb5). Not sure why 3.1.0 doesn’t have this fix…

However, I’m still getting some issues: my deploy seems to work fine, but I get a 403 error when I visit my URL. The server returns a 500 error when I visit [myurl.com/current](http://myurl.com/current). Have I mucked up my config somewhere?

---

## Post 5 by @bigsweater — 2014-02-28T13:40:26Z

Actually, now that I’m looking at it, no symlinks are being followed, both via HTTP and FTP. I can `cd` through symlinks in SSH, but trying to access any of the /shared or /current symlinks returns an error both via FTP and HTTP.

My .htaccess has a line that says `Options +FollowSymLinks`…not sure what I’m missing here.
