Open brendanfalkowski opened 9 years ago
Thanks Brendan. Bizarre! So much for perfectly repeatable environments! I will give it another run following my instructions. It could be because it grabs the latest build something has changed - so not vagrant playing up but rather the build instructions have changed and my scripts have not kept up
I am just playing with sample data in a Docker container. Nice and repeatable right? First home page fetch it came up with errors about unable to create directories. (Doing an 'ls' afterwards showed the directory existed.) Reloading page and it worked. A bit weird.
Possibly related to me having Vagrant 1.5.3. Got further along here after updating: https://github.com/ryanstreet/magento2-vagrant/issues/1
But still not to a working environment.
I have had at least one person use it on a Mac - they did not report any problems (other than feeling slow). I just tried again under Windows. I had to reload the home page 3 times for it all to come up, but it did eventually come up properly.
It feels like there is a potential race condition generating all the cached files on the first request. Because multiple threads are running at once (for different page assets), there could be something non-deterministic going on there.
Oh, just noticed it was possibly the Vagrant version number. Pass! I dabble, but am not a Vagrant expert. I am running Vagrant 1.7.1.
Using Vagrant 1.7.2 now, did a vagrant destroy
and vagrant up
but stuck it's stuck on this now:
Can't create directory /var/www/magento2/var/generation/Magento/Framework/App/PageCache/Identifier/.
#0 /var/www/magento2/lib/internal/Magento/Framework/Code/Generator/Autoloader.php(34): Magento\Framework\Code\Generator->generateClass('Magento\Framewo...')
#1 [internal function]: Magento\Framework\Code\Generator\Autoloader->load('Magento\Framewo...')
#2 [internal function]: spl_autoload_call('Magento\Framewo...')
#3 /var/www/magento2/lib/internal/Magento/Framework/Code/Reader/ClassReader.php(18): ReflectionClass->__construct('Magento\Framewo...')
#4 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Definition/Runtime.php(43): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\Framewo...')
#5 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(72): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\Framewo...')
#6 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(68): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Framewo...')
#7 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(233): Magento\Framework\ObjectManager\ObjectManager->get('Magento\Framewo...')
#8 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(52): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\Framewo...', NULL, 'identifier', 'Magento\Framewo...')
#9 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(83): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\Framewo...', Array, Array)
#10 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(68): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Framewo...')
#11 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(233): Magento\Framework\ObjectManager\ObjectManager->get('Magento\Framewo...')
#12 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(52): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\Framewo...', NULL, 'kernel', 'Magento\PageCac...')
#13 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Dynamic/Developer.php(83): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\PageCac...', Array, Array)
#14 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(68): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\PageCac...')
#15 /var/www/magento2/lib/internal/Magento/Framework/Interception/PluginList/PluginList.php(213): Magento\Framework\ObjectManager\ObjectManager->get('Magento\PageCac...')
#16 /var/www/magento2/var/generation/Magento/Framework/App/FrontController/Interceptor.php(93): Magento\Framework\Interception\PluginList\PluginList->getPlugin('Magento\Framewo...', 'front-controlle...')
#17 /var/www/magento2/var/generation/Magento/Framework/App/FrontController/Interceptor.php(119): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#18 /var/www/magento2/lib/internal/Magento/Framework/App/Http.php(114): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#19 /var/www/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(244): Magento\Framework\App\Http->launch()
#20 /var/www/magento2/index.php(38): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#21 {main}
I had file system permissions issue on Windows (using "smb" type of sync folder) and came to the solution that file owner should be defined in Vagrantfile
config.vm.synced_folder '../../magento2', '/var/www/magento2', owner: "www-data", group: "www-data", type: "smb"
Maybe it is needed for Mac/Linux as well. Or maybe some other mount commands are required.
FYI — I'm using Mac OS 10.10.1. I've used Vagrant before with Laravel, but by paying a better man to make it work and teach what to do.
Went through Alan's instructions literally like a child: copy, pasting commands into terminal. Seemed to go through fine downloading repos, downloading VM, getting composer reqs, getting composer updates, and at the end:
Except when visiting http://localhost:8080/ I get:
Found this: http://magento.stackexchange.com/questions/13125/how-do-i-set-developer-mode-in-magento2
And original Alan's fix: http://magento-quickies.alanstorm.com/post/58757471044/magento-2-developer-mode
Which leads to this:
So then I went back here: http://magento.stackexchange.com/a/14337/312
And ran this:
But got this:
Then I remembered how to fix permissions problems:
But that didn't seem to have any effect.
So now I'm going to try this one: https://github.com/ryanstreet/magento2-vagrant