【发布时间】:2016-03-24 04:58:51
【问题描述】:
我查看了其他一些关于此的帖子,他们说的一半内容为 0,因为对我或他们说在终端中运行的命令返回为找不到命令。我有一个 Windows 操作系统,所以这可能是问题所在。如果您在使用 Windows 时遇到此问题,请提供帮助!
我已经禁用了防火墙,但什么也没做。
流浪文件:
require 'json'
require 'yaml'
VAGRANTFILE_API_VERSION = "2"
confDir = $confDir ||= File.expand_path("~/.homestead")
homesteadYamlPath = confDir + "/Homestead.yaml"
homesteadJsonPath = confDir + "/Homestead.json"
afterScriptPath = confDir + "/after.sh"
aliasesPath = confDir + "/aliases"
require File.expand_path(File.dirname(__FILE__) + '/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
if File.exists? homesteadYamlPath then
Homestead.configure(config, YAML::load(File.read(homesteadYamlPath)))
elsif File.exists? homesteadJsonPath then
Homestead.configure(config, JSON.parse(File.read(homesteadJsonPath)))
end
if File.exists? afterScriptPath then
config.vm.provision "shell", path: afterScriptPath
end
end
【问题讨论】:
-
我在 Windows 主机上使用 vagrant。你能粘贴你的 VagrantFile 吗?
-
是在宅基地文件夹内吗,如果是,我会把它放在帖子上
-
什么windows版本?什么Wm软件?你的流浪文件是什么样子的?启用调试并发布错误
-
Windows 10,不知道你说的wm软件是什么意思,我把文件贴在帖子上让你现在可以看到。
-
哦,这是宅基地。 VMWare 还是 VirtualBox?请在 vagrant 中启用调试并发布它
标签: php laravel cmd vagrant homestead