Reputation: 7
I have been successfully using homestead for about an hour now, but when i suspended my virtual machine with vagrant suspend
and tried to get it up again using vagrant up
i got this error:
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:
shell provisioner:
* Shell provisioner `args` must be a string or array.
What does this mean? The vagrant docs say that
The shell provisioner takes various options. One of inline or path is required
Do i need to pass in some arguments somewhere? What am i doing wrong?
Thanks in advance
this is my vagrantfile:
require 'json'
require 'yaml'
VAGRANTFILE_API_VERSION = "2"
homesteadYamlPath = File.expand_path("~/.homestead/Homestead.yaml")
afterScriptPath = File.expand_path("~/.homestead/after.sh")
aliasesPath = File.expand_path("~/.homestead/aliases")
require_relative 'scripts/homestead.rb'
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if File.exists? aliasesPath then
config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases"
end
Homestead.configure(config, YAML::load(File.read(homesteadYamlPath)))
if File.exists? afterScriptPath then
config.vm.provision "shell", path: afterScriptPath
end
end
Upvotes: 0
Views: 1937
Reputation: 540
Here is my ~/homestead/.Homestead.yaml
file, it contains a configuration for two apps, one with HHVM enabled and one with HHVM disabled(default in homestead).
Homestead will create the database for you in MySQL and PostgreSQL server, when running homestead up
.
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Projects
to: /home/vagrant/Projects
sites:
- map: jobs.app
to: /home/vagrant/Projects/jobs/public
- map: messages.app
to: /home/vagrant/Projects/messages/web
hhvm: true
databases:
- jobs
- messages
variables:
- key: APP_ENV
value: local
You can now run:
$ homestead up
and then:
$ homestead ssh
and then run byobu(for tmux):
$ byobu
and cd into the project:
$ cd Projects/jobs
and run composer:
$ composer update
Upvotes: 0
Reputation: 9883
If this is homestead 2 you need to be using homestead up
and homestead suspend
etc.
See homestead list
Upvotes: 1