-
-
Save scottalan/aa519aa0b7f67d6e7fffbb39cf605d21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here are the lines in the "Parent file" that the error refers to: | |
# Allow an untracked Vagrantfile to modify the configurations | |
#eval File.read "#{host_config_dir}/Vagrantfile.local" if File.exist?("#{host_config_dir}/Vagrantfile.local") | |
if File.exist?("#{host_config_dir}/Vagrantfile.local") | |
eval File.read "#{host_config_dir}/Vagrantfile.local" # This is line 191 | |
end | |
# Here are the primary lines from the error: | |
#/opt/drupalvm/master-env/Vagrantfile:191:in `eval': undefined method `[]=' for nil:NilClass (NoMethodError) | |
#from (eval):1:in `each' | |
#from (eval):1:in `block in <top (required)>' | |
#from /opt/drupalvm/master-env/Vagrantfile:191:in `eval' | |
#from /opt/drupalvm/master-env/Vagrantfile:191:in `block in <top (required)>' | |
#from /opt/vagrant/embedded/gems/gems/vagrant-1.8.4/lib/vagrant/config/v2/loader.rb:37:in `call' | |
# This one works. | |
vconfig['vagrant_synced_folders'].each do |synced_folder| | |
case synced_folder['type'] | |
when "nfs" | |
guest_path = synced_folder['destination'] | |
host_path = File.expand_path(synced_folder['local_path']) | |
config.vm.synced_folders[guest_path][:guestpath] = "/var/nfs#{host_path}" | |
config.bindfs.bind_folder "/var/nfs#{host_path}", guest_path, | |
u: 'vagrant', | |
g: 'www-data', | |
perms: 'u=rwX:g=rwD', | |
o: 'nonempty' | |
config.nfs.map_uid = Process.uid | |
config.nfs.map_gid = Process.gid | |
end | |
# This one doesn't. | |
case synced_folder['files'] | |
when "/sites/default/files" | |
host_files = File.expand_path(synced_folder['local_path'] + synced_folder['files']) | |
guest_files = synced_folder['destination'] + synced_folder['files'] | |
nfs_path = "/var/nfs/#{synced_folder['id']}/#{host_files}" | |
config.vm.synced_folders[guest_files][:guest_files] = nfs_path | |
config.bindfs.bind_folder host_files, guest_files, | |
u: 'www-data', | |
g: 'www-data', | |
perms: 'u=rwX:g=rwX', | |
o: 'nonempty' | |
config.nfs.map_uid = Process.uid | |
config.nfs.map_gid = Process.gid | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment