Laravel Homestead。无法运行"宅基地"

时间:2014-12-04 03:14:16

标签: laravel terminal

我正在努力让Laravel Homestead继续运转。我通过http://laravel.com/docs/4.2/homestead顺利完成了所有步骤。我要做的最后一件事是编辑我的homestead.yaml文件(我做过)并运行homestead up。但是每当我尝试homestead up时,我都会得到这个输出:

/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/shared_helpers.rb:89:in `expand_path': couldn't find HOME environment -- expanding `~' (ArgumentError)
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/shared_helpers.rb:89:in `expand_path'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/shared_helpers.rb:89:in `user_data_path'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/plugin/manager.rb:16:in `user_plugins_file'
from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.5/lib/vagrant/plugin/manager.rb:27:in `instance'
from /Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.5/lib/vagrant/pre-rubygems.rb:22:in `<main>'

有谁知道为什么会这样,以及如何解决?

注意:我是终端的菜鸟,我刚开始关注laracast的教程,所以我的终端正在使用Oh-my-zsh和Homebrew,据说如果可能的话,zsh或Homebrew语法最有用。< / p>

2 个答案:

答案 0 :(得分:14)

经过一些研究后,这似乎是版本2.0.8中的错误。解决方案是恢复到v2.0.7

首先删除当前的homestead 2.0.8文件夹

rm -rf ~/.composer/vendor/laravel/homestead

然后安装Homestead v2.0.7

composer global require laravel/homestead:v2.0.7

答案 1 :(得分:6)

来自Laracasts forum的答案在Homestead 2.0.8中为我解决了这个问题:

  

..原来是$ _ENV数组   除非您在php.ini中明确声明它,否则不会填充。 [...]

     

要解决此问题,请在php.ini中找到variables_order并添加“E”   字符串,如下所示:variables_order =“EGPCS”。