-
Notifications
You must be signed in to change notification settings - Fork 39
Development Environment Setup for Windows
This article is intended to help people set up new personal computers that use Windows for work on the project.
- Navigate to https://github.com/hhaccessibility/hhaccessibility.github.io/
- Click the "Fork" button.
If you already have XAMPP installed, WAMP shouldn't be necessary since WAMP fills essentially the same role.
- Go to the "Download" section on http://www.wampserver.com/en/ and download either the 64 bit or 32 bit version.
- Use only default settings wherever possible in the installer to keep things simple and easy to remember. If you're forced to add a non-empty password, keep it really simple like 1234 since the password may be readable by others anyway if you get stuck.
If you run into errors about missing vc dll files, install the Visual Studio runtimes such as http://www.microsoft.com/en-us/download/details.aspx?id=30679. You can find them in the dialog on http://www.wampserver.com/en/ where you downloaded the installer.
This step will be finished when you can run WAMP, see it go red, orange, and finally green.
- Open a terminal and run 'php -v' to see if you have 7.1 or later. If it says 7.1, proceed to the next step. 5.6 is too old.
Check if you have a folder like C:\wamp\bin\php\php7.1.10 with your wamp installation. If you have a directory for 7.1 or later, add it to your PATH environment variable.
If you don't have a directory for php 7.1 or later, download a zip from http://windows.php.net/qa/. Extracting to a subdirectory of C:\wamp\bin\php would be good. Update your PATH environment variable to include your new directory containing php.exe.
This step is complete when you can open a terminal/console window, type 'php -v' and see 7 or later.
- If you installed MySQL, check the version. You can run a command like 'mysql -V' to see it.
- JSON was introduced in MySQL 5.7.8 so if you have an older version, upgrade it. You're encouraged to use the latest version of MySQL.
- If you installed MariaDB instead of MySQL, install MySQL also and make sure it is at least version 5.7.8.
Install git from https://git-for-windows.github.io/
If you run into a lot of problems getting git installed and working from command line in Windows, the following video will show the steps in more detail for installing git bash. https://www.youtube.com/watch?v=albr1o7Z1nw
Before calling this step complete, you should be able to open a terminal/cmd window and run 'git -v' without seeing an unrecognized command message.
Clone the repository on your laptop. Pick a directory and add your repository. The following command sequence should work.
- cd c:/
- mkdir accesslocator
- cd accesslocator
- git clone https://github.com/{your github username}/hhaccessibility.github.io.git
Substitute {your github username} with your github username. The URL should match the one for your fork of the repository. For example, if your username was user123, the command would be: git clone https://github.com/user123/hhaccessibility.github.io.git
- Consider if you're using 64 bit windows or not and pick the appropriate installer from https://nodejs.org/en/download/
- Verify that you have at least version 8.11.3 using "node -v".
- The following commands should work.
- cd c:\accesslocator\hhaccessibility.github.io\app
- npm install
- npm install -g gulp-cli
- npm install gulp
- Create a MySQL database named hhaccessibility. You can do this using phpmyadmin in a web browser while running WAMP installation or using the mysql command in a terminal.
- Download the installer executable from https://getcomposer.org/download/ and run it.
- Reopen a command window and test that the "composer" command is recognized.
- Run "composer install".
- Copy a .env file you should have received in an email to your hhaccessibility.github.io\app directory. You may need to use a terminal/console to rename env to .env after pasting the file due to Explorer not thinking it is valid to create a file named ".env".
- Create a mysql database called hhaccessibility. You can use mysql command line or phpmyadmin to do this.
Run the following command: git remote add upstream https://github.com/hhaccessibility/hhaccessibility.github.io.git
Test that the command worked by trying to get latest on your master branch.
- git checkout master
- git pull upstream master
- cd c:\accesslocator\hhaccessibility.github.io\app
- gulp
- php artisan serve
- Hit CTRL and C or CTRL and x at the same time to stop the server.
- php artisan migrate
- php artisan db:seed
- composer all
This should run all automated tests and they should all pass. - Open http://localhost:8000 and you should see the website looking similar to it does at https://app.accesslocator.com. The Maps probably won't work but that can be fixed later.
For more detail on what those commands do and mean, consult app\README.md.
An error message similar to: file_put_contents(hhaccessibility.github.io/app/bootstrap/cache/services.php): failed to open stream: Permission denied
php artisan optimize --force
You see an error message like: RunTimeException in compiled.php The only supported ciphers are AES-128-CBC and AES-256-CBC
This problem is discussed more at: https://github.com/laravel/framework/issues/9080
Double check that you copied the .env file from email as mentioned near the composer install step.
Run the following commands:
php artisan key:generate
php artisan config:clear
Argument 1 passed to Collective\Html\FormBuilder::setSessionStore() must be an instance of Illuminate\Contracts\Session\Session
delete ./bootstrap/cache/compiled.php
An error message similar to: bootstrap/../vendor/autoload.php. Failed to open stream: No such file or directory. The "vendor" folder does not exist.
composer update --no-scripts