尝试流浪时宅基地出错

时间:2017-12-20 14:50:22

标签: laravel homestead

实际上我试图在Windows上使用Laravel Homestead。

当我尝试vagrant up时,我收到此错误:

C:/Users/Lluis/Homestead/scripts/homestead.rb:125:in `configure': undefined method `each' for "\u00D4\u00C7\u00F6 ~/.ssh/id_rsa":String (NoMethodError)
        from C:/Users/Lluis/Homestead/Vagrantfile:35:in `block in <top (required)>'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/config/v2/loader.rb:37:in `load'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/config/loader.rb:125:in `block (2 levels) in load'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/config/loader.rb:119:in `each'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/config/loader.rb:119:in `block in load'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/config/loader.rb:116:in `each'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/config/loader.rb:116:in `load'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/vagrantfile.rb:28:in `initialize'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:810:in `new'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:810:in `vagrantfile'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:556:in `host'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:214:in `block in action_runner'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/action/runner.rb:33:in `run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:543:in `hook'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/environment.rb:792:in `unload'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/bin/vagrant:141:in `ensure in <main>'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/bin/vagrant:141:in `<main>'

我在其他人看到的问题是错误导致无法找到.ssh文件。

我查看了我的homestead.yaml文件,但认为它很好我会把文件放在这里:

---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: c:/Users/Lluis/.ssh/id_rsa.pub

keys:
     — c:/Users/Lluis/.ssh/id_rsa

folders:
    - map: d:/Homestead_Projects
      to: /home/vagrant/code

sites:
    - map: homestead.app
      to: /home/vagrant/code/Laravel/public   

databases:
    - homestead

如何修复错误?有人在homestead.yaml文件中看到一些错误吗?

由于

1 个答案:

答案 0 :(得分:0)

检查是否在主目录〜,有一个旧目录.vagrant和.vagrant.d,你必须删除这些并再次添加laravel / homestead框。 干杯!