Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Laravel 4 Basics Getting Started with Laravel Installing Laravel Homestead

How to install Laravel for WIndows

The video is outdated and looks like the blog post showing windows installation is outdated as well. After cloning repository there is no yaml file. Nor can you run homestead init.

I am running windows 8 64 bit. I have git, composer, and PEAR installed. All commands in the instructions at http://laravel.com/docs/4.2/homestead work until it asks you to run homestead init

When I run it I receive a warning saying the following:

Warning: require(C:\Users\c\Homestead/../../autoload.php): failed to open stream: No such file or directory in C:\Users\c\Homestead\homstead on line 10

Fatal error: require(): Failed opening required 'C:\Users\c\Homestead/../../autoload.php' (include_path='.;c:\xampp\php\PEAR') in C:\Users\c\Homestead\homestead on line 10

Any suggestions on how to fix this?

4 Answers

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Carlos;

Editing Windows PATH Variable - Windows 8

  1. Drag the Mouse pointer to the Right bottom corner of the screen
  2. Click on the Search icon and type: Control Panel
  3. Click on -> Control Panel -> System -> Advanced
  4. Click on Environment Variables, under System Variables, find PATH, and click on it.
  5. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
  6. Close the window.

See if that helps.

Ken

I follow you for steps 1, 2 , 3, 4, and 6, but I do not understand step 5. I can click EDIT to edit "Path" (under systems variables - as instructed), but I do not understand what you mean by "adding the location of the class to the value for PATH".

Can you give me an example of what it would look like?

Right now my Path variable is spelled "Path". Uppercase P and lower case "ath". The value is currently set to:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\HashiCorp\Vagrant\bin;C:\xampp\php;C:\ProgramData\ComposerSetup\bin

so how would I go about completing step 5?

Maja B.
Maja B.
12,984 Points

This is a really good step by step guidelines you have provide for us, Ken. Thank you.

But :)

My current path variable (inside Control Panel) is:

C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\ActiveState Komodo Edit 8\;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\nodejs\;C:\HashiCorp\Vagrant\bin

Should I simply add ;~/.composer/vendor/bin and get:

C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\ActiveState Komodo Edit 8\;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\nodejs\;C:\HashiCorp\Vagrant\bin;~/.composer/vendor/bin

I did that but homestead is still unrecognizable. Even after closing ad starting Git Bash terminal again.

Should I add something like C:\ ...something here... composer/vendor/bin. But what?

Maja B.
Maja B.
12,984 Points

Even if I add

;C\Users\Maja\composer\vendor\bin

homestead remains unrecognizable :/

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Carlos;

I just did the Laravel installation on my Windows 8 64bit machine using the step by step instructions on Laravel.Com for Laravel version 4.2 with the Homestead installation. I was able to complete the entire installation successfully.

Make sure all of your versions are the most current and that you have your PATH variable(s) properly set.

Post back if you still aren't successful.

Ken

i'm new at this so i dont know how to set my PATH variable. Could you please explain in detail with an example?

i think my problem is this step: Make sure to place the ~/.composer/vendor/bin directory in your PATH so the homestead executable is found when you run the homestead command in your terminal.

i dont know how to do this nor where to begin

they said make sure ~/.composer/vendor/bin are you suggested to change C:/Users/Brian/.composer/vendor/bin into Path environmental variable? I do not understand what does Laravel mean by "~" ?

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Carlos;

At the end of the Path variable, add a semi-colon to separate paths and then enter in the path from the Laravel docs. That should solve the issue.

Ken

The Laravel docs asks me to append "~/.composer/vendor/bin" to the Path variable. I did, but when I enter the command "homestead init" in my command promt I get:

'homestead' is not recognized as an internal or external command, operable program or batch file.

And if I type in "composer homestead init" i get:

[InvalidArgumentException] Command "homestead" is not defined.

So it looks like I cannot continue. Any thoughts?

Also, does it matter that I am on a new Surface Pro 3?