Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

vagrant up fails on linux mint serena #1281

Closed
psaikido opened this issue Apr 5, 2017 · 9 comments
Closed

vagrant up fails on linux mint serena #1281

psaikido opened this issue Apr 5, 2017 · 9 comments

Comments

@psaikido
Copy link

psaikido commented Apr 5, 2017

  • Bug Report / Support Request
Vagrant 1.8.1
VirtualBox 5.1.12r112440
ansible 2.1.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  • Linux (version)

https://gist.github.com/psaikido/6fb921fb3ae7a4c30484135852b5abc9

I cloned drupal-vm, ran composer install, installed vagrant and virtualbox and got the error message in the gist. Linux mint serena does not install virtualbox 5.1 but instead "VirtualBox 5.0.32_Ubuntur112930" from its repositories. This is below the recommended 5.1 version so I thought it would be to do with that. I went and got the 5.1 deb file to upgrade it to the right version but get the same error. On a different vagrant, a test one, I could get it to 'up' using the 5.0 virtualbox to try to isolate the error - might be useful info, that my machine will spin up a vm, but just not the drupal-vm!

@geerlingguy
Copy link
Owner

Just pasting the above gist here for reference:

$ vagrant up
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.

Path: /data/hughie/sites/5mile.studio/drupal-vm/Vagrantfile
Line number: 0
Message: TypeError: no implicit conversion of false into Hash

That's really odd... I don't see any reason why Ruby would be complaining about that Vagrantfile.

However, Drupal VM requires at least Vagrant 1.8.6 and Ansible 2.2.x (preferably the latest of each), and maybe there's a bug using an older Vagrant release with Drupal VM's Vagrantfile? I've been on 1.9.x for a couple months, and 1.8.1 seems ages ago :/

But still, no idea where that error could come from.

Can you try upgrading everything to the latest releases and try again?

@oxyc
Copy link
Collaborator

oxyc commented Apr 5, 2017

I can reproduce this by having config.yml or local.config.yml entirely empty. YAML.load will return false and thus the merge operation of variables will fail.

@geerlingguy
Copy link
Owner

@oxyc - Interesting. Is there anything we can do to work around that? In PHP, we could use the classic !empty() :)

oxyc added a commit to oxyc/drupal-vm that referenced this issue Apr 5, 2017
@psaikido
Copy link
Author

Upgrade to vagrant 1.9.3 and virtualbox 5.1.18 with the same result.

@oxyc
Copy link
Collaborator

oxyc commented Apr 11, 2017

@psaikido did you try the PR linked above your comment?

@psaikido
Copy link
Author

If you mean pulling from git then yes. Otherwise "try the PR"?

@psaikido
Copy link
Author

Aha! Adding those two lines manually worked! On first running 'vagrant up' it told me to upgrade ansible which I did and after that we are golden. Thanks :)

geerlingguy added a commit that referenced this issue Apr 11, 2017
Issue #1281: Avoid TypeError by only merging optional config content when present
@geerlingguy
Copy link
Owner

Merged the PR from @oxyc - thanks!

@psaikido
Copy link
Author

"PR" = "Pull Request" - I see - great work there guys.

sonfd pushed a commit to sonfd/drupal-vm that referenced this issue May 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants