Recently we just released a course on Laravel Basics here at Treehouse. This starts a brand new, exciting journey into the work of PHP Frameworks. As we progress into this topic we will be digging deeper into new technologies such as Vagrant, VirtualBox, Git, and heavier usage of our terminals. To help this process here are some of the most common questions that are appearing on our Forums. As with all new topics we do our best to help students get their environments set up to learn. Let’s look at the top five questions.
1. “A Vagrant environment or target machine is required to run this command.”
This error will come to you if you run your ‘vagrant up’ command from the wrong directory. The best way to know you are inside of the correct directory is to run the command (OSX and Linux) ‘ls -la’ and look for a .vagrant directory. For this course you will need to be in the Homestead directory.
2. ” Warning: Connection timeout. Retrying…”
This warning comes up for a number of reasons, but the most common occurs on Windows due to an issue with hardware virtualization not being enabled in the computers BIOS. There is a tool you can download here to see if it is indeed disabled on your machine. If it is not enabled you will need to go into your BIOS (different for each machine) and enable hardware virtualization. There is a good example here.
3. “No input file specified”
This error comes to us from the land of missing folders and un-created projects. Lets take a look at a section of our Homestead.yaml file:
- map: laravel.dev
Two common things could be happening here. One, your folder is not correct in the yaml file. Check for mis-spellings or an incorrect user name, which should be vagrant in our case. Two, the folder does not yet exist. If you try to run your server without first having installed Laravel, or perhaps installing it to the wrong location, this will happen.
4. “* The host path of the shared folder is missing:”
This is telling you that it cannot find your shared folder, or the folder on your local machine. In most cases folks forget to create the ‘Projects’ folder locally on their machine inside of the ‘Homestead’ folder. You can also change the path to an existing folder that contains your Laravel code in the Homestead.yaml file.
5. ‘git is not recognized as an internal or external command’
On Windows when you are installing git, which you will absolutely need to do for this course, you will need to make sure during the install that you check the box to ‘run Git from the Windows command prompt’. After this you should be ready to roll.
After all of this, you still may have questions. Feel free to post these questions in our Forums and either Treehouse or other students will answer you. Also, Laravel has a Laravel has a wonderful community forum that can also come in handy as you learn more about the Laravel Framework.