4

I'm new to vagrant/homestead, and I'm trying to debug the box that was created using vagrant up as the connection is on a timeout loop. I'm trying to enable the GUI. I've tried adding the config from the vagrant site and every variation of it to my vagrantfile:

config.vm.provider "virtualbox" do |v|
  v.gui = true
end

But whenever this is in there and I run vagrant up or reload, it just returns "Message: undefined local variable or method 'config' for main:Object"

Any ideas? Thanks in advance!

Kevin Panko
  • 8,356
  • 19
  • 50
  • 61
nwi_justin
  • 83
  • 1
  • 7

1 Answers1

11

Recently I had the same problem, in my case this is because I put this code outside the main vagrant config block, try to put in the proper place like in example. First line define local variable config which used inside the block:

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  // other configs

  config.vm.provider "virtualbox" do |v|
    v.gui = true
  end

end
Sonique
  • 6,670
  • 6
  • 41
  • 60