Laravel - homestead.rb无法加载

时间:2016-05-27 16:17:42

标签: php ruby laravel vagrantfile

我使用宅基地可执行文件在我的一个laravel项目中安装宅基地。当我流浪时,我收到以下错误消息;

  
    

加载Vagrantfile时出错。正在加载的文件和错误消息如下所示。这通常是由语法引起的     错误。

  
     

路径:/ Users / tommorison / Code / CSToss / Vagrantfile行号:12   消息:LoadError:无法加载此类文件 -   /Users/tommorison/Code/CSToss/vendor/laravel/homestead/scripts/homestead.rb

这是我的vagrantfile

  

要求'json'要求'yaml'

     

VAGRANTFILE_API_VERSION || =“2”confDir = $ confDir || =   File.expand_path(“vendor / laravel / homestead”,File.dirname( FILE ))

     

homesteadYamlPath =“Homestead.yaml”homesteadJsonPath =   “Homestead.json”afterScriptPath =“after.sh”aliasesPath =“aliases”

     

需要File.expand_path(confDir +'/ scripts / homestead.rb')

     

Vagrant.configure(VAGRANTFILE_API_VERSION)执行| config |       如果File.exists?别名路由然后           config.vm.provision“file”,source:aliasesPath,destination:“〜/ .bash_aliases”       端

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

为什么我收到此消息?我读过的所有文档都与宅基地2.0有关。我正在使用3,0。任何帮助将不胜感激。

0 个答案:

没有答案