3

I used the homestead executable to install homestead in one of my laravel projects., when i vagrant up, i get the following error message;

There was an error loading a Vagrantfile. The file being loaded and the error message are shown below. This is usually caused by a syntax error.

Path: /Users/tommorison/Code/CSToss/Vagrantfile Line number: 12 Message: LoadError: cannot load such file -- /Users/tommorison/Code/CSToss/vendor/laravel/homestead/scripts/homestead.rb

Here is my vagrantfile

require 'json' require '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"

require File.expand_path(confDir + '/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

Why am I getting this message? all the docs i've read pertain to homestead 2.0. i'm using 3,0. Any help would be greatly appreciated.

lewazo
  • 80
  • 6
Tom Morison
  • 564
  • 1
  • 8
  • 26

0 Answers0