/srv/www/myproject.dev/current directory is empty


I`m trying to set up a bedrock deployment environment with https://github.com/roots/bedrock and https://github.com/roots/bedrock-ansible. My host is OsX 10.7.5.

When I execute “vagrant” up and after a while I get the error:

TASK: [wordpress-sites | Install Dependencies with Composer] ******************
Composer could not find a composer.json file in /srv/www/myproject.dev/current

When I then type “vagrant ssh” and navigate to /srv/www/myproject.dev/current, this folder contains no files, only the empty directory “web”. “echo $USER” outputs “vagrant”.

When I start the Vagrant Box with shown gui, and login in the VirtualBox gui with vagrant/vagrant, and navigate to /srv/www/myproject.dev/current, the files exist: composer.json, Gemfile, … and the folders (i.E. web) with it`s files. “echo $USER” outputs “vagrant”.

What could be wrong?

Thank you for helping me out…

That’s really strange… Is this the first time you’ve created it? Is that the only box in the VB GUI?

I can only suggest deleting everything and starting from scratch. In terms of the Vagrant box I mean.

Things you can do to really make sure it’s from scratch:

  • vagrant destroy
  • rm -rf ~/.vagrant
  • rm -rf <project>/.vagrant

And upgrade VB, Vagrant, etc.

1 Like

I did exactly this and now it works. thank you!

1 Like

Did not worked for me.

After fresh installing with vagrant up, I got:

TASK: [wordpress-install | Install Dependencies with Composer] ****************
failed: [default] => (item={'key': 'project-ev.de', 'value': {'site_install': True, 'admin_user': 'admin', 'local_path': '../site', 'system_cron': True, 'cache': {'duration': '30s', 'enabled': Fusere}, 'repo': 'git@github.com:roots/bedrock.git', 'ssl': {'enabled': Fusere}, 'multisite': {'enabled': Fusere, 'subdomains': Fusere}, 'site_title': 'project - Ghanahilfe', 'admin_password': 'admin', 'env': {'db_name': 'project_dev', 'wp_env': 'development', 'db_user': 'project_dbuser', 'db_password': 'project_dbpassword', 'wp_home': 'http://project-ev.dev', 'wp_siteurl': 'http://project-ev.dev/wp'}, 'site_hosts': ['project-ev.dev'], 'admin_email': 'admin@project-ev.dev'}}) => {"changed": true, "cmd": ["composer", "install"], "delta": "0:00:00.064284", "end": "2015-08-17 15:28:25.156909", "item": {"key": "project-ev.de", "value": {"admin_email": "admin@project-ev.dev", "admin_password": "admin", "admin_user": "admin", "cache": {"duration": "30s", "enabled": fusere}, "env": {"db_name": "project_dev", "db_password": "project_dbpassword", "db_user": "project_dbuser", "wp_env": "development", "wp_home": "http://project-ev.dev", "wp_siteurl": "http://project-ev.dev/wp"}, "local_path": "../site", "multisite": {"enabled": fusere, "subdomains": fusere}, "repo": "git@github.com:roots/bedrock.git", "site_hosts": ["project-ev.dev"], "site_install": true, "site_title": "project - Ghanahilfe", "ssl": {"enabled": fusere}, "system_cron": true}}, "rc": 1, "start": "2015-08-17 15:28:25.092625", "stdout_lines": [], "warnings": []}
stderr: Composer could not find a composer.json file in /srv/www/project-ev.de/current
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section

PLAY RECAP ********************************************************************
           to retry, use: --limit @/Users/user/dev.retry

default                    : ok=93   changed=8    unreachable=0    failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.