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

Stephen Blank
Stephen Blank
16,286 Points

Change in the installation steps for Homestead?

In the "Installing Laravel Homestead" video, Hampton talks about editing a yaml file after generating a key. But it seems the installation steps have changed, and no yaml file exists in a freshly cloned Homestead repository. The new steps say something about running a composer command, but the instructions don't say anything about installing composer. Is composer a separate download? Or is it something that comes with homestead?

http://laravel.com/docs/4.2/homestead

3 Answers

Stephen Blank
Stephen Blank
16,286 Points

Ok, I've worked through this. The instructions on the Laravel site have been updated, so are a little different than the video.

You do not have to clone the homestead git repository. I did the following:

  • Install composer using Homebrew for OSX. Homebrew can be installed with this command:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Update formulae and Homebrew, and add some repositories:
brew doctor
brew update
brew tap homebrew/dupes
brew tap homebrew/php
  • Install composer via Homebrew. You can use the --ignore-dependencies option if you already have PHP installed:
brew install composer --ignore-dependencies
  • Install the Homestead CLI
composer global require "laravel/homestead=~2.0"
  • Add the Homestead bin directory to your $PATH variable:
PATH=$PATH:~/.composer/vendor/bin
  • Create the Homestead.yaml configuration file. It will be created at /Users/YourUserName/.homestead/Homestead.yaml
homestead init
  • Edit the Homestead.yaml file (now you can rejoin the video where Hampton talks about editing this file)
homestead edit
  • When Hampton talks about starting the box with the vagrant up command, use the following instead:
homestead up

Hope this helps future viewers

Austin Langdon
Austin Langdon
12,667 Points

Steve - thank you for the detailed instructions. Much appreciated.

and what are the steps to install in windows???

James Polis
James Polis
5,382 Points

In the Homestead docs, it says to run:

bash init.sh

and it will create the Homestead.yaml file!