①
syntax error, unexpected tIDENTIFIER, …
①のようなエラーコードが出た際の対処法としてはvccw内のVagrantfail内のコード改変が有効である。以下に示す。
config.vm.network :public_network, type: 'dhcp', bridge: 'en1: Wi-Fi (AirPort)'
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.ip_resolver = proc do |vm, resolving_vm|
ip_address = ''
if hostname = (vm.ssh_info && vm.ssh_info[:host])
vm.communicate.execute("/sbin/ifconfig enp0s8 | grep 'inet addr' | tail -n 1 | egrep -o '[0-9\.]+' | head -n 1 2>&1") do |type, contents|
ip_address = contents.split("\n").first
end
end
ip_address
end
config.vm.synced_folder _conf['synced_folder'],
_conf['document_root'], :create => "true", :mount_options => ['dmode=755', 'fmode=644']
if Vagrant.has_plugin?('vagrant-hostsupdater')
config.hostsupdater.remove_on_suspend = true
end
というコード内の
config.vm.synced_folder _conf['synced_folder'],
_conf['document_root'], :create => "true", :mount_options => ['dmode=755', 'fmode=644']
というコードを消すことが有効である。
②
The machine with the name 'サイト名' was not found configured for this Vagrant environment.
②のようなエラーが出た際は2つ以上のローカルホストの立ち上げが原因である可能性が高い。mac環境であればVirtualBoxを用いて立ち上がっているローカルホストの消去後再度開くことによって解決できる可能性が高い。


